$darkmode
Functions | |
| void | camera_input_handle_key (Camera *cam, int key, int action) |
| Processes a keyboard event to update camera movement flags. More... | |
| void | camera_input_handle_mouse (Camera *cam, double xpos, double ypos) |
| Processes a mouse movement event to update camera orientation. More... | |
| void | camera_input_handle_scroll (Camera *cam, double yoffset) |
| Processes a scroll event to adjust camera speed or zoom. More... | |
| void camera_input_handle_key | ( | Camera * | cam, |
| int | key, | ||
| int | action | ||
| ) |
Processes a keyboard event to update camera movement flags.
Maps specific keys (W, A, S, D, Q, E) to camera movement directions.
| cam | Pointer to the Camera instance. |
| key | The key code (e.g., GLFW_KEY_W). |
| action | The key action (e.g., GLFW_PRESS, GLFW_RELEASE). |
| void camera_input_handle_mouse | ( | Camera * | cam, |
| double | xpos, | ||
| double | ypos | ||
| ) |
Processes a mouse movement event to update camera orientation.
Calculates the delta from the last known position stored in the Camera struct and applies rotation (yaw/pitch).
| cam | Pointer to the Camera instance. |
| xpos | The current absolute X coordinate of the mouse. |
| ypos | The current absolute Y coordinate of the mouse. |