]> git.localhorst.tv Git - blank.git/blobdiff - src/camera.hpp
place and remove blocks via mouse
[blank.git] / src / camera.hpp
index 1ab086aeb66d257ac3c773f0cf1ae37dc30f6042..3adb800ce344b03da6a2261d5486c2ef4fd58365 100644 (file)
@@ -3,17 +3,17 @@
 
 #include <glm/glm.hpp>
 
-#include "model.hpp"
+#include "controller.hpp"
+#include "geometry.hpp"
 
 
 namespace blank {
 
 class Camera
-: public Model {
+: public FPSController {
 
 public:
        Camera();
-       ~Camera();
 
        Camera(const Camera &) = delete;
        Camera &operator =(const Camera &) = delete;
@@ -28,6 +28,11 @@ public:
        void Aspect(float w, float h);
        void Clip(float near, float far);
 
+       Ray Aim() const;
+
+       const glm::mat4 &Projection() { return projection; }
+       const glm::mat4 &View() { return view; }
+
        void Update(int dt);
 
 private:
@@ -40,6 +45,7 @@ private:
        float far_clip;
 
        glm::mat4 projection;
+       glm::mat4 view;
        glm::mat4 vp;
 
 };