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 void setup (Model &aModel)
 Perform some set up functions that happen after the object has been deserialized or copied.
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.
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

Friends

class SimbodyEngine
class CoordinateCouplerConstraint

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 should be overridden to add appropriate elements to the System corresponding to this object.

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  )  [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.


Friends And Related Function Documentation

friend class CoordinateCouplerConstraint [friend]
friend class SimbodyEngine [friend]

Reimplemented from OpenSim::Joint.


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 Wed Dec 16 15:03:47 2009 for OpenSim by  doxygen 1.6.1