diff options
Diffstat (limited to 'src/crepe/api/Camera.h')
-rw-r--r-- | src/crepe/api/Camera.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/crepe/api/Camera.h b/src/crepe/api/Camera.h index e0cda34..d7292ef 100644 --- a/src/crepe/api/Camera.h +++ b/src/crepe/api/Camera.h @@ -2,6 +2,7 @@ #include "Color.h" #include "Component.h" +#include "api/Vector2.h" namespace crepe { @@ -27,20 +28,20 @@ public: //! Background color of the camera view. Color bg_color; - //! Aspect ratio height for the camera. - double aspect_height = 480; + //! pos The position of the camera in world units + Vector2 pos = {0, 0}; - //! Aspect ratio width for the camera. - double aspect_width = 640; + //! screen the display size in pixels ( output resolution ) + Vector2 screen = {640, 480}; - //! X-coordinate of the camera position. - double x = 0.0; + //! viewport is the area of the world visible through the camera (in world units) + Vector2 viewport = {500, 500}; - //! Y-coordinate of the camera position. - double y = 0.0; + //! scale scaling factor from world units to pixel coordinates + Vector2 scale = {0, 0}; //! Zoom level of the camera view. - double zoom = 1.0; + double zoom = 1.0f; public: /** |