diff options
author | Stijn Buys <ingar@osirion.org> | 2007-10-21 23:54:57 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2007-10-21 23:54:57 +0000 |
commit | f8e9eab39a5e96d478762d06e27ec38f80128435 (patch) | |
tree | bf55c75dbedb1212f3effa23aa6df94932edf22d /src/client/camera.h | |
parent | 621f4ad1d509665e19738525c80e104b80fb7b26 (diff) |
namespace and class cleanups
Diffstat (limited to 'src/client/camera.h')
-rw-r--r-- | src/client/camera.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/client/camera.h b/src/client/camera.h index 2e20c1b..7e189b3 100644 --- a/src/client/camera.h +++ b/src/client/camera.h @@ -18,47 +18,49 @@ for the camera eye location. The camera always looks at (0,0,0) class Camera { public: + Camera(); + ~Camera(); + /// enum indicating the camera mode enum Mode {Free, Track}; /// draw the OpenGL camera transformation - static void draw(float elapsed); + void draw(float elapsed); /// rotate the camera left - static void rotate_left(); + void rotate_left(); /// rotate the camera right - static void rotate_right(); + void rotate_right(); /// rotate the camera up - static void rotate_up(); + void rotate_up(); /// rotate the camera down - static void rotate_down(); + void rotate_down(); /// switch to next camera mode - static void nextmode(); + void nextmode(); /// camera target /** The location the camera is looking at */ - static gl::Vector3f target; + gl::Vector3f target; /// target yaw, angle in XZ plane, positive is looking left - static float yaw_target; + float yaw_target; /// target pitch, angle in XZ plane, positive is looking left - static float pitch_target; + float pitch_target; /// distance from the camera to the target - static float distance; + float distance; + /// current camera mode + Mode mode; protected: - /// default tracking pitch - static const float track_pitch; - /// default offset increment - static const float offset_inc; - /// current yaw, angle in XZ plane, positive is looking left - static float yaw; + float yaw ; /// current pitch, angle in XY, positive is looking up - static float pitch; - - static Mode mode; + float pitch; + /// default tracking pitch + float pitch_track; + /// default offset increment + float offset_inc; }; } // namespace client |