TriangleMeshContact Class Reference

This subclass of Contact is used when one or both of the ContactGeometry objects is a TriangleMesh. More...

#include <Contact.h>

Inheritance diagram for TriangleMeshContact:
Contact

List of all members.

Public Member Functions

 TriangleMeshContact (int body1, int body2, const std::set< int > &faces1, const std::set< int > &faces2)
 Create a TriangleMeshContact object.
const std::set< int > & getFirstBodyFaces () const
 Get the indices of all faces of the first body that are partly or completely inside the second one.
const std::set< int > & getSecondBodyFaces () const
 Get the indices of all faces of the second body that are partly or completely inside the first one.

Static Public Member Functions

static bool isInstance (const Contact &contact)
 Determine whether a Contact object is a TriangleMeshContact.

Detailed Description

This subclass of Contact is used when one or both of the ContactGeometry objects is a TriangleMesh.

It stores a list of every face on each object that is partly or completely inside the other one.


Constructor & Destructor Documentation

TriangleMeshContact ( int  body1,
int  body2,
const std::set< int > &  faces1,
const std::set< int > &  faces2 
)

Create a TriangleMeshContact 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
faces1 the indices of all faces in the first body which are inside the second one
faces2 the indices of all faces in the second body which are inside the first one

Member Function Documentation

const std::set<int>& getFirstBodyFaces (  )  const

Get the indices of all faces of the first body that are partly or completely inside the second one.

If the first body is not a TriangleMesh, this will return an empty set.

const std::set<int>& getSecondBodyFaces (  )  const

Get the indices of all faces of the second body that are partly or completely inside the first one.

If the second body is not a TriangleMesh, this will return an empty set.

static bool isInstance ( const Contact contact  )  [static]

Determine whether a Contact object is a TriangleMeshContact.


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

Generated by  doxygen 1.6.2