From 151a2ac2434f4b4c23c107d9c21e4a18dd1a3c68 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 4 Feb 2008 18:42:05 +0000 Subject: converted client:: singleton classes to namespaces --- src/client/camera.h | 50 +++++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 29 deletions(-) (limited to 'src/client/camera.h') diff --git a/src/client/camera.h b/src/client/camera.h index 1a25689..dd1ecc3 100644 --- a/src/client/camera.h +++ b/src/client/camera.h @@ -12,59 +12,51 @@ namespace client { /// camera functions -/** The functions in this class perform the transformations +/** The functions in the camera namespace perform the transformations * for the camera eye location. The camera always looks at (0,0,0) */ -class Camera +namespace camera { -public: - Camera(); - ~Camera(); - /// enum indicating the camera mode enum Mode {Free, Track, Overview}; + /// initialize the camera + extern void init(); + + /// shutdown the camera + extern void shutdown(); + /// draw the OpenGL camera transformation - void draw(float elapsed); + extern void draw(float elapsed); /// rotate the camera left - void rotate_left(); + extern void rotate_left(); /// rotate the camera right - void rotate_right(); + extern void rotate_right(); /// rotate the camera up - void rotate_up(); + extern void rotate_up(); /// rotate the camera down - void rotate_down(); + extern void rotate_down(); /// switch to next camera mode - void nextmode(); + extern void nextmode(); /// camera target /** The location the camera is looking at */ - math::Vector3f target; + extern math::Vector3f target; /// target yaw, angle in XZ plane, positive is looking left - float yaw_target; + extern float yaw_target; /// target pitch, angle in XZ plane, positive is looking left - float pitch_target; + extern float pitch_target; /// distance from the camera to the target - float distance; + extern float distance; /// current camera mode - Mode mode; + extern Mode mode; -protected: - /// current yaw, angle in XZ plane, positive is looking left - float yaw_current; - /// current pitch, angle in XY, positive is looking up - float pitch_current; - /// default pitch in mode::Track - float pitch_track; - /// default pitch in mode::Overview - float pitch_overview; - /// default offset increment - float offset_inc; -}; +} // namespace camera } // namespace client #endif // __INCLUDED_CLIENT_CAMERA_H__ + -- cgit v1.2.3