Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

suTrackJoint Class Reference

A class for tracking the trajectory of a joint. More...

#include <suTrackJoint.h>

Inheritance diagram for suTrackJoint:

suTrackObject rdObject List of all members.

Public Member Functions

 suTrackJoint (int aQID=-1)
 Construct a track joint object for a specified model and generalized coordinate.

 suTrackJoint (IDOM_Element *aElement)
 Construct a track joint object for a specified model from an XML element.

 suTrackJoint (const suTrackJoint &aTrackJoint)
 Copy constructor.

virtual ~suTrackJoint ()
 Destructor.

virtual suTrackObjectcopy () const
 Copy this track object and return a pointer to the copy.

virtual suTrackObjectcopy (IDOM_Element *aElement) const
 Copy this track object and modify the copy so that it is consistent with a specified XML element node.

suTrackJoint & operator= (const suTrackJoint &aTrackJoint)
 Assignment operator.

void setQID (int aQID)
 Set the generalized coordinate that is to be tracked.

int getQID () const
 Get the generalized coordinate that is to be tracked.

virtual void computeErrors (double aT)
 Compute the position and velocity errors.

virtual void computeDesiredAccelerations (double aT)
 Compute the desired accelerations.

virtual void computeAccelerations ()
 Compute the acceleration of the appropriate generalized coordinate.

virtual void updateObject (bool aDeep=true)
 Update this object based on its XML node.

virtual void updateNode (bool aDeep=true)
 Update the XML node representing this object.

virtual void generateNode (IDOM_Element *aParent)
 Generate an XML node representing this object.

void updateData ()
 Update the member data of this object based on its XML node.


Protected Attributes

int _qid
 Generalized coordinate to be tracked.


Private Member Functions

void setNull ()
 Set NULL values for all member variables.

void copyData (const suTrackJoint &aTrackJoint)
 Copy the member data for this class only.


Static Private Attributes

const char PROP_QID [] = "qid"

Detailed Description

A class for tracking the trajectory of a joint.

Author:
Frank C. Anderson, Darryl G. Thelen
Version:
1.0


Constructor & Destructor Documentation

suTrackJoint::suTrackJoint int  aQID = -1  ) 
 

Construct a track joint object for a specified model and generalized coordinate.

Parameters:
aModel Model for which the tracking is conducted.
aQID ID of the generalized coordinate to be tracked.

suTrackJoint::suTrackJoint IDOM_Element *  aElement  ) 
 

Construct a track joint object for a specified model from an XML element.

Parameters:
aModel Model for which the tracking is conducted.
aQID ID of the generalized coordinate to be tracked.

suTrackJoint::suTrackJoint const suTrackJoint &  aTrackJoint  ) 
 

Copy constructor.

Parameters:
aModel Model for which the tracking is conducted.
aQID ID of the generalized coordinate to be tracked.


Member Function Documentation

void suTrackJoint::computeAccelerations  )  [virtual]
 

Compute the acceleration of the appropriate generalized coordinate.

For the computed accelerations to be correct, rdModel::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:
rdModel::computeAccelerations()

suTrackObject::getAcceleration()

Implements suTrackObject.

void suTrackJoint::computeDesiredAccelerations double  aT  )  [virtual]
 

Compute the desired accelerations.

This method assumes that the states have been set for the model.

Parameters:
aT Time at which the desired accelerations are to be computed in real time units.
See also:
rdModel::set()

rdModel::setStates()

Implements suTrackObject.

void suTrackJoint::computeErrors 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:
rdModel::set()

rdModel::setStates()

Implements suTrackObject.

suTrackObject * suTrackJoint::copy IDOM_Element *  aElement  )  const [virtual]
 

Copy this track object and modify the copy so that it is consistent with a specified XML element node.

The copy is constructed by first using the contructor for the IDOM_Element in order to establish the relationship of the rdForce object with the XML node. Then, the assignment operator is used to set all data members of the copy to the values of this object. Finally, the data members of the copy are updated from the IDOM_Elment using updateObject().

Parameters:
aElement XML element.
Returns:
Pointer to a copy of this actuator.

Implements suTrackObject.

suTrackObject * suTrackJoint::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 suTrackObject.

void suTrackJoint::generateNode IDOM_Element *  aParent  )  [virtual]
 

Generate an XML node representing this object.

Parameters:
aParent Intended parent of the node to be generated. If aParent is NULL, the intent is for this object to serve as the root element of a new document.
See also:
rdObject::generateNode()

Reimplemented from suTrackObject.

int suTrackJoint::getQID  )  const
 

Get the generalized coordinate that is to be tracked.

Returns:
ID of the tracked generalized coordinate.

suTrackJoint & suTrackJoint::operator= const suTrackJoint &  aTrackJoint  ) 
 

Assignment operator.

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

void suTrackJoint::setQID int  aQID  ) 
 

Set the generalized coordinate that is to be tracked.

Parameters:
aQID ID of the tracked generalized coordinate.

void suTrackJoint::updateData  ) 
 

Update the member data of this object based on its XML node.

Member objects (children) are not updated.

Reimplemented from suTrackObject.

void suTrackJoint::updateNode bool  aDeep = true  )  [virtual]
 

Update the XML node representing this object.

Parameters:
aDeep If true, update the XML node of this object AND the XML nodes of all class members that are rdObjects (child nodes); if false, update only the XML node of this object without updating the XML nodes of its children.

Reimplemented from suTrackObject.

void suTrackJoint::updateObject bool  aDeep = true  )  [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 rdObject's); if false, update only the member variables that are not rdObject's.

Reimplemented from suTrackObject.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:15 2003 for Simulation Software by doxygen1.3