Class Input¶
Defined in File input.hpp
Class Documentation¶
-
class Input¶
Public Functions
-
Input() = default¶
-
void cursor_position_callback(GLFWwindow *window, double x_pos, double y_pos)¶
Call glfwSetCursorPosCallback.
- Parameters:
window – The window that received the event.
x_pos – The new x-coordinate, in screen coordinates, of the cursor.
y_pos – The new y-coordinate, in screen coordinates, of the cursor.
-
inline GamepadInputData &gamepad_data()¶
-
inline KeyboardMouseInputData &kbm_data()¶
-
void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods)¶
Call glfwSetKeyCallback.
- Parameters:
window – The window that received the event.
key – The keyboard key that was pressed or released.
scancode – The system-specific scancode of the key.
action – GLFW_PRESS, GLFW_RELEASE or GLFW_REPEAT.
mods – Bit field describing which modifier keys were held down.
-
void mouse_button_callback(GLFWwindow *window, int button, int action, int mods)¶
Call glfwSetMouseButtonCallback.
- Parameters:
window – The window that received the event.
button – The mouse button that was pressed or released.
action – One of GLFW_PRESS or GLFW_RELEASE.
mods – Bit field describing which modifier keys were held down.
-
void mouse_scroll_callback(GLFWwindow *window, double x_offset, double y_offset)¶
Call camera’s process_mouse_scroll method.
- Parameters:
window – The window that received the event.
x_offset – The change of x-offset of the mouse wheel.
y_offset – The change of y-offset of the mouse wheel.
-
void update()¶
-
void update_gamepad_data()¶
-
Input() = default¶