Fixed the numerical accuracy problems in the Drive and Flight Manipulators.

This commit is contained in:
Robert Osfield
2002-08-29 20:41:19 +00:00
parent 44beefa9a5
commit fc5f07acaa
6 changed files with 186 additions and 59 deletions

View File

@@ -50,10 +50,15 @@ private:
/** Add the current mouse GUIEvent to internal stack.*/
void addMouseEvent(const GUIEventAdapter& ea);
void computeLocalDataFromCamera();
void computeCameraFromLocalData();
/** For the give mouse movement calculate the movement of the camera.
Return true is camera has moved and a redraw is required.*/
bool calcMovement();
// Internal event stack comprising last three mouse events.
osg::ref_ptr<const GUIEventAdapter> _ga_t1;
osg::ref_ptr<const GUIEventAdapter> _ga_t0;
@@ -64,6 +69,10 @@ private:
float _velocity;
YawControlMode _yawMode;
osg::Vec3 _eye;
osg::Quat _rotation;
float _distance;
};