Gazebo

Body Class Reference
[Physics]

#include <Body.hh>

Inheritance diagram for Body:

Entity

List of all members.


Detailed Description

Body class.

Public Member Functions

 Body (Entity *parent, dWorldID worldId)
virtual ~Body ()
virtual int Load (XMLConfigNode *node)
virtual int Init ()
void Fini ()
virtual int Update (UpdateParams &params)
void AttachGeom (Geom *geom)
void SetPose (const Pose3d &pose)
Pose3d GetPose () const
void SetPosition (const Vector3 &pos)
void SetRotation (const Quatern &rot)
Vector3 GetPosition () const
Quatern GetRotation () const
dBodyID GetId () const
void SetEnabled (bool enable) const
void UpdateCoM ()
const Pose3dGetCoMPose () const
void SetGravityMode (bool mode)

Constructor & Destructor Documentation

Body ( Entity parent,
dWorldID  worldId 
)

Constructor

virtual ~Body (  )  [virtual]

Destructor


Member Function Documentation

virtual int Load ( XMLConfigNode node  )  [virtual]

Load the body based on an XMLConfig node

Parameters:
node XMLConfigNode pointer
Returns:
Nonzero on error

virtual int Init (  )  [virtual]

Initialize the body

Returns:
Non-zero on error

void Fini (  ) 

Finalize the body

virtual int Update ( UpdateParams params  )  [virtual]

Update the body

Returns:
Non-zero on error

void AttachGeom ( Geom geom  ) 

Attach a geom to this body

Parameters:
geom Geometery to attach to this body

void SetPose ( const Pose3d pose  ) 

Set the pose of the body

Parameters:
pose New pose of the body

Pose3d GetPose (  )  const

Return the pose of the body

Returns:
Pose of the body

void SetPosition ( const Vector3 pos  ) 

Set the position of the body

Parameters:
pos Vector position

void SetRotation ( const Quatern rot  ) 

Set the rotation of the body

Parameters:
rot Quaternion rotation

Vector3 GetPosition (  )  const

Return the position of the body

Returns:
Position vector

Quatern GetRotation (  )  const

Return the rotation

Returns:
Rotation quaternion

dBodyID GetId (  )  const

Return the ID of this body

Returns:
ODE body id

Reimplemented from Entity.

void SetEnabled ( bool  enable  )  const

Set whether this body is enabled

void UpdateCoM (  ) 

Update the center of mass

const Pose3d& GetCoMPose (  )  const

Get the Center of Mass pose

void SetGravityMode ( bool  mode  ) 

Set whether gravity affects this body


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

Last updated Aug 04 2007