6 #include <GLFW/glfw3.h>
19 static std::map<int, int> keys_to_actions;
20 static std::map<int, int> mouse_buttons_to_actions;
21 static glm::dvec2 cursor_position;
22 static glm::dvec2 scroll_offset;
23 static bool cursor_entered;
24 static bool cursor_left;
25 static std::queue<unsigned char> character_typed_buffer;
26 static bool key_input_suspended;
28 std::map<int, int> last_keys_to_actions;
29 std::map<int, int> last_mouse_buttons_to_actions;
31 glm::mat4 camera_transform_matrix;
32 glm::mat4 projection_matrix;
36 float viewport_height;
38 static void keyCallback(GLFWwindow* window,
int key,
int scan_code,
int action,
int mods);
39 static void characterCallback(GLFWwindow* window,
unsigned int key);
40 static void cursorPositionCallback(GLFWwindow* window,
double x_pos,
double y_pos);
41 static void cursorEnterCallback(GLFWwindow* window,
int entered);
42 static void mouseButtonCallback(GLFWwindow* window,
int button,
int action,
int mods);
43 static void mouseScrollCallback(GLFWwindow* window,
double x_offset,
double y_offset);
56 InputSystem(GLFWwindow* window,
float viewport_width,
float viewport_height, glm::mat4 camera_transform_matrix, glm::mat4 projection_matrix);
62 virtual void onNotifyNow(std::shared_ptr<Events::Event> event)
override;
Class for a subject that an observer would observe for changes.
Definition: subject.h:13
Interface to be notified of an item's changes.
Definition: observer.h:13