A class implementing a Free joint. More...
#include <FreeJoint.h>
Public Member Functions | |
FreeJoint () | |
Default constructor. | |
FreeJoint (const std::string &name, Body &parent, SimTK::Vec3 locationInParent, SimTK::Vec3 orientationInParent, Body &body, SimTK::Vec3 locationInBody, SimTK::Vec3 orientationInBody, bool useEulerAngles=true, bool reverse=false) | |
Convenience Constructor. | |
FreeJoint (const FreeJoint &aJoint) | |
Copy constructor. | |
virtual | ~FreeJoint () |
Destructor. | |
virtual Object * | copy () const |
Copy this body and return a pointer to the copy. | |
FreeJoint & | operator= (const FreeJoint &aJoint) |
Assignment operator. | |
void | copyData (const FreeJoint &aJoint) |
Copy data members from one FreeJoint 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 void | scale (const ScaleSet &aScaleSet) |
Scale a joint based on XYZ scale factors for the bodies. | |
OPENSIM_DECLARE_DERIVED (FreeJoint, Joint) | |
Protected Member Functions | |
void | createSystem (SimTK::MultibodySystem &system) const |
This is called when a SimTK System is being created for the Model. | |
void | initState (SimTK::State &s) const |
This is called after a SimTK System and State have been created for the Model. | |
void | setDefaultsFromState (const SimTK::State &state) |
Set all default values for this object to match those in a specified State. | |
Protected Attributes | |
PropertyBool | _useEulerAnglesProp |
Flag to use Euler angles to parameterize rotation of the body. | |
bool & | _useEulerAngles |
A class implementing a Free joint.
The underlying implementation in Simbody is a MobilizedBody::Free.
FreeJoint::FreeJoint | ( | ) |
Default constructor.
FreeJoint::FreeJoint | ( | const std::string & | name, | |
OpenSim::Body & | parent, | |||
SimTK::Vec3 | locationInParent, | |||
SimTK::Vec3 | orientationInParent, | |||
OpenSim::Body & | body, | |||
SimTK::Vec3 | locationInBody, | |||
SimTK::Vec3 | orientationInBody, | |||
bool | useEulerAngles = true , |
|||
bool | reverse = false | |||
) |
Convenience Constructor.
FreeJoint::FreeJoint | ( | const FreeJoint & | aJoint | ) |
Copy constructor.
aJoint | FreeJoint to be copied. |
FreeJoint::~FreeJoint | ( | ) | [virtual] |
Destructor.
Object * FreeJoint::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 FreeJoint::copyData | ( | const FreeJoint & | aJoint | ) |
Copy data members from one FreeJoint to another.
aJoint | FreeJoint to be copied. |
Reimplemented from OpenSim::Joint.
void FreeJoint::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.
void FreeJoint::initState | ( | SimTK::State & | state | ) | const [protected, virtual] |
This is called after a SimTK System and State have been created for the Model.
It may be overridden to set initial values of state variables.
state | the State to initialize |
Reimplemented from OpenSim::Joint.
virtual int OpenSim::FreeJoint::numCoordinates | ( | ) | const [inline, virtual] |
Implements OpenSim::Joint.
void FreeJoint::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 FreeJoint::setDefaultsFromState | ( | const SimTK::State & | state | ) | [protected, virtual] |
Set all default values for this object to match those in a specified State.
It should be overridden to set any default values defined by each subclass.
state | the State from which to take values that should become the defaults for this object |
Reimplemented from OpenSim::Joint.
void FreeJoint::setup | ( | Model & | aModel | ) | [virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
aEngine | dynamics engine containing this FreeJoint. |
Reimplemented from OpenSim::Joint.
bool& OpenSim::FreeJoint::_useEulerAngles [protected] |
PropertyBool OpenSim::FreeJoint::_useEulerAnglesProp [protected] |
Flag to use Euler angles to parameterize rotation of the body.