#include <Contact.h>
It stores a list of every face on each object that is partly or completely inside the other one.
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. |
TriangleMeshContact | ( | int | body1, | |
int | body2, | |||
const std::set< int > & | faces1, | |||
const std::set< int > & | faces2 | |||
) |
Create a TriangleMeshContact object.
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 |
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.