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)
 Constructor.
virtual ~Body ()
 Destructor.
virtual void Load (XMLConfigNode *node)
 Load the body based on an XMLConfig node.
virtual void Save ()
 Save the body based on our XMLConfig node.
virtual void Init ()
 Initialize the body.
void Fini ()
 Finalize the body.
virtual void Update (UpdateParams &params)
 Update the body.
void AttachGeom (Geom *geom)
 Attach a geom to this body.
void SetPose (const Pose3d &pose)
 Set the pose of the body.
Pose3d GetPose () const
 Return the pose of the body.
void SetPosition (const Vector3 &pos)
 Set the position of the body.
void SetRotation (const Quatern &rot)
 Set the rotation of the body.
Vector3 GetPosition () const
 Return the position of the body.
Quatern GetRotation () const
 Return the rotation.
dBodyID GetId () const
 Return the ID of this body.
void SetEnabled (bool enable) const
 Set whether this body is enabled.
void UpdateCoM ()
 Update the center of mass.
const Pose3dGetCoMPose () const
 Get the Center of Mass pose.
void SetGravityMode (bool mode)
 Set whether gravity affects this body.
void SetLinearVel (const Vector3 &vel)
 Set the linear velocity of the body.
Vector3 GetLinearVel () const
 Get the linear velocity of the body.
void SetAngularVel (const Vector3 &vel)
 Set the angular velocity of the body.
Vector3 GetAngularVel () const
 Get the angular velocity of the body.
void SetForce (const Vector3 &force)
 Set the force applied to the body.
Vector3 GetForce () const
 Get the force applied to the body.
void SetTorque (const Vector3 &force)
 Set the torque applied to the body.
Vector3 GetTorque () const
 Get the torque applied to the body.


Member Function Documentation

virtual void Load ( XMLConfigNode node  )  [virtual]

Load the body based on an XMLConfig node.

Parameters:
node XMLConfigNode pointer

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.


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

Last updated Aug 04 2007