Simbody  3.5
SimTK::ContactSurface Class Reference

This class combines a piece of ContactGeometry with a ContactMaterial to make an object suitable for attaching to a body which can then engage in contact behavior with other contact surfaces. More...

Public Member Functions

 ContactSurface ()
 Create an empty ContactSurface. More...
 
 ContactSurface (const ContactGeometry &shape, const ContactMaterial &material, Real thickness=0)
 Create a ContactSurface with a given shape and material. More...
 
ContactSurfacesetShape (const ContactGeometry &shape)
 Define a new shape for this ContactSurface. More...
 
ContactSurfacesetMaterial (const ContactMaterial &material, Real thickness=0)
 Define a new material for this ContactSurface, optionally providing the thickness of this elastic material layer over a rigid substrate. More...
 
ContactSurfacesetThickness (Real thickness)
 Set the thickness of the layer of elastic material coating this contact surface. More...
 
const ContactGeometrygetShape () const
 Get read-only access to the shape of this contact surface. More...
 
const ContactMaterialgetMaterial () const
 Get read-only access to the material of this contact surface. More...
 
Real getThickness () const
 Get the thickness of the elastic material layer on this contact surface, with zero indicating that the thickness has not been set. More...
 
ContactGeometryupdShape ()
 Get writable access to the shape of this contact surface. More...
 
ContactMaterialupdMaterial ()
 Get writable access to the material of this contact surface. More...
 
ContactSurfacejoinClique (ContactCliqueId clique)
 Join a contact clique if not already a member. More...
 
void leaveClique (ContactCliqueId clique)
 Remove this surface from a contact clique if it is a member. More...
 
bool isInSameClique (const ContactSurface &other) const
 Determine whether this contact surface is a member of any of the same cliques as some other contact surface, in which case they will be invisible to one another. More...
 
const Array_< ContactCliqueId, short > & getCliques () const
 Return a reference to the list of CliqueIds of the cliques in which this contact surface is a member; the list is always sorted in ascending order. More...
 

Static Public Member Functions

static bool cliquesIntersect (const Array_< ContactCliqueId, short > &a, const Array_< ContactCliqueId, short > &b)
 Return true if there are any common cliques on two clique lists which must each be sorted in ascending order. More...
 
static ContactCliqueId createNewContactClique ()
 Create a new contact clique and return its unique integer id (thread safe). More...
 

Detailed Description

This class combines a piece of ContactGeometry with a ContactMaterial to make an object suitable for attaching to a body which can then engage in contact behavior with other contact surfaces.

The ContactMaterial may be considered as uniform throughout a large solid volume or as a thin layer of uniform material thickness h on top of a rigid substrate. Compliant contact models vary in how they deal with the thickness h: Hertz ignores it, Elastic Foundation uses it to define unit strain.

Typically any contact surface can bump into any other contact surface. However, some groups of surfaces can or should never interact; those groups are called "contact cliques". The set of surfaces that are mounted to the same rigid body always constitues a clique. In addition, other cliques may be defined and arbitrary surfaces made members so that they won't interact. This is commonly used for contact surfaces on adjacent bodies when those surfaces are near the joint between two bodies.

Constructor & Destructor Documentation

SimTK::ContactSurface::ContactSurface ( )
inline

Create an empty ContactSurface.

SimTK::ContactSurface::ContactSurface ( const ContactGeometry shape,
const ContactMaterial material,
Real  thickness = 0 
)
inline

Create a ContactSurface with a given shape and material.

Member Function Documentation

ContactSurface& SimTK::ContactSurface::setShape ( const ContactGeometry shape)
inline

Define a new shape for this ContactSurface.

ContactSurface& SimTK::ContactSurface::setMaterial ( const ContactMaterial material,
Real  thickness = 0 
)
inline

Define a new material for this ContactSurface, optionally providing the thickness of this elastic material layer over a rigid substrate.

ContactSurface& SimTK::ContactSurface::setThickness ( Real  thickness)
inline

Set the thickness of the layer of elastic material coating this contact surface.

This is required by the Elastic Foundation Model but is ignored by the Hertz model. Elastic Foundation uses this value to define "unit strain", that is, an element deformed by 0.1*thickness has 10% strain.

const ContactGeometry& SimTK::ContactSurface::getShape ( ) const
inline

Get read-only access to the shape of this contact surface.

const ContactMaterial& SimTK::ContactSurface::getMaterial ( ) const
inline

Get read-only access to the material of this contact surface.

Real SimTK::ContactSurface::getThickness ( ) const
inline

Get the thickness of the elastic material layer on this contact surface, with zero indicating that the thickness has not been set.

ContactGeometry& SimTK::ContactSurface::updShape ( )
inline

Get writable access to the shape of this contact surface.

ContactMaterial& SimTK::ContactSurface::updMaterial ( )
inline

Get writable access to the material of this contact surface.

ContactSurface& SimTK::ContactSurface::joinClique ( ContactCliqueId  clique)
inline

Join a contact clique if not already a member.

It is OK to pass an invalid clique id here, in which case it will be quietly ignored.

void SimTK::ContactSurface::leaveClique ( ContactCliqueId  clique)
inline

Remove this surface from a contact clique if it is a member.

It is OK to pass an invalid clique id here, in which case it will be quietly ignored.

bool SimTK::ContactSurface::isInSameClique ( const ContactSurface other) const
inline

Determine whether this contact surface is a member of any of the same cliques as some other contact surface, in which case they will be invisible to one another.

const Array_<ContactCliqueId,short>& SimTK::ContactSurface::getCliques ( ) const
inline

Return a reference to the list of CliqueIds of the cliques in which this contact surface is a member; the list is always sorted in ascending order.

static bool SimTK::ContactSurface::cliquesIntersect ( const Array_< ContactCliqueId, short > &  a,
const Array_< ContactCliqueId, short > &  b 
)
inlinestatic

Return true if there are any common cliques on two clique lists which must each be sorted in ascending order.

This takes no longer than O(a+b) where a and b are the sizes of the two clique lists.

static ContactCliqueId SimTK::ContactSurface::createNewContactClique ( )
inlinestatic

Create a new contact clique and return its unique integer id (thread safe).

Every contact surface is automatically a member of a clique containing all the surfaces that reside on the same body.


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