An abstract base class for specifying a target for a tracking problem. More...
#include <TrackingTask.h>
Public Member Functions | |
TrackingTask () | |
Construct a default track object for a specified model. | |
TrackingTask (const TrackingTask &aTaskObject) | |
Copy constructor. | |
virtual | ~TrackingTask () |
Destructor. | |
virtual Object * | copy () const =0 |
Construct and return a copy of this object. | |
TrackingTask & | operator= (const TrackingTask &aTaskObject) |
Assignment operator. | |
virtual void | setModel (OpenSim::Model &aModel) |
Set the model to which this track object applies. | |
Model * | getModel () const |
Get the model to which this track object applies. | |
void | setOn (bool aTrueFalse) |
Turn this track object on or off. | |
bool | getOn () const |
Get whether or not this track object is on. | |
void | setWeight (double aW0, double aW1=0.0, double aW2=0.0) |
Set the weight of each track goal. | |
void | setWeights (const Array< double > &aWeights) |
double | getWeight (int aWhich) const |
Get the weight of each track goal. | |
const Array< double > & | getWeights () const |
int | getNumTaskFunctions () const |
Get the number of position track functions. | |
virtual void | setTaskFunctions (Function *aF0, Function *aF1=NULL, Function *aF2=NULL) |
Set the track functions. | |
Protected Attributes | |
PropertyBool | _propOn |
Property to indicate on or off state. | |
PropertyDblArray | _propW |
Weights of the task goals. | |
bool & | _on |
Reference to the value of the on property. | |
Array< double > & | _w |
Reference to the value of the Weight property. | |
Model * | _model |
Model. | |
int | _nTrk |
Number of functions for this target. | |
Function * | _pTrk [3] |
Position task functions. | |
Function * | _vTrk [3] |
Velocity task functions. | |
Function * | _aTrk [3] |
Acceleration task functions. |
An abstract base class for specifying a target for a tracking problem.
TrackingTask::TrackingTask | ( | ) |
Construct a default track object for a specified model.
TrackingTask::TrackingTask | ( | const TrackingTask & | aTask | ) |
Copy constructor.
aTask | Task object to be copied. |
TrackingTask::~TrackingTask | ( | ) | [virtual] |
Destructor.
virtual Object* OpenSim::TrackingTask::copy | ( | ) | const [pure virtual] |
Construct and return a copy of this object.
The object is allocated using the new operator, so the caller is responsible for deleting the returned object.
Reimplemented from OpenSim::Object.
Implemented in OpenSim::CMC_Joint, OpenSim::CMC_Point, OpenSim::CMC_Task, OpenSim::MuscleStateTrackingTask, and OpenSim::SMC_Joint.
Model * TrackingTask::getModel | ( | ) | const |
Get the model to which this track object applies.
int TrackingTask::getNumTaskFunctions | ( | ) | const |
Get the number of position track functions.
bool TrackingTask::getOn | ( | ) | const |
Get whether or not this track object is on.
double TrackingTask::getWeight | ( | int | aWhich | ) | const |
Get the weight of each track goal.
aWhich | Number of the track goal in question. |
Reimplemented in OpenSim::CMC_Task.
const Array<double>& OpenSim::TrackingTask::getWeights | ( | ) | const [inline] |
TrackingTask & TrackingTask::operator= | ( | const TrackingTask & | aTask | ) |
Assignment operator.
Reimplemented from OpenSim::Object.
Reimplemented in OpenSim::CMC_Joint, OpenSim::CMC_Point, OpenSim::CMC_Task, OpenSim::MuscleStateTrackingTask, OpenSim::SMC_Joint, and OpenSim::StateTrackingTask.
void TrackingTask::setModel | ( | OpenSim::Model & | aModel | ) | [virtual] |
Set the model to which this track object applies.
aModel | Model. |
Reimplemented in OpenSim::CMC_Joint, and OpenSim::CMC_Point.
void TrackingTask::setOn | ( | bool | aTrueFalse | ) |
Turn this track object on or off.
aTureFalse | Turns analysis on if "true" and off if "false". |
void TrackingTask::setWeight | ( | double | aW0, | |
double | aW1 = 0.0 , |
|||
double | aW2 = 0.0 | |||
) |
Set the weight of each track goal.
aW0 | Weight for track goal 0. | |
aW1 | Weight for track goal 1. | |
aW2 | Weight for track goal 2. |
Reimplemented in OpenSim::CMC_Task.
void OpenSim::TrackingTask::setWeights | ( | const Array< double > & | aWeights | ) | [inline] |
Function* OpenSim::TrackingTask::_aTrk[3] [protected] |
Acceleration task functions.
If acceleration task functions are not specified, derivatives of the position task function are used.
Model* OpenSim::TrackingTask::_model [protected] |
int OpenSim::TrackingTask::_nTrk [protected] |
Number of functions for this target.
bool& OpenSim::TrackingTask::_on [protected] |
Reference to the value of the on property.
PropertyBool OpenSim::TrackingTask::_propOn [protected] |
Property to indicate on or off state.
PropertyDblArray OpenSim::TrackingTask::_propW [protected] |
Weights of the task goals.
Function* OpenSim::TrackingTask::_pTrk[3] [protected] |
Position task functions.
Different types of tasks can require different numbers of task functions. For example, to track a joint angle, only one task function is needed. However, to track a position, up to three task functions may be needed.
Function* OpenSim::TrackingTask::_vTrk[3] [protected] |
Velocity task functions.
If velocity task functions are not specified, derivatives of the position task function are used.
Array<double>& OpenSim::TrackingTask::_w [protected] |
Reference to the value of the Weight property.