Handle user input through keyboard, mouse and controllers and provide controllable cameras.
The Input manager is keeping track of the internal input state based on all external events. Support for common game controllers is provided through GLFW with a common mapping system. This module also provides simple and interactive cameras for inspecting scenes.
|
class | Camera |
| This class represents a camera as used in real-time rendering APIs. It provides a view and projection matrices, and handles their proper update. More...
|
|
class | ControllableCamera |
| This camera can be controlled through the inputs received from the user. More...
|
|
class | Controller |
| Represents a joystick or any additional controller. More...
|
|
class | GamepadController |
| Represents a controller with a predefined mapping provided by GLFW/SDL. More...
|
|
class | RawController |
| Represents a controller used for debug, where all raw buttons are shown. More...
|
|
class | Input |
| The input manager is responsible for updating the internal input states (keyboard, mouse, window size). It can also be use to query back these states. More...
|
|
|
void | resize_callback (GLFWwindow *window, int width, int height) |
|
void | key_callback (GLFWwindow *window, int key, int scancode, int action, int mods) |
|
void | char_callback (GLFWwindow *window, unsigned int codepoint) |
|
void | mouse_button_callback (GLFWwindow *window, int button, int action, int mods) |
|
void | cursor_pos_callback (GLFWwindow *window, double xpos, double ypos) |
|
void | scroll_callback (GLFWwindow *window, double xoffset, double yoffset) |
|
void | iconify_callback (GLFWwindow *window, int state) |
|
void | joystick_callback (int joy, int event) |
|
◆ char_callback()
void char_callback |
( |
GLFWwindow * |
window, |
|
|
unsigned int |
codepoint |
|
) |
| |
Callback for text characters.
- Parameters
-
window | the GLFW window pointer |
codepoint | the character codepoint |
◆ cursor_pos_callback()
void cursor_pos_callback |
( |
GLFWwindow * |
window, |
|
|
double |
xpos, |
|
|
double |
ypos |
|
) |
| |
Callback for cursor position events.
- Parameters
-
window | the GLFW window pointer |
xpos | the horizontal position of the cursor, in pixels |
ypos | the vertical position of the cursor, in pixels |
- Note
- An event is received at each frame with the current mouse position.
◆ iconify_callback()
void iconify_callback |
( |
GLFWwindow * |
window, |
|
|
int |
state |
|
) |
| |
Callback for window minimizing events.
- Parameters
-
window | the GLFW window pointer |
state | the new state of the window |
◆ joystick_callback()
void joystick_callback |
( |
int |
joy, |
|
|
int |
event |
|
) |
| |
Callback for joystick (de)connection events.
- Parameters
-
joy | the index of the joystick |
event | the event GLFW code |
◆ key_callback()
void key_callback |
( |
GLFWwindow * |
window, |
|
|
int |
key, |
|
|
int |
scancode, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
Callback for key press/release events.
- Parameters
-
window | the GLFW window pointer |
key | the key GLFW code |
scancode | a platform-specific key code |
action | the performed action GLFW code |
mods | the applied modifiers (alt, ctrl,...) GLFW code |
◆ mouse_button_callback()
void mouse_button_callback |
( |
GLFWwindow * |
window, |
|
|
int |
button, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
Callback for mouse buttons press/release events.
- Parameters
-
window | the GLFW window pointer |
button | the button GLFW code |
action | the performed action GLFW code |
mods | the applied modifiers (alt, ctrl,...) GLFW code |
◆ resize_callback()
void resize_callback |
( |
GLFWwindow * |
window, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Callback for window resizing events.
- Parameters
-
window | the GLFW window pointer |
width | the new width of the window |
height | the new height of the window |
◆ scroll_callback()
void scroll_callback |
( |
GLFWwindow * |
window, |
|
|
double |
xoffset, |
|
|
double |
yoffset |
|
) |
| |
Callback for mouse scroll events.
- Parameters
-
window | the GLFW window pointer |
xoffset | the horizontal amount of scrolling |
yoffset | the vertical amount of scrolling |
- Note
- The scroll amounts are in arbitrary units.