其他分享
首页 > 其他分享> > mobile crane 1

mobile crane 1

作者:互联网

void MobileCrane::rotateRope2()
{
    //double r_angle1 = rotateRope + rorate3;
    //std::cout << "r_angle1:" << rotateRope << std::endl;
    //rotRope->setMatrix(osg::Matrix::rotate(osg::DegreesToRadians(rotateRope), 0, 1, 0));
    ropeMatrix = osg::Matrix::rotate(osg::DegreesToRadians(rotateRope), 1, 0, 0);
    osg::Matrix originPos = rotRope->getMatrix();
    osg::Vec3d set_center = osg::Vec3d(0, 7, 0);
    rotRope->setMatrix(originPos*osg::Matrix::translate(-set_center)*ropeMatrix*osg::Matrix::translate(set_center));

}

 

标签:set,Matrix,rotateRope,mobile,setMatrix,crane,osg,center
来源: https://www.cnblogs.com/herd/p/11523743.html