]> git.localhorst.tv Git - blank.git/blobdiff - src/camera.hpp
remove unused (explicit) destructors
[blank.git] / src / camera.hpp
index 5be71e24295a7142f0bc2db146d1a3f3c2065ea8..3adb800ce344b03da6a2261d5486c2ef4fd58365 100644 (file)
@@ -3,14 +3,17 @@
 
 #include <glm/glm.hpp>
 
+#include "controller.hpp"
+#include "geometry.hpp"
+
 
 namespace blank {
 
-class Camera {
+class Camera
+: public FPSController {
 
 public:
        Camera();
-       ~Camera();
 
        Camera(const Camera &) = delete;
        Camera &operator =(const Camera &) = delete;
@@ -25,14 +28,15 @@ public:
        void Aspect(float w, float h);
        void Clip(float near, float far);
 
-       void Position(glm::vec3 pos) { position = pos; UpdateView(); }
-       void Move(glm::vec3 delta) { position += delta; UpdateView(); }
+       Ray Aim() const;
+
+       const glm::mat4 &Projection() { return projection; }
+       const glm::mat4 &View() { return view; }
 
-       void LookAt(glm::vec3 tgt) { target = tgt; UpdateView(); }
+       void Update(int dt);
 
 private:
        void UpdateProjection();
-       void UpdateView();
 
 private:
        float fov;
@@ -40,10 +44,6 @@ private:
        float near_clip;
        float far_clip;
 
-       glm::vec3 position;
-       glm::vec3 target;
-       glm::vec3 up;
-
        glm::mat4 projection;
        glm::mat4 view;
        glm::mat4 vp;