OpenSim::BallJoint Class Reference

A class implementing an Ball joint. More...

#include <BallJoint.h>

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

List of all members.

Public Member Functions

 BallJoint ()
 Default constructor.
 BallJoint (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)
 BallJoint (const BallJoint &aJoint)
 Copy constructor.
virtual ~BallJoint ()
 Destructor.
virtual Objectcopy () const
 Copy this body and return a pointer to the copy.
BallJointoperator= (const BallJoint &aJoint)
 Assignment operator.
void copyData (const BallJoint &aJoint)
 Copy data members from one BallJoint 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.

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

Detailed Description

A class implementing an Ball joint.

The underlying implementation in Simbody is a MobilizedBody::Ball.

Author:
Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

BallJoint::BallJoint (  ) 

Default constructor.

OpenSim::BallJoint::BallJoint ( 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 
)
BallJoint::BallJoint ( const BallJoint aJoint  ) 

Copy constructor.

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

Destructor.


Member Function Documentation

Object * BallJoint::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 BallJoint::copyData ( const BallJoint aJoint  ) 

Copy data members from one BallJoint to another.

Parameters:
aJoint BallJoint to be copied.

Reimplemented from OpenSim::Joint.

void BallJoint::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.

void BallJoint::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.

Parameters:
state the State to initialize

Reimplemented from OpenSim::Joint.

virtual int OpenSim::BallJoint::numCoordinates (  )  const [inline, virtual]

Implements OpenSim::Joint.

BallJoint & BallJoint::operator= ( const BallJoint aJoint  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Joint.

void BallJoint::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 BallJoint::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.

Parameters:
state the State from which to take values that should become the defaults for this object

Reimplemented from OpenSim::Joint.

void BallJoint::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 BallJoint.

Reimplemented from OpenSim::Joint.


Member Data Documentation

Flag to use Euler angles to parameterize rotation of the body.


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