Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SurgSim::Collision::CompoundShapeContact Class Reference

#include <SurgSim/Collision/CompoundShapeContact.h>

Inheritance diagram for SurgSim::Collision::CompoundShapeContact:
SurgSim::Collision::ContactCalculation

Public Member Functions

 CompoundShapeContact (const std::pair< int, int > &types)
 Constructor. More...
 
- Public Member Functions inherited from SurgSim::Collision::ContactCalculation
 ContactCalculation ()
 Constructor. More...
 
virtual ~ContactCalculation ()
 Destructor. More...
 
void calculateContact (std::shared_ptr< CollisionPair > pair)
 Calculate the contacts for a given pair. More...
 
std::list< std::shared_ptr< Contact > > calculateDcdContact (const Math::PosedShape< std::shared_ptr< Math::Shape >> posedShape1, const Math::PosedShape< std::shared_ptr< Math::Shape >> posedShape2)
 Calculate the dcd contacts between two posed/transformed shapes. More...
 
std::list< std::shared_ptr< Contact > > calculateCcdContact (const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> posedShapeMotion1, const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> posedShapeMotion2)
 Calculate the ccd contacts between two posed/transformed shapes. More...
 

Protected Member Functions

std::pair< int, int > getShapeTypes () override
 Virtual function that returns the shapes that this ContactCalculation class handles. More...
 
std::list< std::shared_ptr< Contact > > doCalculateDcdContact (const Math::PosedShape< std::shared_ptr< Math::Shape >> &posedShape1, const Math::PosedShape< std::shared_ptr< Math::Shape >> &posedShape2) override
 Virtual function receives the call from the public interface, usually will type the shapes statically to their known types and then execute a specific contact calculation between the two shapes. More...
 
std::list< std::shared_ptr< SurgSim::Collision::Contact > > doCalculateCcdContact (const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &shape1, const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &shape2) override
 Virtual function receives the call from the public interface, usually will type the shapes statically to their known types and then execute a specific contact calculation between the two shapes. More...
 

Protected Attributes

std::pair< int, int > m_types
 Local shape types for this instance, these can be set to match the expected shapes. More...
 

Additional Inherited Members

- Public Types inherited from SurgSim::Collision::ContactCalculation
typedef std::array< std::array< std::shared_ptr< ContactCalculation >, Math::SHAPE_TYPE_COUNT >, Math::SHAPE_TYPE_COUNTTableType
 
- Static Public Member Functions inherited from SurgSim::Collision::ContactCalculation
static void registerDcdContactCalculation (const std::shared_ptr< ContactCalculation > &calculation)
 Register an instance of a contact calculation in the table. More...
 
static void registerCcdContactCalculation (const std::shared_ptr< ContactCalculation > &calculation)
 Register an instance of a contact calculation in the table. More...
 
static const TableTypegetDcdContactTable ()
 
static const TableTypegetCcdContactTable ()
 

Constructor & Destructor Documentation

§ CompoundShapeContact()

SurgSim::Collision::CompoundShapeContact::CompoundShapeContact ( const std::pair< int, int > &  types)
explicit

Constructor.

Member Function Documentation

§ doCalculateCcdContact()

std::list< std::shared_ptr< SurgSim::Collision::Contact > > SurgSim::Collision::CompoundShapeContact::doCalculateCcdContact ( const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &  posedShapeMotion1,
const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &  posedShapeMotion2 
)
overrideprotectedvirtual

Virtual function receives the call from the public interface, usually will type the shapes statically to their known types and then execute a specific contact calculation between the two shapes.

Parameters
posedShapeMotion1,posedShapeMotion2The two posed shapes motion to calculate ccd contact for
Returns
a list of ccd contacts between the two given posed shapes motion

Reimplemented from SurgSim::Collision::ContactCalculation.

§ doCalculateDcdContact()

std::list< std::shared_ptr< Contact > > SurgSim::Collision::CompoundShapeContact::doCalculateDcdContact ( const Math::PosedShape< std::shared_ptr< Math::Shape >> &  posedShape1,
const Math::PosedShape< std::shared_ptr< Math::Shape >> &  posedShape2 
)
overrideprotectedvirtual

Virtual function receives the call from the public interface, usually will type the shapes statically to their known types and then execute a specific contact calculation between the two shapes.

Parameters
posedShape1,posedShape2The two posed shapes to calculate dcd contact for
Returns
a list of dcd contacts between the two given posed shapes

Reimplemented from SurgSim::Collision::ContactCalculation.

§ getShapeTypes()

std::pair< int, int > SurgSim::Collision::CompoundShapeContact::getShapeTypes ( )
overrideprotectedvirtual

Virtual function that returns the shapes that this ContactCalculation class handles.

Returns
Return the shape types this class handles.

Implements SurgSim::Collision::ContactCalculation.

Member Data Documentation

§ m_types

std::pair<int, int> SurgSim::Collision::CompoundShapeContact::m_types
protected

Local shape types for this instance, these can be set to match the expected shapes.


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