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
5
namespace
solarsim
{
9
class
InputSystem
{
10
public
:
15
InputSystem
(GLFWwindow* window);
16
~InputSystem
();
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
}
solarsim::InputSystem::mouseCaptured
bool mouseCaptured
Definition
input_system.hpp:29
solarsim::InputSystem::scrollCallback
static void scrollCallback(GLFWwindow *window, double xoffset, double yoffset)
GLFW scroll callback for mouse wheel input.
Definition
input_system.cpp:141
solarsim::InputSystem::InputSystem
InputSystem(GLFWwindow *window)
Construct the input system with a GLFW window.
Definition
input_system.cpp:14
solarsim::InputSystem::~InputSystem
~InputSystem()
Definition
input_system.cpp:21
solarsim::InputSystem::justCaptured
bool justCaptured
Definition
input_system.hpp:31
solarsim::InputSystem::toggleMouseCapture
void toggleMouseCapture()
Toggle mouse capture/release mode.
Definition
input_system.cpp:156
solarsim::InputSystem::processInput
void processInput(float deltaTime)
Process all input for the current frame.
Definition
input_system.cpp:23
solarsim::InputSystem::m_window
GLFWwindow * m_window
Definition
input_system.hpp:33
solarsim
Definition
engine.cpp:23
include
systems
input_system.hpp
Generated by
1.15.0