Jolt Physics
A multi core friendly Game Physics Engine
|
Settings to be passed with a shape cast. More...
#include <ShapeCast.h>
Public Member Functions | |
JPH_OVERRIDE_NEW_DELETE void | SetBackFaceMode (EBackFaceMode inMode) |
Set the backfacing mode for all shapes. More... | |
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?) More... | |
EBackFaceMode | mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces |
How backfacing convex objects should be treated (should we report starting inside an object and moving out?) More... | |
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. More... | |
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) More... | |
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. More... | |
ECollectFacesMode | mCollectFacesMode = ECollectFacesMode::NoFaces |
If colliding faces should be collected or only the collision point. More... | |
float | mCollisionTolerance = cDefaultCollisionTolerance |
If objects are closer than this distance, they are considered to be colliding (used for GJK) (unit: meter) More... | |
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) More... | |
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. More... | |
Settings to be passed with a shape cast.
|
inline |
Set the backfacing mode for all shapes.
EBackFaceMode ShapeCastSettings::mBackFaceModeConvex = EBackFaceMode::IgnoreBackFaces |
How backfacing convex objects should be treated (should we report starting inside an object and moving out?)
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?)
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)
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.