1 #ifndef SimTK_SIMBODY_BODY_H_ 
    2 #define SimTK_SIMBODY_BODY_H_ 
   40 class DecorativeGeometry;
 
   98 {   
return addDecoration(
Transform(), geometry); }
 
  130 {   
return addContactSurface(
Transform(), shape); }
 
  163 explicit Body(
class BodyRep* r) : rep(r) { }
 
  165 const BodyRep& 
getRep()
 const {assert(rep); 
return *rep;}
 
  166 BodyRep&       
updRep()
 const {assert(rep); 
return *rep;}
 
  167 void           setRep(BodyRep& r) {assert(!rep); rep = &r;}
 
  198     const RigidRep& getRep() 
const;
 
  224     const LinearRep& getRep() 
const;
 
  239     explicit Particle(
const Real& mass);
 
  241     Particle& setDefaultRigidBodyMassProperties(
const MassProperties& m) {
 
  249     ParticleRep&       updRep();
 
  250     const ParticleRep& getRep() 
const;
 
  268     MasslessRep&       updRep();
 
  269     const MasslessRep& getRep() 
const;
 
  287     const GroundRep& getRep() 
const;
 
#define SimTK_PIMPL_DOWNCAST(Derived, Parent)
Similar to the above but for private implementation abstract classes, that is, abstract class hierarc...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:594
 
Includes internal headers providing declarations for the basic SimTK Core classes,...
 
Every Simbody header and source file should include this header before any other Simbody header.
 
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:68
 
This is a Body representing something immobile, of effectively infinite mass and inertia,...
Definition: Body.h:279
 
SimTK_PIMPL_DOWNCAST(Ground, Body)
 
This is a rigid body in the shape of a line, which is inherently inertialess about its axis.
Definition: Body.h:210
 
Linear & setDefaultRigidBodyMassProperties(const MassProperties &m)
Definition: Body.h:215
 
Linear(const MassProperties &)
 
SimTK_PIMPL_DOWNCAST(Linear, Body)
 
This is a Body that is constitutively massless (and inertialess); meaning that no amount of fiddling ...
Definition: Body.h:261
 
SimTK_PIMPL_DOWNCAST(Massless, Body)
 
A general rigid body.
Definition: Body.h:180
 
Rigid & setDefaultRigidBodyMassProperties(const MassProperties &m)
Definition: Body.h:189
 
Rigid()
Construct a rigid body with default mass properties which are (1,Vec3(0),Inertia(1,...
 
SimTK_PIMPL_DOWNCAST(Rigid, Body)
 
Rigid(const MassProperties &)
Construct a rigid body with the given mass properties; any set of mass properties is allowed since th...
 
The Body class represents a reference frame that can be used to describe mass properties and geometry...
Definition: Body.h:55
 
const ContactSurface & getContactSurface(int i) const
Get a reference to the i'th contact surface on this body; be sure to get the Transform also.
 
Body(const MassProperties &massProps)
This is a default conversion from MassProperties to Body.
 
bool isOwnerHandle() const
 
int addContactSurface(const ContactSurface &shape)
Convenience method for when the contact surface is to be placed at the body frame.
Definition: Body.h:129
 
Body(const Body &source)
Copy constructor is a deep copy; the new Body is separate from the source Body.
 
DecorativeGeometry & updDecoration(int i) const
Get a writable reference to the i'th piece of DecorativeGeometry that was added to this Body,...
 
int getNumContactSurfaces() const
Obtain the number of contact surfaces ns attached to this Body.
 
const BodyRep & getRep() const
Definition: Body.h:165
 
Body & setDefaultRigidBodyMassProperties(const MassProperties &)
Every type of Body should provide an initial set of rigid body mass properties defined at Topology st...
 
Transform & updContactSurfaceTransform(int i)
Get a writable reference to the Transform specifying the placement of the i'th contact surface on thi...
 
void setRep(BodyRep &r)
Definition: Body.h:167
 
int addDecoration(const Transform &X_BD, const DecorativeGeometry &geometry)
Add a piece of decorative geometry fixed at some pose on this Body.
 
Body(class BodyRep *r)
Definition: Body.h:163
 
Body & operator=(const Body &source)
Copy assignment is a deep copy; the original object is deleted if this is the owner,...
 
bool isEmptyHandle() const
 
const DecorativeGeometry & getDecoration(int i) const
Get a read-only reference to the i'th piece of DecorativeGeometry that was added to this Body,...
 
const MassProperties & getDefaultRigidBodyMassProperties() const
Get the default (that is, Topology stage) mass properties for this Body.
 
bool hasRep() const
Definition: Body.h:164
 
const Transform & getContactSurfaceTransform(int i) const
Get the Transform specifying the placement of the i'th contact surface on this Body.
 
int addContactSurface(const Transform &X_BS, const ContactSurface &shape)
Create a new ContactSurface on a body and place it using the indicated Transform.
 
int addDecoration(const DecorativeGeometry &geometry)
Convenience method for when the decorative geometry is to be placed at the body frame.
Definition: Body.h:97
 
class BodyRep * rep
Definition: Body.h:170
 
BodyRep & updRep() const
Definition: Body.h:166
 
~Body()
Destroy the handle and the body if this is the owner.
 
Body()
Default constructor creates an empty Body handle.
Definition: Body.h:58
 
ContactSurface & updContactSurface(int i)
Get write access to the i'th unique contact surface owned by this Body.
 
int getNumDecorations() const
Obtain a count nd of how many pieces of DecorativeGeometry have been attached to this Body.
 
This is the client-side interface to an implementation-independent representation of "Decorations" su...
Definition: DecorativeGeometry.h:86
 
This class contains the mass, center of mass, and unit inertia matrix of a rigid body B.
Definition: MassProperties.h:1363
 
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
 
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:607
 
Transform_< Real > Transform
Definition: Transform.h:44