Gazebo

Entity Class Reference
[Server]

#include <Entity.hh>

Inheritance diagram for Entity:

Body Geom Model Sensor BoxGeom CylinderGeom HeightmapGeom PlaneGeom RayGeom SphereGeom TrimeshGeom CameraSensor RaySensor SensorStub List of all members.

Detailed Description

Base class for all objects in Gazebo.


Public Member Functions

 Entity (Entity *parent=NULL)
 Constructor.
virtual ~Entity ()
 Destructor.
int GetId () const
 Return the ID of this entity.
int GetParentId () const
 Return the ID of the parent.
void SetParent (Entity *parent)
 Set the parent.
EntityGetParent () const
 Get the parent.
void AddChild (Entity *child)
 Add a child to this entity.
std::vector< Entity * > & GetChildren ()
 Get all children.
OgreVisualGetVisualNode () const
 Return this entity's sceneNode.
void SetVisualNode (OgreVisual *visualNode)
 Set the scene node.
void SetName (const std::string &name)
 Set the name of the entity.
std::string GetName () const
 Return the name of the entity.
std::string GetUniqueName () const
 Return an unique name <name>_<id> for the entity.
void SetStatic (bool s)
 Set whether this entity is static: immovable.
bool IsStatic () const
 Return whether this entity is static.
bool operator== (const Entity &ent)
 Returns true if the entities are the same. Checks only the name.

Public Attributes

std::vector< Entity * > children
 Children of this entity.
dSpaceID spaceId
 ODE Stuff.

Protected Attributes

Entityparent
 Parent of this entity.
OgreVisualvisualNode
 OGRE stuff.


Constructor & Destructor Documentation

Entity ( Entity parent = NULL  ) 

Constructor.

Parameters:
parent Parent of the entity.


Member Function Documentation

int GetId (  )  const

Return the ID of this entity.

This id is unique

Returns:
Integer ID

Reimplemented in Body.

int GetParentId (  )  const

Return the ID of the parent.

Returns:
Integer ID

void SetParent ( Entity parent  ) 

Set the parent.

Parameters:
parent Parent entity

Entity* GetParent (  )  const

Get the parent.

Returns:
Pointer to the parent entity

void AddChild ( Entity child  ) 

Add a child to this entity.

Parameters:
child Child entity

std::vector< Entity* >& GetChildren (  ) 

Get all children.

Returns:
Vector of children entities

OgreVisual* GetVisualNode (  )  const

Return this entity's sceneNode.

Returns:
Ogre scene node

void SetVisualNode ( OgreVisual visualNode  ) 

Set the scene node.

Parameters:
sceneNode Ogre scene node

void SetName ( const std::string &  name  ) 

Set the name of the entity.

Parameters:
name Body name

std::string GetName (  )  const

Return the name of the entity.

Returns:
Name of the entity

std::string GetUniqueName (  )  const

Return an unique name <name>_<id> for the entity.

Returns:
Unique name for the entity

void SetStatic ( bool  s  ) 

Set whether this entity is static: immovable.

Parameters:
s Bool, true = static

bool IsStatic (  )  const

Return whether this entity is static.

Returns:
bool True = static


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

Last updated Aug 04 2007