Public Member Functions | Private Member Functions | List of all members
SurgSim::Collision::BoxSphereDcdContact Class Reference

Class to calculate intersections between a box and a sphere. More...

#include <SurgSim/Collision/BoxSphereDcdContact.h>

Inheritance diagram for SurgSim::Collision::BoxSphereDcdContact:
SurgSim::Collision::ContactCalculation

Public Member Functions

 BoxSphereDcdContact ()
 Constructor. More...
 
virtual std::pair< int, int > getShapeTypes () override
 Function that returns the shapes between which this class performs collision detection. More...
 
- Public Member Functions inherited from SurgSim::Collision::ContactCalculation
 ContactCalculation ()
 Constructor. More...
 
virtual ~ContactCalculation ()
 Destructor. More...
 
void calculateContact (std::shared_ptr< CollisionPair > pair)
 Function that handles asymmetric pair and calls the actual contact calculation routine of the sub class. More...
 

Private Member Functions

virtual void doCalculateContact (std::shared_ptr< CollisionPair > pair) override
 Calculate the actual contact between two shapes of the given CollisionPair. More...
 

Detailed Description

Class to calculate intersections between a box and a sphere.

Constructor & Destructor Documentation

SurgSim::Collision::BoxSphereDcdContact::BoxSphereDcdContact ( )

Constructor.

Member Function Documentation

void SurgSim::Collision::BoxSphereDcdContact::doCalculateContact ( std::shared_ptr< CollisionPair pair)
overrideprivatevirtual

Calculate the actual contact between two shapes of the given CollisionPair.

Parameters
pairThe symmetric pair that is under consideration.
Note
If there is a contact, the normal in the local space is always normal to the box face closest to the sphere center. That means that if a penetration near the corner increases or decreases in depth the normal may switch directions instantly, leading to instabilities.

Implements SurgSim::Collision::ContactCalculation.

std::pair< int, int > SurgSim::Collision::BoxSphereDcdContact::getShapeTypes ( )
overridevirtual

Function that returns the shapes between which this class performs collision detection.

Returns
int std::pair containing the shape types.

Implements SurgSim::Collision::ContactCalculation.


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