diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-09-09 18:50:45 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-09-09 18:50:45 +0000 |
commit | 146c9e449443453f3932b60cd1bab47f688403e7 (patch) | |
tree | f7f18d29a7a7755515db377b5de9658899de66bb /demos/opengl/trackball.h | |
parent | d3a70b7facea2919b5ee0451d3c639dedb00ea30 (diff) |
various stuff in opengl demos such as a better model,
stable trackball for the fly navigation mode, and started
to put some GUI elements...
Diffstat (limited to 'demos/opengl/trackball.h')
-rw-r--r-- | demos/opengl/trackball.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/opengl/trackball.h b/demos/opengl/trackball.h index 29413becd..e9a899586 100644 --- a/demos/opengl/trackball.h +++ b/demos/opengl/trackball.h @@ -33,9 +33,11 @@ class Trackball { public: + enum Mode {Around, Local}; + Trackball() : mpCamera(0) {} - void reset() { mLastPointOk = false; } + void start(Mode m = Around) { mMode = m; mLastPointOk = false; } void setCamera(Camera* pCam) { mpCamera = pCam; } @@ -46,8 +48,8 @@ class Trackball bool mapToSphere( const Eigen::Vector2i& p2, Eigen::Vector3f& v3); Camera* mpCamera; - Eigen::Vector2i mLastPoint2D; Eigen::Vector3f mLastPoint3D; + Mode mMode; bool mLastPointOk; }; |