ReactPhysics3D  v0.10.2
C++ Physics engine library
Loading...
Searching...
No Matches
reactphysics3d::CapsuleVsConvexPolyhedronAlgorithm Class Reference

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>

Inheritance diagram for reactphysics3d::CapsuleVsConvexPolyhedronAlgorithm:
reactphysics3d::NarrowPhaseAlgorithm

Public Member Functions

 CapsuleVsConvexPolyhedronAlgorithm ()=default
 Constructor.
 
virtual ~CapsuleVsConvexPolyhedronAlgorithm () override=default
 Destructor.
 
 CapsuleVsConvexPolyhedronAlgorithm (const CapsuleVsConvexPolyhedronAlgorithm &algorithm)=delete
 Deleted copy-constructor.
 
CapsuleVsConvexPolyhedronAlgorithmoperator= (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.
 
NarrowPhaseAlgorithmoperator= (const NarrowPhaseAlgorithm &algorithm)=delete
 Deleted assignment operator.
 

Detailed Description

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.


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