Simbody
|
This subclass of Contact represents a pair of contact surfaces that were in contact (meaning within cutoff range) but have now gone out of range. More...
#include <Contact.h>
Public Member Functions | |
BrokenContact (ContactSurfaceIndex surf1, ContactSurfaceIndex surf2, const Transform &X_S1S2, Real separation) | |
Create a BrokenContact object. | |
Real | getSeparation () const |
Get the separation (> cutoff >= 0) between the two surfaces at the time we decided the contact had been broken. | |
Static Public Member Functions | |
static bool | isInstance (const Contact &contact) |
Determine whether a Contact object is a BrokenContact. | |
static ContactTypeId | classTypeId () |
Obtain the unique small-integer id for the BrokenContact class. |
This subclass of Contact represents a pair of contact surfaces that were in contact (meaning within cutoff range) but have now gone out of range.
This is the last time we will use this ContactId. The only parameters here are the surfaces and the separation distance (> cutoff). If someone cares, the separation distance can be used to estimate the time at which contact was broken.
SimTK::BrokenContact::BrokenContact | ( | ContactSurfaceIndex | surf1, |
ContactSurfaceIndex | surf2, | ||
const Transform & | X_S1S2, | ||
Real | separation | ||
) |
Create a BrokenContact object.
surf1 | The index of the first surface involved in the contact. |
surf2 | The index of the second surface involved in the contact. |
X_S1S2 | The surface-to-surface relative transform. |
separation | The minimum distance between the surfaces, with separation > cutoff >= 0 always. |
Real SimTK::BrokenContact::getSeparation | ( | ) | const |
Get the separation (> cutoff >= 0) between the two surfaces at the time we decided the contact had been broken.
Note that the sign convention is opposite from depth which is negative when separated.
static bool SimTK::BrokenContact::isInstance | ( | const Contact & | contact | ) | [static] |
Determine whether a Contact object is a BrokenContact.
static ContactTypeId SimTK::BrokenContact::classTypeId | ( | ) | [static] |
Obtain the unique small-integer id for the BrokenContact class.