diff options
Diffstat (limited to 'src/crepe/api/Camera.h')
-rw-r--r-- | src/crepe/api/Camera.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/crepe/api/Camera.h b/src/crepe/api/Camera.h index e0cda34..137c8ed 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 = {720, 480}; + Vector2 screen = {1080, 720}; - //! X-coordinate of the camera position. - double x = 0.0; - - //! Y-coordinate of the camera position. - double y = 0.0; + //! viewport is the area of the world visible through the camera (in world units) + //Vector2 viewport = {720, 480}; + Vector2 viewport = {2000, 1000}; + //! scale scaling factor from world units to pixel coordinates //! Zoom level of the camera view. - double zoom = 1.0; + double zoom = 1.0f; public: /** |