SurgSim::Collision::DefaultContactCalculation Class Reference

A default calculation, it does nothing and can be used as a placeholder. More...

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

Inheritance diagram for SurgSim::Collision::DefaultContactCalculation:

## Public Member Functions

| DefaultContactCalculation (bool doAssert=false)
| Constructor. More...
virtual | ~DefaultContactCalculation ()
| Destructor. More...
std::pair< int, int > | getShapeTypes () override
| Virtual function that returns the shapes that this ContactCalculation class handles. 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...

## Private Member Functions

void | doCalculateContact (std::shared_ptr< CollisionPair > pair) override
| Calculate the actual contact between two shapes of the given CollisionPair. 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< Contact > > | doCalculateCcdContact (const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &posedShapeMotion1, const Math::PosedShapeMotion< std::shared_ptr< Math::Shape >> &posedShapeMotion2) 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...

## Private Attributes

bool | m_doAssert

## 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
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

A default calculation, it does nothing and can be used as a placeholder.

## Constructor & Destructor Documentation

## DefaultContactCalculation()

SurgSim::Collision::DefaultContactCalculation::DefaultContactCalculation | ( | bool | doAssert = `false` | ) |

explicit

Constructor.

Parameters

  doAssert | If set the calculation will throw an exception if it is executed, this can be used to detect cases where a contact calculation is being called on a pair that should be implemented

## ~DefaultContactCalculation()

SurgSim::Collision::DefaultContactCalculation::~DefaultContactCalculation | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## doCalculateCcdContact()

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

override private virtual

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,posedShapeMotion2 | The 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.

## doCalculateContact()

void SurgSim::Collision::DefaultContactCalculation::doCalculateContact | ( | std::shared_ptr< CollisionPair > | pair | ) |

override private virtual

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

Parameters

  pair | The symmetric pair that is under consideration.

Reimplemented from SurgSim::Collision::ContactCalculation.

## doCalculateDcdContact()

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

override private virtual

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,posedShape2 | The 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::DefaultContactCalculation::getShapeTypes | ( |  | ) |

override virtual

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_doAssert

bool SurgSim::Collision::DefaultContactCalculation::m_doAssert

private

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

- SurgSim/Collision/DefaultContactCalculation.h
- SurgSim/Collision/DefaultContactCalculation.cpp