SolarSim
Loading...
Searching...
No Matches
input_system.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <GLFW/glfw3.h>
4
5namespace solarsim {
9 class InputSystem {
10 public:
15 InputSystem(GLFWwindow* window);
17
22 void processInput(float deltaTime);
23 private:
27 void toggleMouseCapture();
29 bool mouseCaptured = true;
31 bool justCaptured = true;
33 GLFWwindow* m_window;
34
43 static void scrollCallback(GLFWwindow* window, double xoffset, double yoffset);
44 };
45}
bool mouseCaptured
Definition input_system.hpp:29
static void scrollCallback(GLFWwindow *window, double xoffset, double yoffset)
GLFW scroll callback for mouse wheel input.
Definition input_system.cpp:141
InputSystem(GLFWwindow *window)
Construct the input system with a GLFW window.
Definition input_system.cpp:14
~InputSystem()
Definition input_system.cpp:21
bool justCaptured
Definition input_system.hpp:31
void toggleMouseCapture()
Toggle mouse capture/release mode.
Definition input_system.cpp:156
void processInput(float deltaTime)
Process all input for the current frame.
Definition input_system.cpp:23
GLFWwindow * m_window
Definition input_system.hpp:33
Definition engine.cpp:23