Contact Class Reference

A contact between two collisions. More...

#include <physics/physics.hh>

Public Member Functions

 Contact ()
 Constructor. More...
 
 Contact (const Contact &_contact)
 Copy constructor. More...
 
virtual ~Contact ()
 Destructor. More...
 
std::string DebugString () const
 Produce a debug string. More...
 
void FillMsg (msgs::Contact &_msg) const
 Populate a msgs::Contact with data from this. More...
 
Contactoperator= (const Contact &_contact)
 Operator =. More...
 
Contactoperator= (const msgs::Contact &_contact)
 Operator =. More...
 
void Reset ()
 Reset to default values. More...
 

Public Attributes

Collisioncollision1
 Pointer to the first collision object. More...
 
Collisioncollision2
 Pointer to the second collision object. More...
 
int count
 Length of all the arrays. More...
 
double depths [250]
 Array of contact depths. More...
 
math::Vector3 normals [250]
 Array of force normals. More...
 
math::Vector3 positions [250]
 Array of force positions. More...
 
common::Time time
 Time at which the contact occurred. More...
 
WorldPtr world
 World in which the contact occurred. More...
 
JointWrench wrench [250]
 Array of forces for the contact. More...
 

Detailed Description

A contact between two collisions.

Each contact can consist of a number of contact points

Constructor & Destructor Documentation

§ Contact() [1/2]

Contact ( )

Constructor.

§ Contact() [2/2]

Contact ( const Contact _contact)

Copy constructor.

Parameters
[in]_contactContact to copy.

§ ~Contact()

virtual ~Contact ( )
virtual

Destructor.

Member Function Documentation

§ DebugString()

std::string DebugString ( ) const

Produce a debug string.

Returns
A string that contains the values of the contact.

§ FillMsg()

void FillMsg ( msgs::Contact &  _msg) const

Populate a msgs::Contact with data from this.

Parameters
[out]_msgContact message the will hold the data.

§ operator=() [1/2]

Contact& operator= ( const Contact _contact)

Operator =.

Parameters
[in]_contactContact to copy.
Returns
Reference to this contact

§ operator=() [2/2]

Contact& operator= ( const msgs::Contact &  _contact)

Operator =.

Parameters
[in]_contactmsgs::Contact to copy.
Returns
Reference to this contact

§ Reset()

void Reset ( )

Reset to default values.

Member Data Documentation

§ collision1

Collision* collision1

Pointer to the first collision object.

§ collision2

Collision* collision2

Pointer to the second collision object.

§ count

int count

Length of all the arrays.

§ depths

double depths[250]

Array of contact depths.

§ normals

math::Vector3 normals[250]

Array of force normals.

§ positions

math::Vector3 positions[250]

Array of force positions.

§ time

Time at which the contact occurred.

§ world

WorldPtr world

World in which the contact occurred.

§ wrench

JointWrench wrench[250]

Array of forces for the contact.

All forces and torques are in the world frame. All forces and torques are relative to the center of mass of the respective links that the collision elments are attached to.


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