Mechanical wave simulation 2.0

Manipulator simulation

void MobileCrane::updateHopeLength(int center_x, int center_y, int center_z, int armNodeNum, int ropePitchNum, int baseNum)
{
    int numChild = groupRope1->getNumChildren();
    groupRope1->removeChildren(0, numChild);

    for (int k = 0; k<ropePitchNum; k++)
    {
        osg::ref_ptr<osg::Geode> rope1 = CreateCylinder(center_x, armNodeNum, k*(-1), 0.1f);
        groupRope1->addChild(rope1.get());
        hookNode1 = rope1;
    }
}

 

Guess you like

Origin www.cnblogs.com/herd/p/11613131.html