![]() |
AireEngine
A 3D Open-World Game Engine
|
A class that handles I/O events. More...
#include <ioHandler.h>

Public Member Functions | |
| IOHandler () | |
| Construct a default IO handler. | |
| void | handlePolledState () |
| void | handleKeyCb (int key, int scancode, int action, int mods) |
| void | handleScrollCb (double xOffset, double yOffset) |
| void | handleCursorPosCb (double xPos, double yPos) |
Public Attributes | |
| Window * | window |
| bool | debug = false |
| bool | pause = false |
A class that handles I/O events.
Handle cursor movement event. It is responsibility of the window system to call this at the right time. GLFW-compliant interface.
| xPos | Position of the cursor in screen coordinates along the x axis |
| yPos | Position of the cursor in screen coordinates along the y axis |
Handle key event. It is responsibility of the window system to call this at the right time. GLFW-compliant interface.
| key | Key that triggered the event. Key code is GLFW-specific. |
| scancode | System-specific scancode of the key. |
| action | Either GLFW_PRESS, GLFW_RELEASE, or GLFW_REPEAT. |
| mods | Bit field describing which modifier keys are held down. |

| void IOHandler::handlePolledState | ( | ) |
Takes actions based on the polled key states. It is responsibility of the window system to call this after polling.

Handle scroll event. It is responsibility of the window system to call this at the right time. GLFW-compliant interface.
| xOffset | Scroll offset along the x axis |
| yOffset | Scroll offset along the y axis |