|
group2 0.1.0
CSE 125 Group 2
|
Classes | |
| struct | Contact |
| A single recorded contact event. More... | |
Enumerations | |
| enum class | ContactSource : uint8_t { PlaneSweep = 0 , BoxSweep = 1 , BrushSweep = 2 , CylinderSweep = 3 , SphereSweep = 4 , TriMeshSweep = 5 , PlaneDepen = 6 , BoxDepen = 7 , BrushDepen = 8 , CylinderDepen = 9 , SphereDepen = 10 , TriMeshDepen = 11 , Count = 12 } |
| Source of a recorded contact, for filter / colour in the overlay. More... | |
Functions | |
| void | pushContact (const Contact &c) noexcept |
| Push a contact event. | |
| void | pushSweepContact (glm::vec3 point, glm::vec3 normal, ContactSource source, uint32_t primitiveIndex=0) noexcept |
| Convenience overload for non-depenetration (sweep) contacts. | |
| void | pushDepenContact (glm::vec3 point, glm::vec3 normal, float depth, ContactSource source, uint32_t primitiveIndex=0) noexcept |
| Convenience overload for depenetration contacts (with depth). | |
| void | setEnabled (bool on) noexcept |
| Enable / disable recording. | |
| bool | isEnabled () noexcept |
| Query the recording flag. Internal fast-path predicate. | |
| void | beginFrame () noexcept |
| Drain all thread-local buffers into the front buffer and clear them. | |
| std::span< const Contact > | contacts () noexcept |
| Snapshot of all contacts pushed since the last beginFrame(). | |
|
strong |
Source of a recorded contact, for filter / colour in the overlay.
|
noexcept |
Drain all thread-local buffers into the front buffer and clear them.
MUST be called exactly once per rendered frame from the main thread, BEFORE the next physics step starts. Calling concurrently with pushContact is UB.
|
nodiscardnoexcept |
Snapshot of all contacts pushed since the last beginFrame().
Stable until the next beginFrame(). Read-only.
|
nodiscardnoexcept |
Query the recording flag. Internal fast-path predicate.
|
noexcept |
Push a contact event.
No-op when isEnabled() is false. Thread-safe: each thread accumulates into its own thread-local buffer.
|
noexcept |
Convenience overload for depenetration contacts (with depth).
|
noexcept |
Convenience overload for non-depenetration (sweep) contacts.
|
noexcept |
Enable / disable recording.
When disabled, pushContact is a single relaxed atomic load + branch. Idempotent.