Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ContactManifold Class Reference

Manifold class, describes the contact surface between two bodies. More...

#include <ContactListener.h>

Public Member Functions

ContactManifold SwapShapes () const
 Swaps shape 1 and 2. More...
 
RVec3 GetWorldSpaceContactPointOn1 (uint inIndex) const
 Access to the world space contact positions. More...
 
RVec3 GetWorldSpaceContactPointOn2 (uint inIndex) const
 

Public Attributes

RVec3 mBaseOffset
 Offset to which all the contact points are relative. More...
 
Vec3 mWorldSpaceNormal
 Normal for this manifold, direction along which to move body 2 out of collision along the shortest path. More...
 
float mPenetrationDepth
 Penetration depth (move shape 2 by this distance to resolve the collision). If this value is negative, this is a speculative contact point and may not actually result in a velocity change as during solving the bodies may not actually collide. More...
 
SubShapeID mSubShapeID1
 Sub shapes that formed this manifold (note that when multiple manifolds are combined because they're coplanar, we lose some information here because we only keep track of one sub shape pair that we encounter, see description at Body::SetUseManifoldReduction) More...
 
SubShapeID mSubShapeID2
 
ContactPoints mRelativeContactPointsOn1
 Contact points on the surface of shape 1 relative to mBaseOffset. More...
 
ContactPoints mRelativeContactPointsOn2
 Contact points on the surface of shape 2 relative to mBaseOffset. If there's no penetration, this will be the same as mRelativeContactPointsOn1. If there is penetration they will be different. More...
 

Detailed Description

Manifold class, describes the contact surface between two bodies.

Member Function Documentation

◆ GetWorldSpaceContactPointOn1()

RVec3 ContactManifold::GetWorldSpaceContactPointOn1 ( uint  inIndex) const
inline

Access to the world space contact positions.

◆ GetWorldSpaceContactPointOn2()

RVec3 ContactManifold::GetWorldSpaceContactPointOn2 ( uint  inIndex) const
inline

◆ SwapShapes()

ContactManifold ContactManifold::SwapShapes ( ) const
inline

Swaps shape 1 and 2.

Member Data Documentation

◆ mBaseOffset

RVec3 ContactManifold::mBaseOffset

Offset to which all the contact points are relative.

◆ mPenetrationDepth

float ContactManifold::mPenetrationDepth

Penetration depth (move shape 2 by this distance to resolve the collision). If this value is negative, this is a speculative contact point and may not actually result in a velocity change as during solving the bodies may not actually collide.

◆ mRelativeContactPointsOn1

ContactPoints ContactManifold::mRelativeContactPointsOn1

Contact points on the surface of shape 1 relative to mBaseOffset.

◆ mRelativeContactPointsOn2

ContactPoints ContactManifold::mRelativeContactPointsOn2

Contact points on the surface of shape 2 relative to mBaseOffset. If there's no penetration, this will be the same as mRelativeContactPointsOn1. If there is penetration they will be different.

◆ mSubShapeID1

SubShapeID ContactManifold::mSubShapeID1

Sub shapes that formed this manifold (note that when multiple manifolds are combined because they're coplanar, we lose some information here because we only keep track of one sub shape pair that we encounter, see description at Body::SetUseManifoldReduction)

◆ mSubShapeID2

SubShapeID ContactManifold::mSubShapeID2

◆ mWorldSpaceNormal

Vec3 ContactManifold::mWorldSpaceNormal

Normal for this manifold, direction along which to move body 2 out of collision along the shortest path.


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