SolarSim
Loading...
Searching...
No Matches
solarsim::InputSystem Class Reference

Handles user input processing and mouse/keyboard state management. More...

#include <input_system.hpp>

Public Member Functions

 InputSystem (GLFWwindow *window)
 Construct the input system with a GLFW window.
 ~InputSystem ()
void processInput (float deltaTime)
 Process all input for the current frame.

Private Member Functions

void toggleMouseCapture ()
 Toggle mouse capture/release mode.

Static Private Member Functions

static void scrollCallback (GLFWwindow *window, double xoffset, double yoffset)
 GLFW scroll callback for mouse wheel input.

Private Attributes

bool mouseCaptured = true
bool justCaptured = true
GLFWwindow * m_window

Detailed Description

Handles user input processing and mouse/keyboard state management.

Constructor & Destructor Documentation

◆ InputSystem()

solarsim::InputSystem::InputSystem ( GLFWwindow * window)

Construct the input system with a GLFW window.

Parameters
windowPointer to the GLFW window to capture input from

◆ ~InputSystem()

solarsim::InputSystem::~InputSystem ( )

Member Function Documentation

◆ processInput()

void solarsim::InputSystem::processInput ( float deltaTime)

Process all input for the current frame.

Parameters
deltaTimeTime since last frame in seconds

◆ scrollCallback()

void solarsim::InputSystem::scrollCallback ( GLFWwindow * window,
double xoffset,
double yoffset )
staticprivate

GLFW scroll callback for mouse wheel input.

Parameters
windowGLFW window that received the event
xoffsetHorizontal scroll offset
yoffsetVertical scroll offset
Note
Static method that forwards to instance methods

◆ toggleMouseCapture()

void solarsim::InputSystem::toggleMouseCapture ( )
private

Toggle mouse capture/release mode.

Field Documentation

◆ justCaptured

bool solarsim::InputSystem::justCaptured = true
private

Flag for handling initial capture state

◆ m_window

GLFWwindow* solarsim::InputSystem::m_window
private

GLFW window handle for input processing

◆ mouseCaptured

bool solarsim::InputSystem::mouseCaptured = true
private

Whether mouse is currently captured


The documentation for this class was generated from the following files: