Simbody  3.4 (development)
SimTK::Constraint::Rod Class Reference

This constraint consists of one constraint equation that enforces a constant distance between a point on one body and a point on another body. More...

#include <Constraint.h>

+ Inheritance diagram for SimTK::Constraint::Rod:

List of all members.

Public Member Functions

 Rod (MobilizedBody &body1, MobilizedBody &body2, Real defaultLength=1)
 Rod (MobilizedBody &body1, const Vec3 &defaultPoint1, MobilizedBody &body2, const Vec3 &defaultPoint2, Real defaultLength=1)
 Rod ()
 Default constructor creates an empty handle.
RodsetDefaultPointOnBody1 (const Vec3 &)
RodsetDefaultPointOnBody2 (const Vec3 &)
RodsetDefaultRodLength (Real)
MobilizedBodyIndex getBody1MobilizedBodyIndex () const
MobilizedBodyIndex getBody2MobilizedBodyIndex () const
const Vec3getDefaultPointOnBody1 () const
const Vec3getDefaultPointOnBody2 () const
Real getDefaultRodLength () const
const Vec3getPointOnBody1 (const State &) const
const Vec3getPointOnBody2 (const State &) const
Real getRodLength (const State &) const
Real getPositionError (const State &) const
Real getVelocityError (const State &) const
Real getAccelerationError (const State &) const
Real getMultiplier (const State &) const
Real getRodTension (const State &) const

Detailed Description

This constraint consists of one constraint equation that enforces a constant distance between a point on one body and a point on another body.

This is like connecting them by a rigid, massless rod with ball joints at either end. The constraint is enforced by a force acting along the rod with opposite signs at either end. When positive, this represents tension in the rod pulling the points together; when negative it represents compression keeping the points separated.

Warning:
You can't use this to enforce a distance of zero between two points. That takes three constraints because there is no restriction on the force direction. For a distance of zero (i.e., you want the points to be coincident) use a Ball constraint, a.k.a. CoincidentPoints constraint.

Constructor & Destructor Documentation

SimTK::Constraint::Rod::Rod ( MobilizedBody body1,
MobilizedBody body2,
Real  defaultLength = 1 
)
SimTK::Constraint::Rod::Rod ( MobilizedBody body1,
const Vec3 defaultPoint1,
MobilizedBody body2,
const Vec3 defaultPoint2,
Real  defaultLength = 1 
)

Default constructor creates an empty handle.


Member Function Documentation

Real SimTK::Constraint::Rod::getRodLength ( const State ) const
Real SimTK::Constraint::Rod::getMultiplier ( const State ) const
Real SimTK::Constraint::Rod::getRodTension ( const State ) const

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