]> git.localhorst.tv Git - blank.git/blob - src/camera.hpp
added distance fog
[blank.git] / src / camera.hpp
1 #ifndef BLANK_CAMERA_HPP_
2 #define BLANK_CAMERA_HPP_
3
4 #include <glm/glm.hpp>
5
6
7 namespace blank {
8
9 class Camera {
10
11 public:
12         Camera();
13
14         void Viewport(int width, int height);
15         void Viewport(int x, int y, int width, int height);
16
17         void FOV(float f);
18         void Aspect(float r);
19         void Aspect(float w, float h);
20         void Clip(float near, float far);
21
22         const glm::mat4 &Projection() { return projection; }
23
24 private:
25         void UpdateProjection();
26
27 private:
28         float fov;
29         float aspect;
30         float near_clip;
31         float far_clip;
32
33         glm::mat4 projection;
34
35 };
36
37 }
38
39 #endif