OpenSim::SpringGeneralizedForce Class Reference
#include <SpringGeneralizedForce.h>
List of all members.
Constructor & Destructor Documentation
OpenSim::SpringGeneralizedForce::SpringGeneralizedForce |
( |
std::string |
aCoordinateName = "" |
) |
|
Copy constructor.
- Parameters:
-
| aforce | force to be copied. |
SpringGeneralizedForce::~SpringGeneralizedForce |
( |
|
) |
|
Member Function Documentation
void SpringGeneralizedForce::computeForce |
( |
const SimTK::State & |
s |
) |
const [protected, virtual] |
Compute all quantities necessary for applying the spring force to the model.
Implements OpenSim::CustomForce.
Object * SpringGeneralizedForce::copy |
( |
|
) |
const [virtual] |
Copy this force and return a pointer to the copy.
The copy constructor for this class is used.
- Returns:
- Pointer to a copy of this force.
Reimplemented from OpenSim::Object.
Coordinate* OpenSim::SpringGeneralizedForce::getCoordinate |
( |
|
) |
const |
double SpringGeneralizedForce::getRestLength |
( |
|
) |
const |
Get the rest length of the spring.
- Returns:
- Rest length of the spring.
double SpringGeneralizedForce::getStiffness |
( |
|
) |
const |
Get the stiffness of the force.
- Returns:
- Stiffness of the force.
double SpringGeneralizedForce::getViscosity |
( |
|
) |
const |
Get the viscosity of the spring.
- Returns:
- Stiffness of the spring.
Assignment operator.
- Returns:
- Reference to the altered object.
Reimplemented from OpenSim::Object.
void OpenSim::SpringGeneralizedForce::setCoordinate |
( |
Coordinate * |
aCoordinate |
) |
|
void SpringGeneralizedForce::setRestLength |
( |
double |
aRestLength |
) |
|
Set the rest length of the spring.
- Parameters:
-
| aRestLength | Rest length of the spring. |
void SpringGeneralizedForce::setStiffness |
( |
double |
aStiffness |
) |
|
Set the stiffness of the spring.
Normally the stiffness is a positive quantity. Negative stiffnessess will result in an unstable system- the force will push away from the rest length instead of pulling toward it.
- Parameters:
-
| aStiffness | Stiffness of the spring force. |
void SpringGeneralizedForce::setup |
( |
Model & |
aModel |
) |
[virtual] |
void SpringGeneralizedForce::setViscosity |
( |
double |
aViscosity |
) |
|
Set the viscosity of the spring.
Normally the viscosity should be a positive number. Negative viscosities will put energy into the system rather than apply a damping force.
- Parameters:
-
| aViscosity | Viscosity of the spring. |
Member Data Documentation
Corresponding generalized coordinate to which the coordinate actuator is applied.
Name of coordinate to which the spring gen force is applied.
The documentation for this class was generated from the following files:
- OpenSim/Actuators/SpringGeneralizedForce.h
- OpenSim/Actuators/SpringGeneralizedForce.cpp