Molmodel
Classes | Public Member Functions

SimTK::CompoundSystem Class Reference

Derived class of MolecularMechanicsSystem that knows how to model molmodel Compounds. More...

#include <CompoundSystem.h>

Inheritance diagram for SimTK::CompoundSystem:

List of all members.

Classes

class  CompoundIndex
 Compound::Index type is an integer index into subcompounds of a Compound. More...

Public Member Functions

 SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE (CompoundSystem, CompoundIndex)
 CompoundSystem ()
 default constructor
 ~CompoundSystem ()
 destructor
void adoptCompound (Compound &child, const Transform &compoundTransform=Transform())
 Install a new Compound into this system.
void modelCompounds ()
 Instantiate simbody MobilizedBodies representing the adopted Compounds.
size_t getNumCompounds () const
const CompoundgetCompound (CompoundIndex i) const
CompoundupdCompound (CompoundIndex i)

Detailed Description

Derived class of MolecularMechanicsSystem that knows how to model molmodel Compounds.

Todo:
merge this class with MolecularMechanicsSystem

Constructor & Destructor Documentation

SimTK::CompoundSystem::CompoundSystem ( ) [inline]

default constructor

SimTK::CompoundSystem::~CompoundSystem ( ) [inline]

destructor


Member Function Documentation

SimTK::CompoundSystem::SimTK_DEFINE_UNIQUE_LOCAL_INDEX_TYPE ( CompoundSystem  ,
CompoundIndex   
)
void SimTK::CompoundSystem::adoptCompound ( Compound child,
const Transform compoundTransform = Transform() 
) [inline]

Install a new Compound into this system.

We take over ownership of the Compound's representation from the given handle, leaving that handle as a reference to our new Compound. It is an error if the given handle wasn't the owner of the Compound.

Parameters:
childCompound to be incorporated
compoundTransformlocation and orientation of the Compound
void SimTK::CompoundSystem::modelCompounds ( )

Instantiate simbody MobilizedBodies representing the adopted Compounds.

size_t SimTK::CompoundSystem::getNumCompounds ( ) const [inline]
Returns:
number of top-level Compounds adopted by this CompoundSystem
const Compound& SimTK::CompoundSystem::getCompound ( CompoundIndex  i) const [inline]
Returns:
read-only reference to an adopted Compound
Parameters:
iinteger index of Compound
Compound& SimTK::CompoundSystem::updCompound ( CompoundIndex  i) [inline]
Returns:
mutable reference to an adopted Compound
Parameters:
iinteger index of Compound

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines