From f8e9eab39a5e96d478762d06e27ec38f80128435 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Oct 2007 23:54:57 +0000 Subject: namespace and class cleanups --- src/client/camera.h | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'src/client/camera.h') 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 -- cgit v1.2.3