A class for specifying and computing parameters for tracking a point. More...
#include <CMC_Point.h>
Public Member Functions | |
CMC_Point (const SimTK::Vec3 &aPoint=SimTK::Vec3(0)) | |
Construct a task for a specified point. | |
CMC_Point (const CMC_Point &aTask) | |
Copy constructor. | |
virtual | ~CMC_Point () |
Destructor. | |
virtual Object * | copy () const |
Copy this track object and return a pointer to the copy. | |
CMC_Point & | operator= (const CMC_Point &aTask) |
Assignment operator. | |
virtual void | setModel (Model &aModel) |
Initializes pointers to the Coordinate and Speed in the model given the coordinate name assigned to this task. | |
void | setPoint (const SimTK::Vec3 &aPoint) |
Set the point that is to be tracked. | |
SimTK::Vec3 | getPoint () const |
Get the point that is to be tracked. | |
virtual void | computeErrors (const SimTK::State &s, double aT) |
Compute the position and velocity errors. | |
virtual void | computeDesiredAccelerations (const SimTK::State &s, double aT) |
Compute the desired accelerations. | |
virtual void | computeDesiredAccelerations (const SimTK::State &s, double aTI, double aTF) |
Compute the desired accelerations. | |
virtual void | computeAccelerations (const SimTK::State &s) |
Compute the acceleration of the appropriate point. | |
virtual void | updateFromXMLNode () |
Update this object based on its XML node. | |
Protected Attributes | |
PropertyDblVec3 | _propPoint |
Location of the tracked point on the body expressed in the body-local coordinate frame. | |
SimTK::Vec3 & | _point |
SimTK::Vec3 | _p |
SimTK::Vec3 | _v |
SimTK::Vec3 | _inertialPTrk |
SimTK::Vec3 | _inertialVTrk |
Body * | _wrtBody |
Body * | _expressBody |
A class for specifying and computing parameters for tracking a point.
CMC_Point::CMC_Point | ( | const SimTK::Vec3 & | aPoint = SimTK::Vec3(0) |
) |
Construct a task for a specified point.
CMC_Point::CMC_Point | ( | const CMC_Point & | aTask | ) |
Copy constructor.
aTask | Point task to be copied. |
CMC_Point::~CMC_Point | ( | ) | [virtual] |
Destructor.
void CMC_Point::computeAccelerations | ( | const SimTK::State & | s | ) | [virtual] |
Compute the acceleration of the appropriate point.
For the computed accelerations to be correct, Model::computeAccelerations() must have already been called.
For joints (i.e., generalized coordinates), the acceleration is not computed. It has already been computed and is simply retrieved from the model.
Implements OpenSim::CMC_Task.
void CMC_Point::computeDesiredAccelerations | ( | const SimTK::State & | s, | |
double | aTI, | |||
double | aTF | |||
) | [virtual] |
Compute the desired accelerations.
This method assumes that the states have been set for the model.
aTI | Initial time of the controlled interval in real time units. | |
aTF | Final time of the controlled interval in real time units. |
Implements OpenSim::CMC_Task.
void CMC_Point::computeDesiredAccelerations | ( | const SimTK::State & | s, | |
double | aT | |||
) | [virtual] |
Compute the desired accelerations.
Implements OpenSim::CMC_Task.
void CMC_Point::computeErrors | ( | const SimTK::State & | s, | |
double | aT | |||
) | [virtual] |
Compute the position and velocity errors.
This method assumes the states have been set for the model.
aT | Current time in real time units. |
Implements OpenSim::CMC_Task.
Object * CMC_Point::copy | ( | ) | const [virtual] |
Copy this track object and return a pointer to the copy.
The copy constructor for this class is used.
Implements OpenSim::CMC_Task.
SimTK::Vec3 CMC_Point::getPoint | ( | ) | const |
Get the point that is to be tracked.
Assignment operator.
aTask | Object to be copied. |
Reimplemented from OpenSim::CMC_Task.
void CMC_Point::setModel | ( | Model & | aModel | ) | [virtual] |
Initializes pointers to the Coordinate and Speed in the model given the coordinate name assigned to this task.
aModel | Model. |
Reimplemented from OpenSim::TrackingTask.
void CMC_Point::setPoint | ( | const SimTK::Vec3 & | aPoint | ) |
Set the point that is to be tracked.
aPoint | Components of the tracked point. |
void CMC_Point::updateFromXMLNode | ( | ) | [virtual] |
Update this object based on its XML node.
aDeep | If true, update this object and all its child objects (that is, member variables that are Object's); if false, update only the member variables that are not Object's. |
Reimplemented from OpenSim::CMC_Task.
Body * OpenSim::CMC_Point::_expressBody [protected] |
SimTK::Vec3 OpenSim::CMC_Point::_inertialPTrk [protected] |
SimTK::Vec3 OpenSim::CMC_Point::_inertialVTrk [protected] |
SimTK::Vec3 OpenSim::CMC_Point::_p [protected] |
SimTK::Vec3& OpenSim::CMC_Point::_point [protected] |
PropertyDblVec3 OpenSim::CMC_Point::_propPoint [protected] |
Location of the tracked point on the body expressed in the body-local coordinate frame.
SimTK::Vec3 OpenSim::CMC_Point::_v [protected] |
Body* OpenSim::CMC_Point::_wrtBody [protected] |