OpenSim::Ligament Class Reference
A class implementing a ligament.
More...
#include <Ligament.h>
List of all members.
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 |
( |
const Ligament & |
aLigament |
) |
|
Copy constructor.
- Parameters:
-
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 |
) |
const [virtual] |
Subclasses must implement this method to compute the forces that should be applied to bodies and generalized speeds.
Implements OpenSim::CustomForce.
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.
Reimplemented from OpenSim::Object.
void Ligament::copyData |
( |
const Ligament & |
aLigament |
) |
|
Copy data members from one ligament to another.
- Parameters:
-
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] |
void Ligament::initState |
( |
SimTK::State & |
state |
) |
const [virtual] |
This is called after a SimTK System and State have been created for the Model.
It may be overridden to set initial values of state variables.
- Parameters:
-
| state | the State to initialize |
Reimplemented from OpenSim::ModelComponent.
void Ligament::initStateCache |
( |
SimTK::State & |
s, |
|
|
SimTK::SubsystemIndex |
subsystemIndex, |
|
|
Model & |
model | |
|
) |
| | |
allocate and initialize the SimTK state for this ligament.
Assignment operator.
- Returns:
- Reference to this ligament.
Reimplemented from OpenSim::Object.
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 |
) |
[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.
Member Data Documentation
Force-length behavior of the ligament fibers.
Force for un-normalizing force-length curve (proportional to PCSA).
Resting length of the ligament fibers.
The documentation for this class was generated from the following files:
- OpenSim/Simulation/Model/Ligament.h
- OpenSim/Simulation/Model/Ligament.cpp