OpenSim::Ligament Class Reference

A class implementing a ligament. More...

#include <Ligament.h>

Inheritance diagram for OpenSim::Ligament:
OpenSim::Force OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 Ligament ()
 Default constructor.
 Ligament (const Ligament &aLigament)
 Copy constructor.
virtual ~Ligament ()
 Destructor.
virtual Objectcopy () const
 Copy this ligament and return a pointer to the copy.
Ligamentoperator= (const Ligament &aLigament)
 Assignment operator.
void copyData (const Ligament &aLigament)
 Copy data members from one ligament to another.
GeometryPathgetGeometryPath () const
virtual bool hasGeometryPath () const
 return a flag indicating whether the Force is applied along a Path if you override this method to return true for a specific subclass, it must also implement the getGeometryPath() mathod
virtual double getLength (const SimTK::State &s) const
 Get the length of the ligament.
virtual double getRestingLength () const
virtual bool setRestingLength (double aRestingLength)
 Set the resting length.
virtual double getMaxIsometricForce () const
virtual bool setMaxIsometricForce (double aMaxIsometricForce)
 Set the maximum isometric force.
virtual FunctiongetForceLengthCurve () const
virtual bool setForceLengthCurve (Function *aForceLengthCurve)
 Set the force-length curve.
virtual double computeMomentArm (SimTK::State &s, Coordinate &aCoord) const
 Compute the moment-arm of this muscle about a coordinate.
virtual void computeForce (const SimTK::State &s, SimTK::Vector_< SimTK::SpatialVec > &bodyForces, SimTK::Vector &generalizedForces) const
 Subclasses must implement this method to compute the forces that should be applied to bodies and generalized speeds.
virtual void preScale (const SimTK::State &s, const ScaleSet &aScaleSet)
 Perform computations that need to happen before the ligament is scaled.
virtual void scale (const SimTK::State &s, const ScaleSet &aScaleSet)
 Scale the ligament.
virtual void postScale (const SimTK::State &s, const ScaleSet &aScaleSet)
 Perform computations that need to happen after the ligament is scaled.
virtual VisibleObjectgetDisplayer () const
 Get the visible object used to represent the Ligament.
virtual void updateDisplayer (const SimTK::State &s)
 Update the visible object used to represent the Ligament.
 OPENSIM_DECLARE_DERIVED (Ligament, Force)

Protected Member Functions

virtual void setup (Model &aModel)
 Perform some set up functions that happen after the ligament has been deserialized or copied.
virtual void createSystem (SimTK::MultibodySystem &system) const
 allocate and initialize the SimTK state for this ligament.
virtual void initState (SimTK::State &s) const
 This is called after a SimTK System and State have been created for the Model.

Protected Attributes

PropertyObj _pathProp
GeometryPath_path
PropertyDbl _restingLengthProp
 Resting length of the ligament fibers.
double & _restingLength
PropertyDbl _pcsaForceProp
 Force for un-normalizing force-length curve (proportional to PCSA).
double & _pcsaForce
PropertyObjPtr< Function_forceLengthCurveProp
 Force-length behavior of the ligament fibers.
Function *& _forceLengthCurve

Detailed Description

A class implementing a ligament.

The path of the ligament is stored in a GeometryPath object.

Version:
1.0

Constructor & Destructor Documentation

Ligament::Ligament (  ) 

Default constructor.

Ligament::Ligament ( const Ligament aLigament  ) 

Copy constructor.

Parameters:
aLigament Ligament to be copied.
Ligament::~Ligament (  )  [virtual]

Destructor.

Delete any variables allocated using the "new" operator. You will not necessarily have any of these.


Member Function Documentation

void Ligament::computeForce ( const SimTK::State &  state,
SimTK::Vector_< SimTK::SpatialVec > &  bodyForces,
SimTK::Vector &  generalizedForces 
) const [virtual]

Subclasses must implement this method to compute the forces that should be applied to bodies and generalized speeds.

This is invoked by ForceAdapter to perform the force computation.

Reimplemented from OpenSim::Force.

double Ligament::computeMomentArm ( SimTK::State &  s,
Coordinate aCoord 
) const [virtual]

Compute the moment-arm of this muscle about a coordinate.

Object * Ligament::copy (  )  const [virtual]

Copy this ligament and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this ligament.

Implements OpenSim::Force.

