vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::TrackedPair Struct Reference

Two colliders touching on a live tick, as the contact events track them across ticks. More...

#include <physics_internal.h>

Static Public Member Functions

static bool before (const TrackedPair &x, const TrackedPair &y)
 The order tracked pairs are kept and reported in: slot pair, generation, trigger flags.

Public Attributes

EntityId a
 The lower slot.
bool aTrigger = false
 a's collider is a trigger
bool bTrigger = false
 b's collider is a trigger
glm::vec3 point = glm::vec3(0.0f)
 The event's representative contact.
glm::vec3 normal = glm::vec3(0.0f, 1.0f, 0.0f)
 That contact's normal, a -> b.

Detailed Description

Two colliders touching on a live tick, as the contact events track them across ticks.

Not the solver's ContactCache: a trigger pair is never cached, and a contact ended by a destroyed entity must name it, generation included, where the cache's slot key names the slot's next owner.

Member Function Documentation

◆ before()

bool Vkm::Engine::TrackedPair::before ( const TrackedPair & x,
const TrackedPair & y )
inlinestatic

The order tracked pairs are kept and reported in: slot pair, generation, trigger flags.

A function of the world alone, so every machine reports the same order. Pairs neither of which comes first are the same contact.

Parameters
xThe pair that may come first.
yThe pair compared with.
Returns
True when x comes before y.

The documentation for this struct was generated from the following file: