Simbody
3.5
|
This subclass of Contact is used when one ContactGeometry object is a half plane and the other is a Brick. More...
Public Member Functions | |
BrickHalfSpaceContact (ContactSurfaceIndex halfSpace, ContactSurfaceIndex brick, const Transform &X_HB, int lowestVertex, Real depth) | |
Create a BrickHalfSpaceContact object. | |
int | getLowestVertex () const |
Get the vertex index (0-7) of the brick's vertex that is closest to or most penetrated into the halfspace. | |
Real | getDepth () const |
Get the penetration depth (>0) or separation distance (<0) from the brick's lowest vertex to the halfspace surface. | |
Static Public Member Functions | |
static bool | isInstance (const Contact &contact) |
Determine whether a Contact object is a BrickHalfSpaceContact. | |
static const BrickHalfSpaceContact & | getAs (const Contact &contact) |
Recast a brick-halfspace contact given as a generic Contact object to a const reference to a concrete BrickHalfSpaceContact object. | |
static BrickHalfSpaceContact & | updAs (Contact &contact) |
Recast a brick-halfspace contact given as a generic Contact object to a writable reference to a concrete BrickHalfSpaceContact object. | |
static ContactTypeId | classTypeId () |
Obtain the unique small-integer id for the BrickHalfSpaceContact class. |
This subclass of Contact is used when one ContactGeometry object is a half plane and the other is a Brick.
This is a warmup for general convex mesh contact.
SimTK::BrickHalfSpaceContact::BrickHalfSpaceContact | ( | ContactSurfaceIndex | halfSpace, |
ContactSurfaceIndex | brick, | ||
const Transform & | X_HB, | ||
int | lowestVertex, | ||
Real | depth | ||
) |
Create a BrickHalfSpaceContact object.
halfSpace | the surface index of the halfspace |
brick | the surface index of the brick |
X_HB | the transform giving the brick's frame measured and expressed in the halfspace's frame |
lowestVertex | which vertex of the brick is closest to (if separated) or furthest in (if penetrating) the halfspace |
depth | the penetration depth (if depth>0) or separation distance between the lowestVertex and halfspace surface |
int SimTK::BrickHalfSpaceContact::getLowestVertex | ( | ) | const |
Get the vertex index (0-7) of the brick's vertex that is closest to or most penetrated into the halfspace.
Real SimTK::BrickHalfSpaceContact::getDepth | ( | ) | const |
Get the penetration depth (>0) or separation distance (<0) from the brick's lowest vertex to the halfspace surface.
static bool SimTK::BrickHalfSpaceContact::isInstance | ( | const Contact & | contact | ) | [static] |
Determine whether a Contact object is a BrickHalfSpaceContact.
static const BrickHalfSpaceContact& SimTK::BrickHalfSpaceContact::getAs | ( | const Contact & | contact | ) | [inline, static] |
Recast a brick-halfspace contact given as a generic Contact object to a const reference to a concrete BrickHalfSpaceContact object.
static BrickHalfSpaceContact& SimTK::BrickHalfSpaceContact::updAs | ( | Contact & | contact | ) | [inline, static] |
Recast a brick-halfspace contact given as a generic Contact object to a writable reference to a concrete BrickHalfSpaceContact object.
static ContactTypeId SimTK::BrickHalfSpaceContact::classTypeId | ( | ) | [static] |
Obtain the unique small-integer id for the BrickHalfSpaceContact class.