OpenSim::CustomJoint Class Reference

A class implementing a custom joint. More...

#include <CustomJoint.h>

Inheritance diagram for OpenSim::CustomJoint:
OpenSim::Joint OpenSim::ModelComponent OpenSim::Object

List of all members.

Public Member Functions

 CustomJoint ()
 Default constructor.
 CustomJoint (const std::string &name, Body &parent, SimTK::Vec3 locationInParent, SimTK::Vec3 orientationInParent, Body &body, SimTK::Vec3 locationInBody, SimTK::Vec3 orientationInBody, SpatialTransform &aSpatialTransform, bool reverse=false)
 Constructor.
 CustomJoint (const std::string &name, Body &parent, SimTK::Vec3 locationInParent, SimTK::Vec3 orientationInParent, Body &body, SimTK::Vec3 locationInBody, SimTK::Vec3 orientationInBody, bool reverse=false)
 Convenience Constructor.
 CustomJoint (const CustomJoint &aJoint)
 Copy constructor.
virtual ~CustomJoint ()
 Destructor.
virtual Objectcopy () const
 Copy this body and return a pointer to the copy.
CustomJointoperator= (const CustomJoint &aJoint)
 Assignment operator.
void copyData (const CustomJoint &aJoint)
 Copy data members from one CustomJoint to another.
virtual int numCoordinates () const
virtual SpatialTransformgetSpatialTransform () const
virtual void scale (const ScaleSet &aScaleSet)
 Scale a joint based on XYZ scale factors for the bodies.
virtual void updateFromXMLNode ()
 Override of the default implementation to account for versioning.
 OPENSIM_DECLARE_DERIVED (CustomJoint, Joint)

Protected Member Functions

void constructCoordinates ()
 Construct coordinates according to the mobilities of the Joint.
virtual void setup (Model &aModel)
 Perform some set up functions that happen after the object has been deserialized or copied.
virtual void createSystem (SimTK::MultibodySystem &system) const
 This is called when a SimTK System is being created for the Model.

Protected Attributes

PropertyObj _spatialTransformProp
 Spatial transform defining how the child body moves with respect to the parent body as a function of the generalized coordinates.
SpatialTransform_spatialTransform

Detailed Description

A class implementing a custom joint.

The underlying joint in Simbody is a custom mobilizer.

Author:
Frank C. Anderson
Version:
1.0

Constructor & Destructor Documentation

CustomJoint::CustomJoint (  ) 

Default constructor.

CustomJoint::CustomJoint ( const std::string &  name,
OpenSim::Body parent,
SimTK::Vec3  locationInParent,
SimTK::Vec3  orientationInParent,
OpenSim::Body body,
SimTK::Vec3  locationInBody,
SimTK::Vec3  orientationInBody,
SpatialTransform aSpatialTransform,
bool  reverse = false 
)

Constructor.

CustomJoint::CustomJoint ( const std::string &  name,
OpenSim::Body parent,
SimTK::Vec3  locationInParent,
SimTK::Vec3  orientationInParent,
OpenSim::Body body,
SimTK::Vec3  locationInBody,
SimTK::Vec3  orientationInBody,
bool  reverse = false 
)

Convenience Constructor.

CustomJoint::CustomJoint ( const CustomJoint aJoint  ) 

Copy constructor.

Parameters:
aJoint CustomJoint to be copied.
CustomJoint::~CustomJoint (  )  [virtual]

Destructor.


Member Function Documentation

void CustomJoint::constructCoordinates (  )  [protected]

Construct coordinates according to the mobilities of the Joint.

Reimplemented from OpenSim::Joint.

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

Copy this body and return a pointer to the copy.

The copy constructor for this class is used.

Returns:
Pointer to a copy of this OpenSim::Body.

Implements OpenSim::Joint.

void CustomJoint::copyData ( const CustomJoint aJoint  ) 

Copy data members from one CustomJoint to another.

Parameters:
aJoint CustomJoint to be copied.

Reimplemented from OpenSim::Joint.

void CustomJoint::createSystem ( SimTK::MultibodySystem &  system  )  const [protected, virtual]

This is called when a SimTK System is being created for the Model.

It must be implemented to add appropriate elements to the System corresponding to this object. Methods for adding modeling options, state variables and their derivatives, discrete variables, as well must be called with createSystem() only.

Parameters:
system the System being created

Reimplemented from OpenSim::Joint.

virtual SpatialTransform& OpenSim::CustomJoint::getSpatialTransform (  )  const [inline, virtual]
virtual int OpenSim::CustomJoint::numCoordinates (  )  const [inline, virtual]

Implements OpenSim::Joint.

OpenSim::CustomJoint::OPENSIM_DECLARE_DERIVED ( CustomJoint  ,
Joint   
)
CustomJoint & CustomJoint::operator= ( const CustomJoint aJoint  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Joint.

void CustomJoint::scale ( const ScaleSet aScaleSet  )  [virtual]

Scale a joint based on XYZ scale factors for the bodies.

Parameters:
aScaleSet Set of XYZ scale factors for the bodies.

Reimplemented from OpenSim::Joint.

void CustomJoint::setup ( Model aModel  )  [protected, virtual]

Perform some set up functions that happen after the object has been deserialized or copied.

Parameters:
aEngine dynamics engine containing this CustomJoint.

Reimplemented from OpenSim::Joint.

void CustomJoint::updateFromXMLNode (  )  [virtual]

Override of the default implementation to account for versioning.

Reimplemented from OpenSim::Object.


Member Data Documentation

Spatial transform defining how the child body moves with respect to the parent body as a function of the generalized coordinates.

Motion over 6 (independent) spatial axes must be defined.


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

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