|
group2 0.1.0
CSE 125 Group 2
|
Per-tick collision-event queue. More...
#include "ecs/registry/Registry.hpp"#include <cstdint>#include <entt/entt.hpp>#include <glm/vec3.hpp>#include <span>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 TriggerEvent > | physics::events::triggerEvents () noexcept |
| Read-only snapshot of all events emitted since beginTick(). | |
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.