opensurgsim
Public Member Functions | Public Attributes | List of all members
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 <CollisionPair.h>

Inheritance diagram for SurgSim::Collision::Contact:
SurgSim::Collision::TriangleContact

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< ContactmakeComplimentary ()
 
bool operator== (const Contact &contact) const
 

Public Attributes

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

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


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