diff options
Diffstat (limited to 'src/render/camera.h')
-rw-r--r-- | src/render/camera.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/render/camera.h b/src/render/camera.h index db2db42..b19521e 100644 --- a/src/render/camera.h +++ b/src/render/camera.h @@ -46,8 +46,15 @@ public: /// progress the camera static void frame(float elapsed); - /// draw the OpenGL camera transformation - static void draw(); + /// enable frustum projection + /** The frustum projection is used to draw the world + */ + static void frustum(); + + /// enable orthographic projection + /** The ortographic projetion is used to draw the user interface + */ + static void ortho(); /// set target direction static void set_direction(float direction); @@ -64,8 +71,8 @@ public: /// set specified camera mode static void set_mode(Mode newmode); - /// set camera aspect ratio - static void set_aspect(int width, int height); + /// resize camera + static void resize(int width, int height); /// current frustum front static float frustum_front(); @@ -73,6 +80,10 @@ public: /// current frustum size (height); static float frustum_size(); + inline static int width() { return camera_width; } + + inline static int height() { return camera_height; } + private: static math::Vector3f camera_eye; static math::Vector3f camera_target; @@ -81,6 +92,8 @@ private: static float camera_aspect; static float camera_frustum_size; static float camera_frustum_front; + static int camera_width; + static int camera_height; // current and target yaw angle in XZ plane, positive is looking left static float direction_current; |