Simbody
Public Member Functions | Static Public Member Functions

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...

#include <ContactSurface.h>

List of all members.

Public Member Functions

 ContactSurface ()
 Create an empty ContactSurface.
 ContactSurface (const ContactGeometry &shape, const ContactMaterial &material)
 Create a ContactSurface with a given shape and material.
ContactSurfacesetShape (const ContactGeometry &shape)
 Define a new shape for this ContactSurface.
ContactSurfacesetMaterial (const ContactMaterial &material, Real thickness=Infinity)
 Define a new material for this ContactSurface, optionally providing the thickness of this elastic material layer over a rigid substrate.
ContactSurfacesetThickness (Real thickness)
 Set the thickness of the layer of elastic material coating this contact surface.
const ContactGeometrygetShape () const
 Get read-only access to the shape of this contact surface.
const ContactMaterialgetMaterial () const
 Get read-only access to the material of this contact surface.
Real getThickness () const
 Get the thickness of the elastic material layer on this contact surface, with Infinity indicating that the surface is the outside of a solid made uniformly of this material.
ContactGeometryupdShape ()
 Get writable access to the shape of this contact surface.
ContactMaterialupdMaterial ()
 Get writable access to the material of this contact surface.
ContactSurfacejoinClique (ContactCliqueId clique)
 Join a contact clique if not already a member.
void leaveClique (ContactCliqueId clique)
 Remove this surface from a contact clique if it is a member.
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.
const Array_< ContactCliqueId,
short > & 
getCliques () const
 Return a referemce tp the list of CliqueIds of the cliques in which this contact surface is a member; the list is always sorted in ascending order.

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.
static ContactCliqueId createNewContactClique ()
 Create a new contact clique and return its unique integer id (thread safe).

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 uniform throughout a large solid volume or a thin layer of uniform material thickness h on top of a rigid substrate.

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 
) [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 = Infinity 
) [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.

Set this to Infinity to indicate that the surface is part of a solid object of this material, with dimensions treated as large compared to the contact patch dimensions.

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 Infinity indicating that the surface is the outside of a solid made uniformly of this material.

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.

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

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

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 referemce tp 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 
) [inline, static]

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 ( ) [inline, static]

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines