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