SurgSim::Collision::Contact Struct Reference

Contact data structure used when two representations touch each other The convention is that if body 1 is moved along the normal vector by a distance depth (or equivalently if body 2 is moved the same distance in the opposite direction) then the penetration depth will be reduced to zero. More...

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

## Public Member Functions

| Contact (const CollisionDetectionType &newType, const double &newDepth, const double &newTime, const SurgSim::Math::Vector3d &newContact, const SurgSim::Math::Vector3d &newNormal, const std::pair< SurgSim::DataStructures::Location, SurgSim::DataStructures::Location > &newPenetrationPoints)
std::shared_ptr< Contact > | makeComplimentary ()
bool | operator== (const Contact &contact) const

## Public Attributes

CollisionDetectionType | type
| What collision algorithm class was used to get the contact. More...
double | depth
| What is the penetration depth for the representation. More...
double | time
| What is the time of the collision, CCD only. More...
SurgSim::Math::Vector3d | contact
| The actual contact point, only used for CCD. More...
SurgSim::Math::Vector3d | normal
| The normal on the contact point (normalized) More...
std::pair< SurgSim::DataStructures::Location, SurgSim::DataStructures::Location > | penetrationPoints
| The deepest point inside the opposing object. More...
SurgSim::Math::Vector3d | force
| The reaction force to correct this contact. More...

## Detailed Description

Contact data structure used when two representations touch each other The convention is that if body 1 is moved along the normal vector by a distance depth (or equivalently if body 2 is moved the same distance in the opposite direction) then the penetration depth will be reduced to zero.

This means that the normal vector points "in" to body 1

## Constructor & Destructor Documentation

## Contact()

SurgSim::Collision::Contact::Contact | ( | const CollisionDetectionType & | newType,
|  | const double & | newDepth,
|  | const double & | newTime,
|  | const SurgSim::Math::Vector3d & | newContact,
|  | const SurgSim::Math::Vector3d & | newNormal,
|  | const std::pair< SurgSim::DataStructures::Location, SurgSim::DataStructures::Location > & | newPenetrationPoints
| ) |  |

inline

## Member Function Documentation

## makeComplimentary()

std::shared_ptr<Contact> SurgSim::Collision::Contact::makeComplimentary | ( |  | ) |

inline

## operator==()

bool SurgSim::Collision::Contact::operator== | ( | const Contact & | contact | ) | const

inline

## Member Data Documentation

## contact

SurgSim::Math::Vector3d SurgSim::Collision::Contact::contact

The actual contact point, only used for CCD.

## depth

double SurgSim::Collision::Contact::depth

What is the penetration depth for the representation.

## force

SurgSim::Math::Vector3d SurgSim::Collision::Contact::force

The reaction force to correct this contact.

## normal

SurgSim::Math::Vector3d SurgSim::Collision::Contact::normal

The normal on the contact point (normalized)

## penetrationPoints

std::pair<SurgSim::DataStructures::Location, SurgSim::DataStructures::Location> SurgSim::Collision::Contact::penetrationPoints

The deepest point inside the opposing object.

## time

double SurgSim::Collision::Contact::time

What is the time of the collision, CCD only.

## type

CollisionDetectionType SurgSim::Collision::Contact::type

What collision algorithm class was used to get the contact.

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

- SurgSim/Collision/CollisionPair.h