void Ligament::copyData ( const Ligament aLigament  ) 

Copy data members from one ligament to another.

Parameters:
aLigament Ligament to be copied.

Reimplemented from OpenSim::Force.

void Ligament::createSystem ( SimTK::MultibodySystem &  system  )  const [protected, virtual]

allocate and initialize the SimTK state for this ligament.

Reimplemented from OpenSim::Force.

VisibleObject * Ligament::getDisplayer (  )  const [virtual]

Get the visible object used to represent the Ligament.

Reimplemented from OpenSim::Object.

virtual Function* OpenSim::Ligament::getForceLengthCurve (  )  const [inline, virtual]
GeometryPath& OpenSim::Ligament::getGeometryPath (  )  const [inline]
double Ligament::getLength ( const SimTK::State &  s  )  const [virtual]

Get the length of the ligament.

This is a convenience function that passes the request on to the ligament path.

Returns:
Current length of the ligament path.
virtual double OpenSim::Ligament::getMaxIsometricForce (  )  const [inline, virtual]
virtual double OpenSim::Ligament::getRestingLength (  )  const [inline, virtual]
virtual bool OpenSim::Ligament::hasGeometryPath (  )  const [inline, virtual]

return a flag indicating whether the Force is applied along a Path if you override this method to return true for a specific subclass, it must also implement the getGeometryPath() mathod

Reimplemented from OpenSim::Force.

void Ligament::initState ( SimTK::State &  state  )  const [protected, virtual]

This is called after a SimTK System and State have been created for the Model.

It must be implementd to set initial values of state variables.

Parameters:
state the State to initialize

Reimplemented from OpenSim::Force.

OpenSim::Ligament::OPENSIM_DECLARE_DERIVED ( Ligament  ,
Force   
)
Ligament & Ligament::operator= ( const Ligament aLigament  ) 

Assignment operator.

Returns:
Reference to this ligament.

Reimplemented from OpenSim::Force.

void Ligament::postScale ( const SimTK::State &  s,
const ScaleSet aScaleSet 
) [virtual]

Perform computations that need to happen after the ligament is scaled.

For this object, that entails comparing the length before and after scaling, and scaling the resting length a proportional amount.

Parameters:
aScaleSet XYZ scale factors for the bodies.
void Ligament::preScale ( const SimTK::State &  s,
const ScaleSet aScaleSet 
) [virtual]

Perform computations that need to happen before the ligament is scaled.

For this object, that entails calculating and storing the length in the current body position.

Parameters:
aScaleSet XYZ scale factors for the bodies.
void Ligament::scale ( const SimTK::State &  s,
const ScaleSet aScaleSet 
) [virtual]

Scale the ligament.

Parameters:
aScaleSet XYZ scale factors for the bodies
Returns:
Whether or not the ligament was scaled successfully
bool Ligament::setForceLengthCurve ( Function aForceLengthCurve  )  [virtual]

Set the force-length curve.

Parameters:
aForceLengthCurve Pointer to a force-length curve (Function).
Returns:
Whether the force-length curve was successfully changed.
bool Ligament::setMaxIsometricForce ( double  aMaxIsometricForce  )  [virtual]

Set the maximum isometric force.

Parameters:
aMaxIsometricForce The maximum isometric force of the ligament.
Returns:
Whether the maximum isometric force was successfully changed.
bool Ligament::setRestingLength ( double  aRestingLength  )  [virtual]

Set the resting length.

Parameters:
aRestingLength The resting length of the ligament.
Returns:
Whether the resting length was successfully changed.
void Ligament::setup ( Model aModel  )  [protected, virtual]

Perform some set up functions that happen after the ligament has been deserialized or copied.

Parameters:
aModel model containing this ligament.

Reimplemented from OpenSim::Force.

void Ligament::updateDisplayer ( const SimTK::State &  s  )  [virtual]

Update the visible object used to represent the Ligament.

Reimplemented from OpenSim::ModelComponent.


Member Data Documentation

Force-length behavior of the ligament fibers.

double& OpenSim::Ligament::_pcsaForce [protected]

Force for un-normalizing force-length curve (proportional to PCSA).

double& OpenSim::Ligament::_restingLength [protected]

Resting length of the ligament fibers.


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

Generated on Sun Sep 25 00:19:58 2011 for OpenSim by  doxygen 1.6.1