This subclass of Contact is used when one or both of the ContactGeometry objects is a TriangleMesh. More...
#include <Contact.h>
Public Member Functions | |
TriangleMeshContact (ContactSurfaceIndex surf1, ContactSurfaceIndex surf2, const Transform &X_S1S2, const std::set< int > &faces1, const std::set< int > &faces2) | |
Create a TriangleMeshContact object. | |
const std::set< int > & | getSurface1Faces () const |
Get the indices of all faces of surface1 that are partly or completely inside surface2. | |
const std::set< int > & | getSurface2Faces () const |
Get the indices of all faces of surface2 that are partly or completely inside surface1. | |
Static Public Member Functions | |
static bool | isInstance (const Contact &contact) |
Determine whether a Contact object is a TriangleMeshContact. | |
static const TriangleMeshContact & | getAs (const Contact &contact) |
Recast a triangle mesh given as a generic Contact object to a const reference to a concrete TriangleMeshContact object. | |
static TriangleMeshContact & | updAs (Contact &contact) |
Recast a triangle mesh given as a generic Contact object to a writable reference to a concrete TriangleMeshContact object. | |
static ContactTypeId | classTypeId () |
Obtain the unique small-integer id for the TriangleMeshContact class. |
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.
TriangleMeshContact | ( | ContactSurfaceIndex | surf1, | |
ContactSurfaceIndex | surf2, | |||
const Transform & | X_S1S2, | |||
const std::set< int > & | faces1, | |||
const std::set< int > & | faces2 | |||
) |
Create a TriangleMeshContact object.
surf1 | the index of the first surface involved in the contact, specified by its index within its contact set | |
surf2 | the index of the second surface involved in the contact, specified by its index within its contact set | |
X_S1S2 | the transform giving surf2's frame measured and expressed in surf1's frame | |
faces1 | the indices of all faces in the first surface which are inside the second one | |
faces2 | the indices of all faces in the second surface which are inside the first one |
static ContactTypeId classTypeId | ( | ) | [static] |
Obtain the unique small-integer id for the TriangleMeshContact class.
static const TriangleMeshContact& getAs | ( | const Contact & | contact | ) | [inline, static] |
Recast a triangle mesh given as a generic Contact object to a const reference to a concrete TriangleMeshContact object.
const std::set<int>& getSurface1Faces | ( | ) | const |
Get the indices of all faces of surface1 that are partly or completely inside surface2.
If surface1 is not a TriangleMesh, this will return an empty set.
const std::set<int>& getSurface2Faces | ( | ) | const |
Get the indices of all faces of surface2 that are partly or completely inside surface1.
If surface2 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.
static TriangleMeshContact& updAs | ( | Contact & | contact | ) | [inline, static] |
Recast a triangle mesh given as a generic Contact object to a writable reference to a concrete TriangleMeshContact object.