当前位置 : 主页 > 手机开发 > 无线 >

mobile crane 1

来源:互联网 收集:自由互联 发布时间:2021-06-10
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::rota
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));

}

分享图片

分享图片

网友评论