1 #ifndef SimTK_SIMBODY_BODY_H_ 2 #define SimTK_SIMBODY_BODY_H_ 40 class DecorativeGeometry;
98 {
return addDecoration(
Transform(), geometry); }
103 int getNumDecorations()
const;
124 int addContactSurface(
const Transform& X_BS,
130 {
return addContactSurface(
Transform(), shape); }
134 int getNumContactSurfaces()
const;
140 const Transform& getContactSurfaceTransform(
int i)
const;
148 Transform& updContactSurfaceTransform(
int i);
158 bool isOwnerHandle()
const;
159 bool isEmptyHandle()
const;
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;
292 #endif // SimTK_SIMBODY_BODY_H_ #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:593
Body()
Default constructor creates an empty Body handle.
Definition: Body.h:58
This is a Body representing something immobile, of effectively infinite mass and inertia, that cannot be modified to be anything else.
Definition: Body.h:279
The Body class represents a reference frame that can be used to describe mass properties and geometry...
Definition: Body.h:55
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
A general rigid body.
Definition: Body.h:180
const BodyRep & getRep() const
Definition: Body.h:165
Linear & setDefaultRigidBodyMassProperties(const MassProperties &m)
Definition: Body.h:215
Every Simbody header and source file should include this header before any other Simbody header...
This class contains the mass, center of mass, and unit inertia matrix of a rigid body B...
Definition: MassProperties.h:85
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:606
class BodyRep * rep
Definition: Body.h:170
Body(class BodyRep *r)
Definition: Body.h:163
bool hasRep() const
Definition: Body.h:164
Includes internal headers providing declarations for the basic SimTK Core classes, including Simmatrix.
int addContactSurface(const ContactSurface &shape)
Convenience method for when the contact surface is to be placed at the body frame.
Definition: Body.h:129
This is a Body that is constitutively massless (and inertialess); meaning that no amount of fiddling ...
Definition: Body.h:261
int addDecoration(const DecorativeGeometry &geometry)
Convenience method for when the decorative geometry is to be placed at the body frame.
Definition: Body.h:97
This is a rigid body in the shape of a line, which is inherently inertialess about its axis...
Definition: Body.h:210
Body & setDefaultRigidBodyMassProperties(const MassProperties &)
Every type of Body should provide an initial set of rigid body mass properties defined at Topology st...
This is the client-side interface to an implementation-independent representation of "Decorations" su...
Definition: DecorativeGeometry.h:86
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:68
void setRep(BodyRep &r)
Definition: Body.h:167
Rigid & setDefaultRigidBodyMassProperties(const MassProperties &m)
Definition: Body.h:189
BodyRep & updRep() const
Definition: Body.h:166
Transform_< Real > Transform
Definition: Transform.h:44