1 #ifndef SimTK_SIMBODY_MATTER_SUBTREE_H_ 2 #define SimTK_SIMBODY_MATTER_SUBTREE_H_ 35 class SimbodyMatterSubsystem;
37 class SimbodyMatterSubtree;
38 class SimbodyMatterSubtreeResults;
129 void realizeTopology();
131 int getNumSubtreeBodies()
const;
143 SubtreeBodyIndex getParentSubtreeBodyIndex(SubtreeBodyIndex)
const;
145 getChildSubtreeBodyIndices(SubtreeBodyIndex)
const;
230 const SubtreeRep& getRep()
const {assert(rep);
return *rep;}
231 SubtreeRep& updRep() {assert(rep);
return *rep;}
251 void reallocateBodies(
int nBodies);
252 void addMobilities(SubtreeBodyIndex,
QIndex qStart,
int nq,
UIndex uStart,
int nu);
253 void realizeModel(
const Vector& stateQ,
const Vector& stateU);
255 Stage getStage()
const;
257 int getNumSubtreeBodies()
const;
258 int getNumSubtreeQs()
const;
259 int getNumSubtreeUs()
const;
261 const Vector& getSubtreeQ()
const;
262 const Transform& getSubtreeBodyTransform(SubtreeBodyIndex)
const;
264 const Vector& getSubtreeU()
const;
265 const SpatialVec& getSubtreeBodyVelocity(SubtreeBodyIndex)
const;
267 const Vector& getSubtreeUDot()
const;
268 const SpatialVec& getSubtreeBodyAcceleration(SubtreeBodyIndex)
const;
274 void findSubtreeBodyQ(SubtreeBodyIndex, SubtreeQIndex& qStart,
int& nq)
const;
275 void findSubtreeBodyU(SubtreeBodyIndex, SubtreeUIndex& uStart,
int& nu)
const;
277 class SubtreeResultsRep;
280 SubtreeResultsRep* rep;
281 const SubtreeResultsRep& getRep()
const {assert(rep);
return *rep;}
282 SubtreeResultsRep& updRep() {assert(rep);
return *rep;}
290 #endif // SimTK_SIMBODY_MATTER_SUBTREE_H_ This is for arrays indexed by mobilized body number within a subsystem (typically the SimbodyMatterSu...
Unique integer type for Subsystem-local u indexing.
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
This class is basically a glorified enumerated type, type-safe and range checked but permitting conve...
Definition: Stage.h:50
A SimbodyMatterSubtree is a view of a connected subgraph of the tree of mobilized bodies in a Simbody...
Definition: SimbodyMatterSubtree.h:109
Every Simbody header and source file should include this header before any other Simbody header...
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:593
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:276
Includes internal headers providing declarations for the basic SimTK Core classes, including Simmatrix.
Definition: SimbodyMatterSubtree.h:242
The SimTK::Array_<T> container class is a plug-compatible replacement for the C++ standard template l...
Definition: Array.h:50
Unique integer type for Subsystem-local q indexing.
std::ostream & operator<<(std::ostream &o, const ContactForce &f)
Definition: CompliantContactSubsystem.h:387
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:72
This subsystem contains the bodies ("matter") in the multibody system, the mobilizers (joints) that d...
Definition: SimbodyMatterSubsystem.h:133