group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
CollisionEvents.hpp File Reference

Per-tick collision-event queue. More...

#include "ecs/registry/Registry.hpp"
#include <cstdint>
#include <entt/entt.hpp>
#include <glm/vec3.hpp>
#include <span>
Include dependency graph for CollisionEvents.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  physics::events::TriggerEvent
 One trigger-overlap event. More...

Namespaces

namespace  physics
 Pure physics math — no ECS types, no registry.
namespace  physics::events

Enumerations

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

Functions

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

Detailed Description

Per-tick collision-event queue.

Drained by gameplay code each tick; populated by the trigger subsystem (and, later, by the rigid-body contact solver in Phase 9).

The queue is thread-local on the write side (so parallel kernels that emit events don't contend), and merged into a single per-tick frontbuffer by beginTick(). Same architecture as physics::debug so determinism is preserved: events are written in entity-id order from a single thread, or merged after a sim step in stable iteration order.