A class implementing a custom joint. More...
#include <CustomJoint.h>
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 Object * | copy () const |
Copy this body and return a pointer to the copy. | |
CustomJoint & | operator= (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 SpatialTransform & | getSpatialTransform () 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 |
A class implementing a custom joint.
The underlying joint in Simbody is a custom mobilizer.
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.
aJoint | CustomJoint to be copied. |
CustomJoint::~CustomJoint | ( | ) | [virtual] |
Destructor.
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.
Implements OpenSim::Joint.
void CustomJoint::copyData | ( | const CustomJoint & | aJoint | ) |
Copy data members from one CustomJoint to another.
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.
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 | ) |
void CustomJoint::scale | ( | const ScaleSet & | aScaleSet | ) | [virtual] |
Scale a joint based on XYZ scale factors for the bodies.
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.
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.
friend class CoordinateCouplerConstraint [friend] |
friend class SimbodyEngine [friend] |
Reimplemented from OpenSim::Joint.
SpatialTransform& OpenSim::CustomJoint::_spatialTransform [protected] |
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.