1 #ifndef BLANK_CAMERA_HPP_
2 #define BLANK_CAMERA_HPP_
17 Camera(const Camera &) = delete;
18 Camera &operator =(const Camera &) = delete;
20 glm::mat4 MakeMVP(const glm::mat4 &m) const { return vp * m; }
22 void Viewport(int width, int height);
23 void Viewport(int x, int y, int width, int height);
27 void Aspect(float w, float h);
28 void Clip(float near, float far);
30 void Position(glm::vec3 pos) { model.Position(pos); UpdateView(); }
31 void Move(glm::vec3 delta) { model.Move(delta); UpdateView(); }
33 // all angles in radians (full circle = 2π)
34 float Pitch() const { return model.Pitch(); }
35 void Pitch(float p) { model.Pitch(p); UpdateView(); }
36 void RotatePitch(float delta) { model.RotatePitch(delta); UpdateView(); }
37 float Yaw() const { return model.Yaw(); }
38 void Yaw(float y) { model.Yaw(y); UpdateView(); }
39 void RotateYaw(float delta) { model.RotateYaw(delta); UpdateView(); }
42 void UpdateProjection();