X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FCamera.hpp;h=a3a9e577a8a5dd5cbfadbf0a405a76abb45c38b5;hb=refs%2Fheads%2Fmaster;hp=736020da8b491efa9ea39f9d4c3ecdef9276f8f2;hpb=e0180e01f4c659c97973f585fea5eb3344254ce0;p=blobs.git diff --git a/src/graphics/Camera.hpp b/src/graphics/Camera.hpp index 736020d..a3a9e57 100644 --- a/src/graphics/Camera.hpp +++ b/src/graphics/Camera.hpp @@ -5,9 +5,6 @@ namespace blobs { -namespace creature { - class Creature; -} namespace world { class Body; } @@ -34,19 +31,15 @@ public: const world::Body &Reference() const noexcept { return *ref; } Camera &Reference(const world::Body &) noexcept; - /// standing on given surface, with pos.z being elevation over NN - /// looking at given coordinates - Camera &FirstPerson(int surface, const glm::vec3 &pos, const glm::vec3 &at) noexcept; - /// looking straight down at surface from above - Camera &MapView(int surface, const glm::vec3 &pos, float roll = 0.0f) noexcept; - /// look at center, position relative to orbital reference plane for children - Camera &Orbital(const glm::vec3 &pos) noexcept; - /// look at creature from above - Camera &TopDown(const creature::Creature &, float distance, float roll = 0.0f); + Camera &LookAt(const glm::vec3 &pos, const glm::vec3 &tgt, const glm::vec3 &up) noexcept; + + /// track orientation of reference body + void TrackOrientation(bool b = true) noexcept { track_orient = b; } const glm::mat4 &Projection() const noexcept { return projection; } const glm::mat4 &View() const noexcept { return view; } glm::mat4 Model(const world::Body &) const noexcept; + glm::mat4 Universe() const noexcept; private: void UpdateProjection() noexcept;