diff options
Diffstat (limited to 'include/YAGE/camera2d.hpp')
-rw-r--r-- | include/YAGE/camera2d.hpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/include/YAGE/camera2d.hpp b/include/YAGE/camera2d.hpp index 4c44ccaf..077d0544 100644 --- a/include/YAGE/camera2d.hpp +++ b/include/YAGE/camera2d.hpp @@ -14,27 +14,25 @@ #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> -namespace yage -{ +namespace yage { -class Camera2D -{ +class Camera2D { private: - bool matrix_needs_update_=true; - float scale_=1; + bool matrix_needs_update_ = true; + float scale_ = 1; glm::vec2 position_; glm::mat4 camera_matrix_; glm::mat4 ortho_matrix_; public: - Camera2D(int screen_width=1280, int screen_height=720); + Camera2D(int screen_width = 1280, int screen_height = 720); // update camera location - void update(GlslProgram &program); + void update(GlslProgram& program); // camera movement - void move(const glm::vec2 &direction); + void move(const glm::vec2& direction); }; -} // yage +} // yage #endif |