GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::ContactManifold< N > Struct Template Reference

Set of points on the contact surface between two potentially colliding objects. More...

#include <GREM/physics/collision.hpp>

Public Types

using PointMask = BitArray<MAX_POINT_COUNT>
 Bitset of point indices in a manifold.

Public Attributes

Pair< ContactFeatureType > featureTypes
 Ordered pair of feature types in contact on the objects.
Pair< uint32_t > featureIndices
 Ordered pair of feature indices in contact on the objects, or an unspecified value if there is no specific index given the corresponding feature type.
InplaceArrayList< ContactPoint< N >, MAX_POINT_COUNT > points
 Set of active contact points.
Direction< N > normal
 Unit vector perpendicular to the separating plane of the collision, pointing away from the surface of the first object and towards the surface of the second object, in world space.
AngularMomentum< N > rollingResistanceMomentum {}
 Total rolling resistance momentum of this contact manifold in world space.
AngularImpulse< N > rollingResistanceImpulse {}
 Total rolling resistance impulse applied to this contact manifold in world space in the last simulation step.
CollisionFilterTestResult filterTestResult
 Result of the collision filter test that generated the manifold.

Static Public Attributes

static constexpr size_t MAX_POINT_COUNT = (N == 3) ? 4 : 2
 Maximum number of contact points in a single manifold.

Detailed Description

template<size_t N>
struct grem::physics::ContactManifold< N >

Set of points on the contact surface between two potentially colliding objects.

Template Parameters
Nnumber of dimensions of the world space (must be 2 or 3).

Member Typedef Documentation

◆ PointMask

template<size_t N>
using grem::physics::ContactManifold< N >::PointMask = BitArray<MAX_POINT_COUNT>

Bitset of point indices in a manifold.

Member Data Documentation

◆ MAX_POINT_COUNT

template<size_t N>
size_t grem::physics::ContactManifold< N >::MAX_POINT_COUNT = (N == 3) ? 4 : 2
staticconstexpr

Maximum number of contact points in a single manifold.

◆ featureTypes

template<size_t N>
Pair<ContactFeatureType> grem::physics::ContactManifold< N >::featureTypes

Ordered pair of feature types in contact on the objects.

See also
featureIndices

◆ featureIndices

template<size_t N>
Pair<uint32_t> grem::physics::ContactManifold< N >::featureIndices

Ordered pair of feature indices in contact on the objects, or an unspecified value if there is no specific index given the corresponding feature type.

See also
featureTypes

◆ points

Set of active contact points.

◆ normal

template<size_t N>
Direction<N> grem::physics::ContactManifold< N >::normal

Unit vector perpendicular to the separating plane of the collision, pointing away from the surface of the first object and towards the surface of the second object, in world space.

◆ rollingResistanceMomentum

template<size_t N>
AngularMomentum<N> grem::physics::ContactManifold< N >::rollingResistanceMomentum {}

Total rolling resistance momentum of this contact manifold in world space.

Note
If the contact was inactive in the last simulation step, this value will not be up-to-date.

◆ rollingResistanceImpulse

template<size_t N>
AngularImpulse<N> grem::physics::ContactManifold< N >::rollingResistanceImpulse {}

Total rolling resistance impulse applied to this contact manifold in world space in the last simulation step.

Note
If the contact was inactive in the last simulation step, this value will not be up-to-date.

◆ filterTestResult

template<size_t N>
CollisionFilterTestResult grem::physics::ContactManifold< N >::filterTestResult

Result of the collision filter test that generated the manifold.


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