Simbody  3.6
SimTK::Body::Rigid Class Reference

A general rigid body. More...

+ Inheritance diagram for SimTK::Body::Rigid:

Public Member Functions

 Rigid ()
 Construct a rigid body with default mass properties which are (1,Vec3(0),Inertia(1,1,1)) More...
 
 Rigid (const MassProperties &)
 Construct a rigid body with the given mass properties; any set of mass properties is allowed since this is a general rigid body. More...
 
RigidsetDefaultRigidBodyMassProperties (const MassProperties &m)
 
 SimTK_PIMPL_DOWNCAST (Rigid, Body)
 
- Public Member Functions inherited from SimTK::Body
 Body ()
 Default constructor creates an empty Body handle. More...
 
 ~Body ()
 Destroy the handle and the body if this is the owner. More...
 
 Body (const Body &source)
 Copy constructor is a deep copy; the new Body is separate from the source Body. More...
 
Bodyoperator= (const Body &source)
 Copy assignment is a deep copy; the original object is deleted if this is the owner, then replaced with a copy of the source. More...
 
 Body (const MassProperties &massProps)
 This is a default conversion from MassProperties to Body. More...
 
BodysetDefaultRigidBodyMassProperties (const MassProperties &)
 Every type of Body should provide an initial set of rigid body mass properties defined at Topology stage (i.e., in the System rather than the State). More...
 
const MassPropertiesgetDefaultRigidBodyMassProperties () const
 Get the default (that is, Topology stage) mass properties for this Body. More...
 
int addDecoration (const Transform &X_BD, const DecorativeGeometry &geometry)
 Add a piece of decorative geometry fixed at some pose on this Body. More...
 
int addDecoration (const DecorativeGeometry &geometry)
 Convenience method for when the decorative geometry is to be placed at the body frame. More...
 
int getNumDecorations () const
 Obtain a count nd of how many pieces of DecorativeGeometry have been attached to this Body. More...
 
const DecorativeGeometrygetDecoration (int i) const
 Get a read-only reference to the i'th piece of DecorativeGeometry that was added to this Body, with 0 <= i < getNumDecorations(). More...
 
DecorativeGeometryupdDecoration (int i) const
 Get a writable reference to the i'th piece of DecorativeGeometry that was added to this Body, with 0 <= i < getNumDecorations(). More...
 
int addContactSurface (const Transform &X_BS, const ContactSurface &shape)
 Create a new ContactSurface on a body and place it using the indicated Transform. More...
 
int addContactSurface (const ContactSurface &shape)
 Convenience method for when the contact surface is to be placed at the body frame. More...
 
int getNumContactSurfaces () const
 Obtain the number of contact surfaces ns attached to this Body. More...
 
const ContactSurfacegetContactSurface (int i) const
 Get a reference to the i'th contact surface on this body; be sure to get the Transform also. More...
 
const TransformgetContactSurfaceTransform (int i) const
 Get the Transform specifying the placement of the i'th contact surface on this Body. More...
 
ContactSurfaceupdContactSurface (int i)
 Get write access to the i'th unique contact surface owned by this Body. More...
 
TransformupdContactSurfaceTransform (int i)
 Get a writable reference to the Transform specifying the placement of the i'th contact surface on this Body. More...
 
bool isOwnerHandle () const
 
bool isEmptyHandle () const
 
 Body (class BodyRep *r)
 
bool hasRep () const
 
const BodyRep & getRep () const
 
BodyRep & updRep () const
 
void setRep (BodyRep &r)
 

Additional Inherited Members

- Protected Attributes inherited from SimTK::Body
class BodyRep * rep
 

Detailed Description

A general rigid body.

This can represent a body with mass properties that are full, linear, inertialess (e.g. a point), or massless.

Constructor & Destructor Documentation

◆ Rigid() [1/2]

Construct a rigid body with default mass properties which are (1,Vec3(0),Inertia(1,1,1))

◆ Rigid() [2/2]

SimTK::Body::Rigid::Rigid ( const MassProperties )
explicit

Construct a rigid body with the given mass properties; any set of mass properties is allowed since this is a general rigid body.

Member Function Documentation

◆ setDefaultRigidBodyMassProperties()

Rigid& SimTK::Body::Rigid::setDefaultRigidBodyMassProperties ( const MassProperties m)
inline

◆ SimTK_PIMPL_DOWNCAST()

SimTK::Body::Rigid::SimTK_PIMPL_DOWNCAST ( Rigid  ,
Body   
)

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