机械臂模拟
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; } }