summaryrefslogtreecommitdiff
path: root/application/manualCameraController.h
blob: 112ec5c6cef281b3b4dbb981cf61a47ce84193d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef MANUAL_CAMERA_CONTROLLER_H
#define MANUAL_CAMERA_CONTROLLER_H

#include "game/worldobject.h"
#include "inputHandler.h"
#include <SDL2/SDL.h>
#include <gfx/camera_controller.h>
#include <optional>

class Camera;
class Shader;

class ManualCameraController : public CameraController, public InputHandler {
public:
	bool handleInput(SDL_Event & e) override;

	void tick(TickDuration) override { }

	void updateCamera(Camera * camera, Shader * shader) const override;

private:
	bool ctrl {false}, mrb {false};
	mutable std::optional<SDL_MouseMotionEvent> motion;
};
#endif