|
| 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...
|
|
ContactSurface & | setShape (const ContactGeometry &shape) |
| Define a new shape for this ContactSurface. More...
|
|
ContactSurface & | setMaterial (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...
|
|
ContactSurface & | setThickness (Real thickness) |
| Set the thickness of the layer of elastic material coating this contact surface. More...
|
|
const ContactGeometry & | getShape () const |
| Get read-only access to the shape of this contact surface. More...
|
|
const ContactMaterial & | getMaterial () 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...
|
|
ContactGeometry & | updShape () |
| Get writable access to the shape of this contact surface. More...
|
|
ContactMaterial & | updMaterial () |
| Get writable access to the material of this contact surface. More...
|
|
ContactSurface & | joinClique (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...
|
|
ContactSurface & | setIndexOnBody (int index) |
| For selection or other purposes, you may want to use this method to store an index that can identify this particular contact surface. More...
|
|
ContactSurface & | setUserRef (void *userRef) |
| Use this method to store an arbitrary reference pointer with this ContactSurface object. More...
|
|
int | getIndexOnBody () const |
| Return the index that was supplied to the most recent setIndexOnBody() call for this ContactSurface object, or -1 if that method has not been called. More...
|
|
void * | getUserRef () const |
| Return the pointer value that was supplied to the most recent setUserRef() call for this ContactSurface object, or nullptr if that method has not been called. More...
|
|
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.
When a ContactSurface is added to a Body it is assigned a small integer index number, which is retained in the ContactSurface object. When the Body is used to create a MobilizedBody, the MobilizedBody gets its own unshared copy of the Body and that includes a copy of that Body's ContactSurface objects, each with its index intact. So the pair (MobilizedBody,index) uniquely identifies a particular ContactSurface. It is also possible to store an arbitary void*
pointer with a ContactSurface that can be helpful in mapping back from observed contacts to the model objects that are contacting.
For selection or other purposes, you may want to use this method to store an index that can identify this particular contact surface.
The index is set automatically when you add a contact surface to a body. As an alternative, or addition, see setUserRef(). In any case the index is simply stored with the object and returned if you ask for it. If you don't set it the value is -1. The index is copied if you copy the ContactSurface object. Be sure to change it afterwards if that is not the correct index for the copy, or add it to a Body in which case it will be set automatically.
A reference to this just-modified ContactSurface is returned in the manner of an assignment operator.