Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-04 18:42:05 +0000
committerStijn Buys <ingar@osirion.org>2008-02-04 18:42:05 +0000
commit151a2ac2434f4b4c23c107d9c21e4a18dd1a3c68 (patch)
tree18154b52b44327de28d82ff187f25c8369ddc5d9 /src/client/camera.h
parent09fb43f3d36847977ac202c10c5a11f34af03a43 (diff)
converted client:: singleton classes to namespaces
Diffstat (limited to 'src/client/camera.h')
-rw-r--r--src/client/camera.h50
1 files changed, 21 insertions, 29 deletions
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__
+