Sparkle 0.0.1
Loading...
Searching...
No Matches
spk::UpdateEvent Struct Reference

Carries per-frame update timing and input state snapshot. More...

#include <spk_update_event.hpp>

Inheritance diagram for spk::UpdateEvent:
Inheritance graph
Collaboration diagram for spk::UpdateEvent:
Collaboration graph

Static Public Member Functions

static UpdateEvent create (const spk::Mouse *p_mouse, spk::Keyboard *p_keyboard)
 Helper to build an update event from input devices.

Public Attributes

Duration deltaTime {}
 Time elapsed since the previous frame.
const spk::Mousemouse = nullptr
 Snapshot of the mouse state for the frame.
const spk::Keyboardkeyboard = nullptr
 Snapshot of the keyboard state for the frame.
Public Attributes inherited from spk::IEvent
bool isConsumed = false
 Indicates whether the event has been handled.
Timestamp timestamp = spk::TimeUtils::getTime()
 Timestamp when the event was created.

Detailed Description

Carries per-frame update timing and input state snapshot.

Member Function Documentation

◆ create()

UpdateEvent spk::UpdateEvent::create ( const spk::Mouse * p_mouse,
spk::Keyboard * p_keyboard )
static

Helper to build an update event from input devices.

Parameters
p_mouseMouse pointer snapshot.
p_keyboardKeyboard pointer snapshot.
Returns
Populated UpdateEvent.

The documentation for this struct was generated from the following files:
  • includes/structure/system/event/spk_update_event.hpp
  • srcs/structure/system/event/spk_update_event.cpp