ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This class is used to compute the narrow-phase collision detection between a capsule and a convex polyhedron. More...
#include <include/reactphysics3d/collision/narrowphase/CapsuleVsConvexPolyhedronAlgorithm.h>
Public Member Functions | |
CapsuleVsConvexPolyhedronAlgorithm ()=default | |
Constructor. | |
virtual | ~CapsuleVsConvexPolyhedronAlgorithm () override=default |
Destructor. | |
CapsuleVsConvexPolyhedronAlgorithm (const CapsuleVsConvexPolyhedronAlgorithm &algorithm)=delete | |
Deleted copy-constructor. | |
CapsuleVsConvexPolyhedronAlgorithm & | operator= (const CapsuleVsConvexPolyhedronAlgorithm &algorithm)=delete |
Deleted assignment operator. | |
bool | testCollision (NarrowPhaseInfoBatch &narrowPhaseInfoBatch, uint32 batchStartIndex, uint32 batchNbItems, bool clipWithPreviousAxisIfStillColliding, MemoryAllocator &memoryAllocator) |
Compute the narrow-phase collision detection between a capsule and a polyhedron. | |
Public Member Functions inherited from reactphysics3d::NarrowPhaseAlgorithm | |
NarrowPhaseAlgorithm ()=default | |
Constructor. | |
virtual | ~NarrowPhaseAlgorithm ()=default |
Destructor. | |
NarrowPhaseAlgorithm (const NarrowPhaseAlgorithm &algorithm)=delete | |
Deleted copy-constructor. | |
NarrowPhaseAlgorithm & | operator= (const NarrowPhaseAlgorithm &algorithm)=delete |
Deleted assignment operator. | |
This class is used to compute the narrow-phase collision detection between a capsule and a convex polyhedron.
The capsule is basically a line segment with a margin around it. First we run the GJK algorithm. If GJK reports separation, we are done. If the objects overlap inside the capsule margin (radius), it will also report contact points and normal. However, if GJK report penetration of the capsule inner segment within the polyhedron, we run the SAT algorithm to get the contact points and normal. This is based on the "Robust Contact Creation for Physics Simulation" presentation by Dirk Gregorius.