SurgSim::Collision::ShapeShapeContactCalculation< Shape1, Shape2 > Class Template Reference

Class that can automate the type conversion and provides a consistent interface to the typed call Takes the shapes to convert as template parameters. More...

`#include <SurgSim/Collision/ShapeShapeContactCalculation.h>`

Inheritance diagram for SurgSim::Collision::ShapeShapeContactCalculation< Shape1, Shape2 >:

## Private Member Functions

virtual std::list< std::shared_ptr< Contact > > | calculateDcdContact (const Shape1 &shape1, const Math::RigidTransform3d &pose1, const Shape2 &shape2, const Math::RigidTransform3d &pose2) const
| Virtual function to be overridden, this provides the typed contact calculation between two shapes it takes two shapes and their respective poses, and will return the contacts between those two shapes for shapes that return true for isTransformable(), the calculation may ignore the pose passed in the function. More...
virtual std::list< std::shared_ptr< Contact > > | calculateCcdContact (const Shape1 &shape1AtTime0, const Math::RigidTransform3d &pose1AtTime0, const Shape1 &shape1AtTime1, const Math::RigidTransform3d &pose1AtTime1, const Shape2 &shape2AtTime0, const Math::RigidTransform3d &pose2AtTime0, const Shape2 &shape2AtTime1, const Math::RigidTransform3d &pose2AtTime1) const
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
| Overrides the dcd contact calculation to go from untyped shapes to the typed shapes. More...
std::list< std::shared_ptr< Contact > > | doCalculateCcdContact (const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &posedShapeMotion1, const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &posedShapeMotion2) override
| Overrides the ccd contact calculation to go from untyped shapes to the typed 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_COUNT > | TableType
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...
virtual std::pair< int, int > | getShapeTypes ()=0
| Virtual function that returns the shapes that this ContactCalculation class handles. More...
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 TableType & | getDcdContactTable ()
static const TableType & | getCcdContactTable ()

## Detailed Description

### template<class Shape1, class Shape2>
class SurgSim::Collision::ShapeShapeContactCalculation< Shape1, Shape2 >

Class that can automate the type conversion and provides a consistent interface to the typed call Takes the shapes to convert as template parameters.

## Member Function Documentation

## calculateCcdContact()

template<class Shape1, class Shape2>

virtual std::list<std::shared_ptr<Contact> > SurgSim::Collision::ShapeShapeContactCalculation< Shape1, Shape2 >::calculateCcdContact | ( | const Shape1 & | shape1AtTime0,
|  | const Math::RigidTransform3d & | pose1AtTime0,
|  | const Shape1 & | shape1AtTime1,
|  | const Math::RigidTransform3d & | pose1AtTime1,
|  | const Shape2 & | shape2AtTime0,
|  | const Math::RigidTransform3d & | pose2AtTime0,
|  | const Shape2 & | shape2AtTime1,
|  | const Math::RigidTransform3d & | pose2AtTime1
| ) |  | const

inline private virtual

Reimplemented in SurgSim::Collision::SegmentSelfContact, and SurgSim::Collision::SegmentMeshTriangleMeshContact.

## calculateDcdContact()

template<class Shape1, class Shape2>

virtual std::list<std::shared_ptr<Contact> > SurgSim::Collision::ShapeShapeContactCalculation< Shape1, Shape2 >::calculateDcdContact | ( | const Shape1 & | shape1,
|  | const Math::RigidTransform3d & | pose1,
|  | const Shape2 & | shape2,
|  | const Math::RigidTransform3d & | pose2
| ) |  | const

inline private virtual

Virtual function to be overridden, this provides the typed contact calculation between two shapes it takes two shapes and their respective poses, and will return the contacts between those two shapes for shapes that return true for isTransformable(), the calculation may ignore the pose passed in the function.

Reimplemented in SurgSim::Collision::BoxSphereContact, SurgSim::Collision::BoxPlaneContact, SurgSim::Collision::SegmentMeshTriangleMeshContact, SurgSim::Collision::TriangleMeshParticlesContact, SurgSim::Collision::TriangleMeshSurfaceMeshContact, SurgSim::Collision::BoxDoubleSidedPlaneContact, SurgSim::Collision::SphereDoubleSidedPlaneContact, SurgSim::Collision::TriangleMeshTriangleMeshContact, SurgSim::Collision::CapsuleSphereContact, SurgSim::Collision::SpherePlaneContact, SurgSim::Collision::BoxCapsuleContact, SurgSim::Collision::SphereSphereContact, and SurgSim::Collision::TriangleMeshPlaneContact.

## doCalculateCcdContact()

template<class Shape1, class Shape2>

std::list<std::shared_ptr<Contact> > SurgSim::Collision::ShapeShapeContactCalculation< Shape1, Shape2 >::doCalculateCcdContact | ( | const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> & | posedShapeMotion1,
|  | const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> & | posedShapeMotion2
| ) |  |

inline override private virtual

Overrides the ccd contact calculation to go from untyped shapes to the typed shapes.

Reimplemented from SurgSim::Collision::ContactCalculation.

## doCalculateDcdContact()

template<class Shape1, class Shape2>

std::list<std::shared_ptr<Contact> > SurgSim::Collision::ShapeShapeContactCalculation< Shape1, Shape2 >::doCalculateDcdContact | ( | const Math::PosedShape< std::shared_ptr< Math::Shape >> & | posedShape1,
|  | const Math::PosedShape< std::shared_ptr< Math::Shape >> & | posedShape2
| ) |  |

inline override private virtual

Overrides the dcd contact calculation to go from untyped shapes to the typed shapes.

Reimplemented from SurgSim::Collision::ContactCalculation.

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

- SurgSim/Collision/ShapeShapeContactCalculation.h