4 #include <glm/gtc/matrix_transform.hpp> 15 float m_Rotation = 0.0f;
17 glm::mat4 m_ProjectionMatrix;
18 glm::mat4 m_ViewMatrix;
19 glm::mat4 m_ViewProjectionMatrix;
32 void setPosition(
const glm::vec3& pos) { m_Position = pos; updateViewMatrix(); }
36 void setRotaion(
float rot) { m_Rotation = rot; updateViewMatrix(); }
50 void updateViewMatrix();
void update()
Updates the camera.
Definition: camera2d.cpp:11
const glm::mat4 & getProjectionViewMatrix() const
Gets the View * Projection matrix.
Definition: camera2d.h:48
Camera2D(glm::mat4 projection)
Creates a camera by taking in a projection matrix.
Definition: camera2d.cpp:5
void setRotaion(float rot)
Sets the rotation of the camera.
Definition: camera2d.h:36
const glm::mat4 & getViewMatrix() const
Gets the view matrix of the camera.
Definition: camera2d.h:46
Definition: audioclip.cpp:3
const glm::vec3 & getPosition() const
Gets the position of the camera in the world.
Definition: camera2d.h:39
const glm::mat4 & getProjectionMatrix() const
Gets the projection matrix with which the camera is rendering the scene.
Definition: camera2d.h:44
The eye of the 2D world.
Definition: camera2d.h:11
void setPosition(const glm::vec3 &pos)
Sets the position of the camera.
Definition: camera2d.h:32
const float getRotation() const
Gets the rotation of the camera in the world.
Definition: camera2d.h:41