Simbody  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SimTK::MultibodyGraphMaker::Mobilizer Class Reference

Local class that represents one of the mobilizers (tree joints) in the generated spanning tree. More...

Public Member Functions

 Mobilizer ()
 
 Mobilizer (int jointNum, int level, int inboardBodyNum, int outboardBodyNum, bool isReversed, MultibodyGraphMaker *graphMaker)
 
bool isAddedBaseMobilizer () const
 Return true if this mobilizer does not represent one of the input joints, but is instead a joint we added connecting a base body to ground. More...
 
void * getJointRef () const
 Get the user reference pointer for the joint associated with this mobilizer, if there is such a joint. More...
 
void * getInboardBodyRef () const
 Get the user reference pointer for the inboard body of this mobilizer. More...
 
void * getOutboardBodyRef () const
 Get the user reference pointer for the outboard body of this mobilizer. More...
 
void * getOutboardMasterBodyRef () const
 Get the user reference pointer for the outboard body of this mobilizer, if it is one of the input bodes, or to the master body for the outboard body if the outboard body is a slave body. More...
 
const std::string & getJointTypeName () const
 Get the joint type name of the joint that this mobilizer represents. More...
 
void * getJointTypeRef () const
 Get the reference pointer (if any) that was provided when this mobilizer's joint type was defined in an addJointType() call. More...
 
bool isSlaveMobilizer () const
 Return true if the outboard body of this mobilizer is a slave we created in order to cut a loop, rather than one of the input bodies. More...
 
int getNumFragments () const
 Return the number of fragments into which we chopped the outboard body of this mobilizer. More...
 
bool isReversedFromJoint () const
 Return true if this mobilizer represents one of the input joints but the sense of inboard->outboard is reversed from the parent->child sense defined in the input joint. More...
 

Friends

class MultibodyGraphMaker
 

Detailed Description

Local class that represents one of the mobilizers (tree joints) in the generated spanning tree.

There is always a corresponding joint, although that joint might be a ground-to-body free joint that was added automatically.

Constructor & Destructor Documentation

SimTK::MultibodyGraphMaker::Mobilizer::Mobilizer ( )
inline
SimTK::MultibodyGraphMaker::Mobilizer::Mobilizer ( int  jointNum,
int  level,
int  inboardBodyNum,
int  outboardBodyNum,
bool  isReversed,
MultibodyGraphMaker graphMaker 
)
inline

Member Function Documentation

bool SimTK::MultibodyGraphMaker::Mobilizer::isAddedBaseMobilizer ( ) const
inline

Return true if this mobilizer does not represent one of the input joints, but is instead a joint we added connecting a base body to ground.

If this returns true then there will be no user reference pointer returned from getJointRef(). Also, the inboard body is always ground. When you create this mobilizer, the joint frames should be identity, that is, the joint should connect the ground frame to the outboard body frame.

void* SimTK::MultibodyGraphMaker::Mobilizer::getJointRef ( ) const
inline

Get the user reference pointer for the joint associated with this mobilizer, if there is such a joint.

If this mobilizer doesn't correspond to one of the input joints then a null pointer is returned.

void* SimTK::MultibodyGraphMaker::Mobilizer::getInboardBodyRef ( ) const
inline

Get the user reference pointer for the inboard body of this mobilizer.

The inboard body is always one of the input bodies so this will not be returned null unless no reference pointer was supplied in the addBody() call that defined this body.

void* SimTK::MultibodyGraphMaker::Mobilizer::getOutboardBodyRef ( ) const
inline

Get the user reference pointer for the outboard body of this mobilizer.

The outboard body may be one of the input bodies, but could also be a slave body, in which case a null pointer will be returned. You can use getOutboardMasterBodyRef() instead to ensure that you will get a reference to one of the input bodies.

void* SimTK::MultibodyGraphMaker::Mobilizer::getOutboardMasterBodyRef ( ) const
inline

Get the user reference pointer for the outboard body of this mobilizer, if it is one of the input bodes, or to the master body for the outboard body if the outboard body is a slave body.

This ensures that you will get a reference to one of the input bodies.

const std::string& SimTK::MultibodyGraphMaker::Mobilizer::getJointTypeName ( ) const
inline

Get the joint type name of the joint that this mobilizer represents.

void* SimTK::MultibodyGraphMaker::Mobilizer::getJointTypeRef ( ) const
inline

Get the reference pointer (if any) that was provided when this mobilizer's joint type was defined in an addJointType() call.

bool SimTK::MultibodyGraphMaker::Mobilizer::isSlaveMobilizer ( ) const
inline

Return true if the outboard body of this mobilizer is a slave we created in order to cut a loop, rather than one of the input bodies.

int SimTK::MultibodyGraphMaker::Mobilizer::getNumFragments ( ) const
inline

Return the number of fragments into which we chopped the outboard body of this mobilizer.

There is one fragment for the master body plus however many slaves of that body were created. Thus you should divide the master body's mass by this number to obtain the mass to be assigned to each of the body fragments.

bool SimTK::MultibodyGraphMaker::Mobilizer::isReversedFromJoint ( ) const
inline

Return true if this mobilizer represents one of the input joints but the sense of inboard->outboard is reversed from the parent->child sense defined in the input joint.

In that case you should use a reverse joint when you build the system.

Friends And Related Function Documentation

friend class MultibodyGraphMaker
friend

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