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

Settings to be passed with a shape cast. More...

#include <ShapeCast.h>

Inheritance diagram for ShapeCastSettings:
CollideSettingsBase

Public Member Functions

JPH_OVERRIDE_NEW_DELETE void SetBackFaceMode (EBackFaceMode inMode)
 Set the backfacing mode for all shapes.
 

Public Attributes

EBackFaceMode mBackFaceModeTriangles = EBackFaceMode::IgnoreBackFaces
 How backfacing triangles should be treated (should we report moving from back to front for triangle based shapes, e.g. for MeshShape/HeightFieldShape?)
 
EBackFaceMode mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces
 How backfacing convex objects should be treated (should we report starting inside an object and moving out?)
 
bool mUseShrunkenShapeAndConvexRadius = false
 Indicates if we want to shrink the shape by the convex radius and then expand it again. This speeds up collision detection and gives a more accurate normal at the cost of a more 'rounded' shape.
 
bool mReturnDeepestPoint = false
 When true, and the shape is intersecting at the beginning of the cast (fraction = 0) then this will calculate the deepest penetration point (costing additional CPU time)
 
- Public Attributes inherited from CollideSettingsBase
JPH_OVERRIDE_NEW_DELETE EActiveEdgeMode mActiveEdgeMode = EActiveEdgeMode::CollideOnlyWithActive
 How active edges (edges that a moving object should bump into) are handled.
 
ECollectFacesMode mCollectFacesMode = ECollectFacesMode::NoFaces
 If colliding faces should be collected or only the collision point.
 
float mCollisionTolerance = cDefaultCollisionTolerance
 If objects are closer than this distance, they are considered to be colliding (used for GJK) (unit: meter)
 
float mPenetrationTolerance = cDefaultPenetrationTolerance
 A factor that determines the accuracy of the penetration depth calculation. If the change of the squared distance is less than tolerance * current_penetration_depth^2 the algorithm will terminate. (unit: dimensionless)
 
Vec3 mActiveEdgeMovementDirection = Vec3::sZero()
 When mActiveEdgeMode is CollideOnlyWithActive a movement direction can be provided. When hitting an inactive edge, the system will select the triangle normal as penetration depth only if it impedes the movement less than with the calculated penetration depth.
 

Detailed Description

Settings to be passed with a shape cast.

Member Function Documentation

◆ SetBackFaceMode()

JPH_OVERRIDE_NEW_DELETE void ShapeCastSettings::SetBackFaceMode ( EBackFaceMode  inMode)
inline

Set the backfacing mode for all shapes.

Member Data Documentation

◆ mBackFaceModeConvex

EBackFaceMode ShapeCastSettings::mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces

How backfacing convex objects should be treated (should we report starting inside an object and moving out?)

◆ mBackFaceModeTriangles

EBackFaceMode ShapeCastSettings::mBackFaceModeTriangles = EBackFaceMode::IgnoreBackFaces

How backfacing triangles should be treated (should we report moving from back to front for triangle based shapes, e.g. for MeshShape/HeightFieldShape?)

◆ mReturnDeepestPoint

bool ShapeCastSettings::mReturnDeepestPoint = false

When true, and the shape is intersecting at the beginning of the cast (fraction = 0) then this will calculate the deepest penetration point (costing additional CPU time)

◆ mUseShrunkenShapeAndConvexRadius

bool ShapeCastSettings::mUseShrunkenShapeAndConvexRadius = false

Indicates if we want to shrink the shape by the convex radius and then expand it again. This speeds up collision detection and gives a more accurate normal at the cost of a more 'rounded' shape.


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