Simbody
Classes | Public Member Functions

SimTK::ContactForceGenerator Class Reference

A ContactForceGenerator implements an algorithm for responding to overlaps or potential overlaps between pairs of ContactSurface objects, as detected by a ContactTrackerSubsystem. More...

#include <CompliantContactSubsystem.h>

Inheritance diagram for SimTK::ContactForceGenerator:

List of all members.

Classes

class  DoNothing
 This ContactForceGenerator silently does nothing. More...
class  ElasticFoundation
 This ContactForceGenerator handles contact between a TriangleMesh and a variety of other geometric objects, all of which produce a TriangleMeshContact tracking object. More...
class  HertzCircular
 This ContactForceGenerator handles contact between non-conforming objects that meet at a point and generate a circular contact patch; those generate a CircularPointContact tracking object. More...
class  HertzElliptical
 This ContactForceGenerator handles contact between non-conforming objects that meet at a point and generate an elliptical contact patch; those generate an EllipticalPointContact tracking object. More...
class  ThrowError
 This ContactForceGenerator throws an error if it is every invoked. More...

Public Member Functions

 ContactForceGenerator (ContactTypeId type)
 Base class constructor for use by the concrete classes.
ContactTypeId getContactTypeId () const
 Return the ContactTypeId handled by this force generator.
const CompliantContactSubsystemgetCompliantContactSubsystem () const
void setCompliantContactSubsystem (const CompliantContactSubsystem *sub)
virtual ~ContactForceGenerator ()
 Base class destructor is virtual but does nothing.
virtual void calcContactForce (const State &state, const Contact &overlapping, const SpatialVec &V_S1S2, ContactForce &contactForce) const =0
 The CompliantContactSubsystem will invoke this method on any active contact pair of the right Contact type for which there is overlapping undeformed geometry.
virtual void calcContactPatch (const State &state, const Contact &overlapping, const SpatialVec &V_S1S2, ContactPatch &patch) const =0
 The CompliantContactSubsystem will invoke this method in response to a user request for contact patch information; this returns force, potential energy, and power as above but may also require expensive computations that can be avoided in calcContactForce().

Detailed Description

A ContactForceGenerator implements an algorithm for responding to overlaps or potential overlaps between pairs of ContactSurface objects, as detected by a ContactTrackerSubsystem.

This class is used internally by CompliantContactSubsystem and there usually is no reason to access it directly. The exception is if you are defining a new Contact subclass (very rare). In that case, you will also need to define one or more ContactForceGenerators to respond to Contacts with the new type, then register it with the CompliantContactSubsystem.


Constructor & Destructor Documentation

SimTK::ContactForceGenerator::ContactForceGenerator ( ContactTypeId  type) [inline, explicit]

Base class constructor for use by the concrete classes.

virtual SimTK::ContactForceGenerator::~ContactForceGenerator ( ) [inline, virtual]

Base class destructor is virtual but does nothing.


Member Function Documentation

ContactTypeId SimTK::ContactForceGenerator::getContactTypeId ( ) const [inline]

Return the ContactTypeId handled by this force generator.

ContactTypeId(0) is reserved and is used here for fallback force generators that deal with unrecognized ContactTypeIds.

const CompliantContactSubsystem& SimTK::ContactForceGenerator::getCompliantContactSubsystem ( ) const [inline]
void SimTK::ContactForceGenerator::setCompliantContactSubsystem ( const CompliantContactSubsystem sub) [inline]
virtual void SimTK::ContactForceGenerator::calcContactForce ( const State state,
const Contact overlapping,
const SpatialVec V_S1S2,
ContactForce contactForce 
) const [pure virtual]

The CompliantContactSubsystem will invoke this method on any active contact pair of the right Contact type for which there is overlapping undeformed geometry.

The force generator is expected to calculate a point in space where equal and opposite contact forces should be applied to the two contacting rigid bodies, the potential energy currently stored in this contact, and the power (energy dissipation rate). State should be used for instance info only; use position information from overlapping and velocity information from the supplied arguments. That allows this method to be used as an operator, for example to calculate potential energy when velocities are not yet available.

Implemented in SimTK::ContactForceGenerator::HertzCircular, SimTK::ContactForceGenerator::HertzElliptical, SimTK::ContactForceGenerator::ElasticFoundation, SimTK::ContactForceGenerator::DoNothing, and SimTK::ContactForceGenerator::ThrowError.

virtual void SimTK::ContactForceGenerator::calcContactPatch ( const State state,
const Contact overlapping,
const SpatialVec V_S1S2,
ContactPatch patch 
) const [pure virtual]

The CompliantContactSubsystem will invoke this method in response to a user request for contact patch information; this returns force, potential energy, and power as above but may also require expensive computations that can be avoided in calcContactForce().

Don't use the state for position or velocity information; the only allowed positions are in the Contact object and the velocities are supplied explicitly.

Implemented in SimTK::ContactForceGenerator::HertzCircular, SimTK::ContactForceGenerator::HertzElliptical, SimTK::ContactForceGenerator::ElasticFoundation, SimTK::ContactForceGenerator::DoNothing, and SimTK::ContactForceGenerator::ThrowError.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines