summaryrefslogtreecommitdiff
path: root/gfx/followCameraController.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/followCameraController.h')
-rw-r--r--gfx/followCameraController.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/gfx/followCameraController.h b/gfx/followCameraController.h
new file mode 100644
index 0000000..d57b59f
--- /dev/null
+++ b/gfx/followCameraController.h
@@ -0,0 +1,24 @@
+#ifndef FOLLOW_CAMERA_CONTROLLER_H
+#define FOLLOW_CAMERA_CONTROLLER_H
+
+#include "game/worldobject.h"
+#include <game/vehicles/vehicle.h>
+#include <gfx/camera_controller.h>
+
+class Camera;
+class Shader;
+
+class FollowCameraController : public CameraController {
+public:
+ enum class Mode { Pan, Ride, ISO };
+ explicit FollowCameraController(VehicleWPtr, Mode = Mode::Pan);
+
+ void tick(TickDuration) override { }
+
+ void updateCamera(Camera * camera, Shader * shader) const override;
+
+private:
+ VehicleWPtr target;
+ Mode mode;
+};
+#endif