Contact Class Reference

A Contact contains information about two bodies that are in contact with each other. More...

#include <Contact.h>

Inheritance diagram for Contact:
PointContact TriangleMeshContact

List of all members.

Public Member Functions

 Contact (int body1, int body2)
 Create a Contact object.
 Contact (const Contact &copy)
 Contact (ContactImpl *impl)
 ~Contact ()
Contactoperator= (const Contact &copy)
int getFirstBody () const
 Get the first body involved in the contact, specified by its index within its contact set.
int getSecondBody () const
 Get the second body involved in the contact, specified by its index within its contact set.
const ContactImplgetImpl () const

Detailed Description

A Contact contains information about two bodies that are in contact with each other.

It usually is created by a CollisionDetectionAlgorithm, and is retrieved by calling getContacts() on a GeneralContactSubsystem.

The base class records only the indices of the two bodies that are in contact. CollisionDetectionAlgorithms which characterize contacts in more complex ways will typically define subclasses of Contact that provide additional information.


Constructor & Destructor Documentation

Contact ( int  body1,
int  body2 
)

Create a Contact object.

Parameters:
body1 the index of the first body involved in the contact, specified by its index within its contact set
body2 the index of the second body involved in the contact, specified by its index within its contact set
Contact ( const Contact copy  ) 
Contact ( ContactImpl impl  ) 
~Contact (  ) 

Member Function Documentation

int getFirstBody (  )  const

Get the first body involved in the contact, specified by its index within its contact set.

const ContactImpl& getImpl (  )  const [inline]
int getSecondBody (  )  const

Get the second body involved in the contact, specified by its index within its contact set.

Contact& operator= ( const Contact copy  ) 

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

Generated on Wed Dec 30 11:05:14 2009 for SimTKcore by  doxygen 1.6.1