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;
};