多自由度机械臂模拟3
模拟机械臂吊装
void printHookPosition() { if (hookNode) { osg::Vec3 point3 = hookNode->getBound().center()*osg::computeLocalToWorld(hookNode->getParentalNodePaths()[0]); std::cout << "x:"<<point3.x()<<" y:"<<point3.y()<<" z:"<<point3.z() << std::endl; tranMove->setMatrix(osg::Matrix::translate(point3.x(), point3.y(), point3.z())); } }
QQ 3087438119