summaryrefslogtreecommitdiff
path: root/gfx/manualCameraController.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/manualCameraController.h')
-rw-r--r--gfx/manualCameraController.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gfx/manualCameraController.h b/gfx/manualCameraController.h
index 465f31f..f2141a4 100644
--- a/gfx/manualCameraController.h
+++ b/gfx/manualCameraController.h
@@ -5,12 +5,15 @@
#include "inputHandler.h"
#include <SDL2/SDL.h>
#include <gfx/camera_controller.h>
-#include <optional>
+#include <glm/glm.hpp>
+#include <maths.h>
class Camera;
class ManualCameraController : public CameraController, public InputHandler {
public:
+ explicit ManualCameraController(glm::vec2 f) : focus {f} { }
+
bool handleInput(SDL_Event & e) override;
void tick(TickDuration) override { }
@@ -19,6 +22,8 @@ public:
private:
bool ctrl {false}, mrb {false};
- mutable std::optional<SDL_MouseMotionEvent> motion;
+ glm::vec2 focus;
+ float direction {quarter_pi};
+ float dist {40}, pitch {quarter_pi};
};
#endif