void Camera::rotate(float headingDegrees, float pitchDegrees, float rollDegrees) { // Rotates the camera based on its current behavior. // Note that not all behaviors support rolling. pitchDegrees = -pitchDegrees; headingDegrees = -headingDegrees; rollDegrees = -rollDegrees; switch (m_behavior) { default: break; case CAMERA_BEHAVIOR_FIRST_PERSON: case CAMERA_BEHAVIOR_SPECTATOR: rotateFirstPerson(headingDegrees, pitchDegrees); break; case CAMERA_BEHAVIOR_FLIGHT: rotateFlight(headingDegrees, pitchDegrees, rollDegrees); break; case CAMERA_BEHAVIOR_ORBIT: rotateOrbit(headingDegrees, pitchDegrees, rollDegrees); break; } updateViewMatrix(); }
void MxCore::rotate( double angle, const osg::Vec3d& axis, const osg::Vec3d& point ) { osg::notify( osg::WARN ) << "MxCore::rotate() is deprecated. Use rotateOrbit() instead." << std::endl; setOrbitCenterPoint( point ); rotateOrbit( angle, axis ); }