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

Configuration options for a collision algorithm. More...

#include <GREM/physics/collision.hpp>

Public Attributes

Distance collisionDistanceErrorTolerance = Scalar{0.0001} * METERS
 Maximum error in collision distance to allow in favor of improved performance and/or stability.
Distance maxCollisionTouchingDistance = Scalar{0.01} * METERS
 Maximum separation distance of a contact point before it is considered to no longer be touching.
Distance gjkRaycastMargin = Scalar{0.0001} * METERS
 Margin to use around shapes when performing Gilbert-Johnson-Keerthi-based raycasts/shapecasts.
Distance biasFaceOverEdge = Scalar{0.00001} * METERS
 Bias distance factor that determines by how much face contacts are preferred over edge contacts in convex polytope collisions.
Length1D biasReferenceFaceBOverA = Scalar{0.00001} * METERS
 Bias distance factor that determines by how much the second face is preferred to be chosen as the reference face in a face contact in convex polytope collisions.
size_t maxGJKIterationCount = 16
 Maximum number of iterations to run per query of the Gilbert-Johnson-Keerthi algorithm before bailing out.
size_t maxGJKRaycastIterationCount = 256
 Maximum number of iterations to run per query of the Gilbert-Johnson-Keerthi-based raycast/shapecast algorithm before bailing out.
size_t maxEPAIterationCount = 16
 Maximum number of iterations to run per query of the Expanding Polytope Algorithm before bailing out.

Detailed Description

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

Configuration options for a collision algorithm.

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

Member Data Documentation

◆ collisionDistanceErrorTolerance

template<size_t N>
Distance grem::physics::CollisionAlgorithmOptions< N >::collisionDistanceErrorTolerance = Scalar{0.0001} * METERS

Maximum error in collision distance to allow in favor of improved performance and/or stability.

Warning
Must be greater than or equal to Distance::MACHINE_EPSILON.

◆ maxCollisionTouchingDistance

template<size_t N>
Distance grem::physics::CollisionAlgorithmOptions< N >::maxCollisionTouchingDistance = Scalar{0.01} * METERS

Maximum separation distance of a contact point before it is considered to no longer be touching.

Warning
Must be non-negative.

◆ gjkRaycastMargin

template<size_t N>
Distance grem::physics::CollisionAlgorithmOptions< N >::gjkRaycastMargin = Scalar{0.0001} * METERS

Margin to use around shapes when performing Gilbert-Johnson-Keerthi-based raycasts/shapecasts.

Warning
Must be non-negative.

◆ biasFaceOverEdge

template<size_t N>
Distance grem::physics::CollisionAlgorithmOptions< N >::biasFaceOverEdge = Scalar{0.00001} * METERS

Bias distance factor that determines by how much face contacts are preferred over edge contacts in convex polytope collisions.

Warning
Must be non-negative.

◆ biasReferenceFaceBOverA

template<size_t N>
Length1D grem::physics::CollisionAlgorithmOptions< N >::biasReferenceFaceBOverA = Scalar{0.00001} * METERS

Bias distance factor that determines by how much the second face is preferred to be chosen as the reference face in a face contact in convex polytope collisions.

◆ maxGJKIterationCount

template<size_t N>
size_t grem::physics::CollisionAlgorithmOptions< N >::maxGJKIterationCount = 16

Maximum number of iterations to run per query of the Gilbert-Johnson-Keerthi algorithm before bailing out.

◆ maxGJKRaycastIterationCount

template<size_t N>
size_t grem::physics::CollisionAlgorithmOptions< N >::maxGJKRaycastIterationCount = 256

Maximum number of iterations to run per query of the Gilbert-Johnson-Keerthi-based raycast/shapecast algorithm before bailing out.

◆ maxEPAIterationCount

template<size_t N>
size_t grem::physics::CollisionAlgorithmOptions< N >::maxEPAIterationCount = 16

Maximum number of iterations to run per query of the Expanding Polytope Algorithm before bailing out.


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