osg相机移动时一定要重写
osg相机移动时一定要重写
// 得到逆矩阵,标准接口,控制场景 osg::Matrixd CameraController::getInverseMatrix(void) const { std::cout << "----getInverseMatrix " << std::endl; osg::Matrixd matObj; matObj.makeRotate(m_vRotation._v[0], osg::Vec3(1.0f, 0.0f, 0.0f), m_vRotation._v[1], osg::Vec3(0.0f, 1.0f, 0.0f), m_vRotation._v[2], osg::Vec3(0.0f, 0.0f, 1.0f) ); return osg::Matrixd::inverse(matObj * osg::Matrixd::translate(m_vPosition)); }
#######################
QQ 3087438119