X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgraphics%2Fcamera.hpp;h=9d1953a27a6f74916efa0ca020f22822086b78a3;hb=HEAD;hp=a1660ca75cb2f11cb15720457ad601096fc72176;hpb=dfe661278fe5fd69e821d530d50b78082d19ce54;p=tacos.git diff --git a/src/graphics/camera.hpp b/src/graphics/camera.hpp index a1660ca..9d1953a 100644 --- a/src/graphics/camera.hpp +++ b/src/graphics/camera.hpp @@ -13,17 +13,29 @@ namespace tacos { class Camera { public: - explicit Camera(const glm::vec3 &focus); + Camera(); glm::mat4 View() const noexcept; - void Focus(const glm::vec3 &) noexcept; + /// set focal point to given position + void Warp(const glm::vec3 &position) noexcept { focus = position; } + /// move focal point by given delta + void Move(const glm::vec3 &delta) noexcept; + + /// set distance of camera to focal point + void Distance(float dist) noexcept { distance = dist; } + /// adjust distance of camera to focal point + void BackOff(float delta) noexcept { distance += delta; } + + /// set pitch and yaw + void Orient(const glm::vec2 &orient) noexcept { orientation = orient; } + /// change pitch and yaw + void Rotate(const glm::vec2 &delta) noexcept; private: - const glm::vec3 *focus; + glm::vec3 focus; float distance; - float pitch; - float yaw; + glm::vec2 orientation; };