OpenSim::CMC_Point Class Reference

A class for specifying and computing parameters for tracking a point. More...

#include <CMC_Point.h>

Inheritance diagram for OpenSim::CMC_Point:
OpenSim::CMC_Task OpenSim::TrackingTask OpenSim::Object

List of all members.

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 Objectcopy () const
 Copy this track object and return a pointer to the copy.
CMC_Pointoperator= (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

Detailed Description

A class for specifying and computing parameters for tracking a point.

Author:
Frank C. Anderson
Version:
1.0

Constructor & Destructor Documentation

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.

Parameters:
aTask Point task to be copied.
CMC_Point::~CMC_Point (  )  [virtual]

Destructor.


Member Function Documentation

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.

See also:
Model::computeAccelerations()
suTrackObject::getAcceleration()

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.

Parameters:
aTI Initial time of the controlled interval in real time units.
aTF Final time of the controlled interval in real time units.
See also:
Model::set()
Model::setStates()

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.

Parameters:
aT Current time in real time units.
See also:
Model::set()
Model::setStates()

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.

Returns:
Pointer to a copy of this track object.

Implements OpenSim::CMC_Task.

SimTK::Vec3 CMC_Point::getPoint (  )  const

Get the point that is to be tracked.

Returns:
Components of the tracked point.
CMC_Point & CMC_Point::operator= ( const CMC_Point aTask  ) 

Assignment operator.

Parameters:
aTask Object to be copied.
Returns:
Reference to the altered object.

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.

Parameters:
aModel Model.

Reimplemented from OpenSim::TrackingTask.

void CMC_Point::setPoint ( const SimTK::Vec3 &  aPoint  ) 

Set the point that is to be tracked.

Parameters:
aPoint Components of the tracked point.
void CMC_Point::updateFromXMLNode (  )  [virtual]

Update this object based on its XML node.

Parameters:
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.


Member Data Documentation

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]

Location of the tracked point on the body expressed in the body-local coordinate frame.

SimTK::Vec3 OpenSim::CMC_Point::_v [protected]

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

Generated on Sun Sep 25 00:20:05 2011 for OpenSim by  doxygen 1.6.1