]> git.lizzy.rs Git - dragonblocks3d.git/blob - src/dragonblocks/input_handler.hpp
a311028a7b81592ce5feff1920b117764ab34802
[dragonblocks3d.git] / src / dragonblocks / input_handler.hpp
1 #pragma once
2
3 #include <map>
4 #include "gl.hpp"
5
6 namespace dragonblocks
7 {
8         class Camera;
9         class Window;
10         
11         class InputHandler
12         {
13                 public:
14                 void processInput(double);
15                 void processMouseInput(double);
16                 void processKeyInput(double);
17                 void onMouseMove(double, double, double);
18                 void onKeyPress(double, std::map<int, bool>);
19                 void listenFor(int);
20                 void dontListenFor(int);
21                 
22                 bool pitch_move;
23                 double mouse_sensitivity;               
24                 double yaw, pitch;
25                 double speed;
26                 
27                 InputHandler(Camera *, Window *);
28                 
29                 private:                
30                 Camera *camera;
31                 Window *window;
32                 std::map<int, bool> listened_keys;
33         };
34 }