12 #include <glm/glm.hpp>
22 bool update_matrix_ =
true;
25 glm::mat4 camera_matrix_;
26 glm::mat4 ortho_matrix_;
29 Camera(
int screen_width = 1280,
int screen_height = 720);
32 void move(
const glm::vec2 &direction);
33 void zoom(
float factor);
void zoom(float factor)
Zooms the camera by an incremental amount.
Definition: camera.cpp:79
Camera(int screen_width=1280, int screen_height=720)
Creates a camera that looks onto the scene.
Definition: camera.cpp:28
void move(const glm::vec2 &direction)
Moves the camera using a two-dimensional displacement vector to describe the movement.
Definition: camera.cpp:67
void update(Shader &program)
Updates the camera matrix value in the shader program that is passed to it.
Definition: camera.cpp:45