1 #ifndef BLOBS_GRAPHICS_CAMERA_HPP_
2 #define BLOBS_GRAPHICS_CAMERA_HPP_
16 explicit Camera(const world::Body &) noexcept;
19 Camera(const Camera &) = delete;
20 Camera &operator =(const Camera &) = delete;
22 Camera(Camera &&) = delete;
23 Camera &operator =(Camera &&) = delete;
26 Camera &FOV(float f) noexcept;
27 Camera &Aspect(float r) noexcept;
28 Camera &Aspect(float w, float h) noexcept;
29 Camera &Clip(float near, float far) noexcept;
31 const world::Body &Reference() const noexcept { return *ref; }
32 Camera &Reference(const world::Body &) noexcept;
34 /// standing on given surface, with pos.z being elevation over NN
35 /// looking at given coordinates
36 Camera &FirstPerson(int surface, const glm::vec3 &pos, const glm::vec3 &at) noexcept;
37 /// looking straight down at surface from above
38 Camera &MapView(int surface, const glm::vec3 &pos, float roll = 0.0f) noexcept;
39 /// look at center, position relative to orbital reference plane for children
40 Camera &Orbital(const glm::vec3 &pos) noexcept;
42 const glm::mat4 &Projection() const noexcept { return projection; }
43 const glm::mat4 &View() const noexcept { return view; }
44 glm::mat4 Model(const world::Body &) const noexcept;
47 void UpdateProjection() noexcept;
59 const world::Body *ref;
60 // track reference body's orientation