]> git.localhorst.tv Git - tacos.git/blob - src/graphics/camera.hpp
basic floor idea
[tacos.git] / src / graphics / camera.hpp
1 #ifndef TACOS_GRAPHICS_CAMERA_HPP_
2 #define TACOS_GRAPHICS_CAMERA_HPP_
3
4 #include <glm/glm.hpp>
5
6
7 namespace tacos {
8
9 /// Camera is facing a focus point. Its position is determined by
10 /// displacing said focus point by a distance in the direction indicated
11 /// by pitch and yaw.
12 /// The up direction is fixed to positive Y.
13 class Camera {
14
15 public:
16         explicit Camera(const glm::vec3 &focus);
17
18         glm::mat4 View() const noexcept;
19
20         void Focus(const glm::vec3 &) noexcept;
21
22 private:
23         const glm::vec3 *focus;
24         float distance;
25         float pitch;
26         float yaw;
27
28 };
29
30 }
31
32 #endif