]> git.localhorst.tv Git - blank.git/blobdiff - src/camera.hpp
use player-relative coordinates for rendering
[blank.git] / src / camera.hpp
index 5be71e24295a7142f0bc2db146d1a3f3c2065ea8..22e2ba598fd9f9990e228fda37f43f7878c0ca1f 100644 (file)
@@ -10,12 +10,6 @@ class Camera {
 
 public:
        Camera();
-       ~Camera();
-
-       Camera(const Camera &) = delete;
-       Camera &operator =(const Camera &) = delete;
-
-       glm::mat4 MakeMVP(const glm::mat4 &m) const { return vp * m; }
 
        void Viewport(int width, int height);
        void Viewport(int x, int y, int width, int height);
@@ -25,14 +19,10 @@ 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(); }
-
-       void LookAt(glm::vec3 tgt) { target = tgt; UpdateView(); }
+       const glm::mat4 &Projection() { return projection; }
 
 private:
        void UpdateProjection();
-       void UpdateView();
 
 private:
        float fov;
@@ -40,13 +30,7 @@ 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;
 
 };