OpenSim::TransformAxis Class Reference

A class expressing a tranformation of a child body in relation to a parent body along either a translation or rotation axis. More...

#include <TransformAxis.h>

Inheritance diagram for OpenSim::TransformAxis:
OpenSim::Object

List of all members.

Public Member Functions

 TransformAxis ()
 Default constructor.
 TransformAxis (const Array< std::string > &coordNames, const SimTK::Vec3 &aAxis)
 TransformAxis (DOMElement *aNode)
 Constructor from XML node.
 TransformAxis (const TransformAxis &anAxis)
 Copy constructor.
virtual ~TransformAxis ()
 Destructor.
virtual Objectcopy () const
 Copy this dof and return a pointer to the copy.
TransformAxisoperator= (const TransformAxis &anAxis)
 Assignment operator.
void copyData (const TransformAxis &anAxis)
 Copy data members from one TransformAxis to another.
virtual void setCoordinateNames (const Array< std::string > &coordNames)
virtual const Array< std::string > getCoordinateNames () const
virtual bool hasFunction () const
 Determine whether a custom function has been specified to map between the generalized coordinate and the amount of transformation along the specified axis.
virtual FunctiongetFunction () const
 Get the custom function that maps between the generalized coordinate and the amount of transformation along the specified axis.
virtual void setFunction (Function *aFunction)
 Set the custom function that maps between the generalized coordinate and the amount of transformation along the specified axis.
virtual void setFunction (const Function &aFunction)
 Set the custom function that maps between the generalized coordinate and the amount of transformation along the specified axis.
JointgetJoint ()
virtual double getValue (const SimTK::State &s)
 Get the current value of the transform.
virtual void setAxis (const SimTK::Vec3 &aAxis)
 Set the transformation axis.
virtual void getAxis (SimTK::Vec3 &rAxis) const
 Get the transformation axis.
virtual void getAxis (double rAxis[]) const
const SimTK::Vec3 & getAxis () const
virtual void setup (Joint &aJoint)
 Perform set up functions after model has been deserialized or copied.
virtual void updateFromXMLNode ()
 Update this object based on its XML node.
 OPENSIM_DECLARE_DERIVED (TransformAxis, Object)

Protected Attributes

PropertyDblVec3 _axisProp
 Rotation or translation axis for the transform.
SimTK::Vec3 & _axis
PropertyObjPtr< Function_functionProp
 Transform function of the generalized coordinate used to represent the amount of transformation along a specified axis.
Function *& _function
PropertyStrArray _coordinateNamesProp
 Names of the coordinate that serves as the indepenent variables of the tranform function.
Array< std::string > & _coordinateNames
Joint_joint

Friends

class SimbodyEngine

Detailed Description

A class expressing a tranformation of a child body in relation to a parent body along either a translation or rotation axis.

Author:
Peter Loan, Frank C. Anderson, Jeffrey A. Reinbolt, Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

TransformAxis::TransformAxis (  ) 

Default constructor.

OpenSim::TransformAxis::TransformAxis ( const Array< std::string > &  coordNames,
const SimTK::Vec3 &  aAxis 
)
TransformAxis::TransformAxis ( DOMElement *  aNode  ) 

Constructor from XML node.

TransformAxis::TransformAxis ( const TransformAxis anAxis  ) 

Copy constructor.

Parameters:
anAxis TransformAxis to be copied.
TransformAxis::~TransformAxis (  )  [virtual]

Destructor.


Member Function Documentation

Object * TransformAxis::copy (  )  const [virtual]

Copy this dof and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this TransformAxis.

Reimplemented from OpenSim::Object.

void TransformAxis::copyData ( const TransformAxis anAxis  ) 

Copy data members from one TransformAxis to another.

Parameters:
anAxis TransformAxis to be copied.
const SimTK::Vec3& OpenSim::TransformAxis::getAxis (  )  const [inline]
virtual void OpenSim::TransformAxis::getAxis ( double  rAxis[]  )  const [inline, virtual]
void TransformAxis::getAxis ( SimTK::Vec3 &  rAxis  )  const [virtual]

Get the transformation axis.

Parameters:
rAxis Transformation axis is returned here.
virtual const Array<std::string> OpenSim::TransformAxis::getCoordinateNames (  )  const [inline, virtual]
OpenSim::Function & TransformAxis::getFunction (  )  const [virtual]

Get the custom function that maps between the generalized coordinate and the amount of transformation along the specified axis.

Utility to return the function that this dof uses.

If no function has been specified, this throws an exception.

Returns:
Function used by this dof.
Joint& OpenSim::TransformAxis::getJoint (  )  [inline]
double TransformAxis::getValue ( const SimTK::State &  s  )  [virtual]

Get the current value of the transform.

Returns:
Current value of the transform.
bool TransformAxis::hasFunction (  )  const [virtual]

Determine whether a custom function has been specified to map between the generalized coordinate and the amount of transformation along the specified axis.

OpenSim::TransformAxis::OPENSIM_DECLARE_DERIVED ( TransformAxis  ,
Object   
)
TransformAxis & TransformAxis::operator= ( const TransformAxis anAxis  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Object.

void TransformAxis::setAxis ( const SimTK::Vec3 &  aAxis  )  [virtual]

Set the transformation axis.

Parameters:
aAxis Transformation axis.
virtual void OpenSim::TransformAxis::setCoordinateNames ( const Array< std::string > &  coordNames  )  [virtual]
void TransformAxis::setFunction ( const Function aFunction  )  [virtual]

Set the custom function that maps between the generalized coordinate and the amount of transformation along the specified axis.

This method creates a copy of the original Function object, which is unaffected.

void TransformAxis::setFunction ( OpenSim::Function aFunction  )  [virtual]

Set the custom function that maps between the generalized coordinate and the amount of transformation along the specified axis.

Utility to change the function that this dof uses.

This object adopts ownership of the Function object, and deletes it when this object is itself deleted.

Parameters:
aFunction the function to change to.
void TransformAxis::setup ( Joint aJoint  )  [virtual]

Perform set up functions after model has been deserialized or copied.

Parameters:
aEngine dynamics engine containing this dof.
aJoint joint containing this dof.
void TransformAxis::updateFromXMLNode (  )  [virtual]

Update this object based on its XML node.

Added parameter sourceNode to handle external documents For non-inlined objects the root of the childDocument is passed in else NULL.

Reimplemented from OpenSim::Object.


Friends And Related Function Documentation

friend class SimbodyEngine [friend]

Member Data Documentation

SimTK::Vec3& OpenSim::TransformAxis::_axis [protected]

Rotation or translation axis for the transform.

Names of the coordinate that serves as the indepenent variables of the tranform function.

Transform function of the generalized coordinate used to represent the amount of transformation along a specified axis.


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

Generated on Wed Dec 16 15:03:48 2009 for OpenSim by  doxygen 1.6.1