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)); }
QQ 3087438119