From Nico Kruithof, "Attached is a patch that makes the spherical manipulator frame rate independent. This is similar to what Lee did for the trackball manipulator a couple of months ago."

This commit is contained in:
Robert Osfield
2009-12-02 14:21:13 +00:00
parent 3c8fe13194
commit b278660799
2 changed files with 29 additions and 8 deletions

View File

@@ -143,6 +143,17 @@ class OSGGA_EXPORT SphericalManipulator : public MatrixManipulator
bool _thrown;
bool _allowThrow;
/** The approximate amount of time it is currently taking to draw a frame.
* This is used to compute the delta in translation/rotation during a thrown display update.
* It allows us to match an delta in position/rotation independent of the rendering frame rate.
*/
double _delta_frame_time;
/** The time the last frame started.
* Used when _rate_sensitive is true so that we can match display update rate to rotation/translation rate.
*/
double _last_frame_time;
RotationMode _rotationMode;
osg::Vec3d _center;
double _distance;