多自由度机械臂模拟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()));
    }
}

 

posted @ 2019-08-26 17:22  西北逍遥  阅读(254)  评论(0编辑  收藏  举报