group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
physics::events Namespace Reference

Classes

struct  TriggerEvent
 One trigger-overlap event. More...

Enumerations

enum class  TriggerEventType : uint8_t { Enter , Stay , Exit }
 Kind of contact event. More...

Functions

void beginTick () noexcept
 Start a fresh per-tick event window.
void pushTriggerEvent (const TriggerEvent &e) noexcept
 Append a trigger event to the current tick's queue.
std::span< const TriggerEventtriggerEvents () noexcept
 Read-only snapshot of all events emitted since beginTick().

Enumeration Type Documentation

◆ TriggerEventType

enum class physics::events::TriggerEventType : uint8_t
strong

Kind of contact event.

Enumerator
Enter 

Entity overlapped a trigger this tick that wasn't overlapping last tick.

Stay 

Overlap persists across ticks (emitted every tick during overlap).

Exit 

Overlap ended this tick.

Function Documentation

◆ beginTick()

void physics::events::beginTick ( )
noexcept

Start a fresh per-tick event window.

Clears the global front buffer and drains every thread-local writer buffer. Must be called once per tick on the main thread BEFORE the trigger / contact systems run. Calling concurrently with pushTriggerEvent is UB.

Here is the caller graph for this function:

◆ pushTriggerEvent()

void physics::events::pushTriggerEvent ( const TriggerEvent & e)
noexcept

Append a trigger event to the current tick's queue.

Thread-safe (per-thread buffer; no locking on the hot path).

Here is the caller graph for this function:

◆ triggerEvents()

std::span< const TriggerEvent > physics::events::triggerEvents ( )
nodiscardnoexcept

Read-only snapshot of all events emitted since beginTick().

Stable until the next beginTick().