Simbody  3.7
SimTK::BrickHalfSpaceContact Class Reference

This subclass of Contact is used when one ContactGeometry object is a half plane and the other is a Brick. More...

+ Inheritance diagram for SimTK::BrickHalfSpaceContact:

Public Member Functions

 BrickHalfSpaceContact (ContactSurfaceIndex halfSpace, ContactSurfaceIndex brick, const Transform &X_HB, int lowestVertex, Real depth)
 Create a BrickHalfSpaceContact object. More...
 
int getLowestVertex () const
 Get the vertex index (0-7) of the brick's vertex that is closest to or most penetrated into the halfspace. More...
 
Real getDepth () const
 Get the penetration depth (>0) or separation distance (<0) from the brick's lowest vertex to the halfspace surface. More...
 
- Public Member Functions inherited from SimTK::Contact
 Contact ()
 The default constructor creates an empty handle. More...
 
 Contact (const Contact &source)
 Copy constructor is shallow and reference-counted; this handle will point to the same object as does the source. More...
 
 ~Contact ()
 Destructor clears the handle, deleting the referenced object if this was the last reference. More...
 
Contactoperator= (const Contact &source)
 Copy assignment is shallow and reference-counted; this handle will point to the same object as does the source. More...
 
void clear ()
 Clear this handle, deleting the referenced object if this was the last reference. More...
 
bool isEmpty () const
 See if this handle is empty. More...
 
ContactId getContactId () const
 Get the persistent ContactId that has been assigned to this Contact object if there is one (otherwise this will be invalid – you can check with isValid(). More...
 
Condition getCondition () const
 Find out the current condition of this Contact object. More...
 
ContactSurfaceIndex getSurface1 () const
 Get the first surface involved in the contact, specified by its index within its contact set or ContactTrackerSubsystem. More...
 
ContactSurfaceIndex getSurface2 () const
 Get the second surface involved in the contact, specified by its index within its contact set or ContactTrackerSubsystem. More...
 
const TransformgetTransform () const
 Return the transform X_S1S2 giving the pose of surface 2's frame measured and expressed in surface 1's frame, recorded at the time this Contact object was calculated. More...
 
ContactsetContactId (ContactId id)
 Set the ContactId for this Contact object. More...
 
ContactsetCondition (Condition condition)
 Set the current Condition. More...
 
ContactsetSurfaces (ContactSurfaceIndex surf1, ContactSurfaceIndex surf2)
 Set the surfaces tracked by this Contact object. More...
 
ContactsetTransform (const Transform &X_S1S2)
 Set the surface-to-surface relative transform X_S1S2. More...
 
ContactTypeId getTypeId () const
 Return a unique small integer corresponding to the concrete type of Contact object being referenced by this handle. More...
 
const ContactImpl & getImpl () const
 
ContactImpl & updImpl ()
 

Static Public Member Functions

static bool isInstance (const Contact &contact)
 Determine whether a Contact object is a BrickHalfSpaceContact. More...
 
static const BrickHalfSpaceContactgetAs (const Contact &contact)
 Recast a brick-halfspace contact given as a generic Contact object to a const reference to a concrete BrickHalfSpaceContact object. More...
 
static BrickHalfSpaceContactupdAs (Contact &contact)
 Recast a brick-halfspace contact given as a generic Contact object to a writable reference to a concrete BrickHalfSpaceContact object. More...
 
static ContactTypeId classTypeId ()
 Obtain the unique small-integer id for the BrickHalfSpaceContact class. More...
 
- Static Public Member Functions inherited from SimTK::Contact
static const char * nameOfCondition (Condition)
 Returns a human-readable name corresponding to the given Condition; useful for debugging. More...
 
static ContactId createNewContactId ()
 This creates a new ContactId starting from 1 and increasing for a very long time (to a billion or so) before repeating. More...
 

Additional Inherited Members

- Public Types inherited from SimTK::Contact
enum  Condition {
  Unknown,
  Untracked,
  Anticipated,
  NewContact,
  Ongoing,
  Broken
}
 The Contact::Condition tracks the status of a Contact through its lifetime. More...
 
- Protected Member Functions inherited from SimTK::Contact
 Contact (ContactImpl *impl)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BrickHalfSpaceContact()

SimTK::BrickHalfSpaceContact::BrickHalfSpaceContact ( ContactSurfaceIndex  halfSpace,
ContactSurfaceIndex  brick,
const Transform X_HB,
int  lowestVertex,
Real  depth 
)

Create a BrickHalfSpaceContact object.

Parameters
halfSpacethe surface index of the halfspace
brickthe surface index of the brick
X_HBthe transform giving the brick's frame measured and expressed in the halfspace's frame
lowestVertexwhich vertex of the brick is closest to (if separated) or furthest in (if penetrating) the halfspace
depththe penetration depth (if depth>0) or separation distance between the lowestVertex and halfspace surface

Member Function Documentation

◆ getLowestVertex()

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.

◆ getDepth()

Real SimTK::BrickHalfSpaceContact::getDepth ( ) const

Get the penetration depth (>0) or separation distance (<0) from the brick's lowest vertex to the halfspace surface.

◆ isInstance()

static bool SimTK::BrickHalfSpaceContact::isInstance ( const Contact contact)
static

Determine whether a Contact object is a BrickHalfSpaceContact.

◆ getAs()

static const BrickHalfSpaceContact& SimTK::BrickHalfSpaceContact::getAs ( const Contact contact)
inlinestatic

Recast a brick-halfspace contact given as a generic Contact object to a const reference to a concrete BrickHalfSpaceContact object.

◆ updAs()

static BrickHalfSpaceContact& SimTK::BrickHalfSpaceContact::updAs ( Contact contact)
inlinestatic

Recast a brick-halfspace contact given as a generic Contact object to a writable reference to a concrete BrickHalfSpaceContact object.

◆ classTypeId()

static ContactTypeId SimTK::BrickHalfSpaceContact::classTypeId ( )
static

Obtain the unique small-integer id for the BrickHalfSpaceContact class.


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