SceneManager Class Reference
Scene manager class for loading and managing objects in the scene. More...
#include <SceneManager.hh>
Public Member Functions | |
SceneManager () | |
Constructor. More... | |
~SceneManager () | |
Destructor. More... | |
bool | AddSensor (Entity _gazeboId, const std::string &_sensorName, Entity _parentGazeboId=0) |
Ignition sensors is the one responsible for adding sensors to the scene. Here we just keep track of it and make sure it has the correct parent. More... | |
rendering::LightPtr | CreateLight (Entity _id, const sdf::Light &_light, Entity _parentId) |
Create a light. More... | |
rendering::VisualPtr | CreateLink (Entity _id, const sdf::Link &_link, Entity _parentId=0) |
Create a link. More... | |
rendering::VisualPtr | CreateModel (Entity _id, const sdf::Model &_model, Entity _parentId=0) |
Create a model. More... | |
rendering::VisualPtr | CreateVisual (Entity _id, const sdf::Visual &_visual, Entity _parentId=0) |
Create a visual. More... | |
bool | HasEntity (Entity _id) const |
Check if entity exists. More... | |
rendering::NodePtr | NodeById (Entity _id) const |
Get a rendering node given an id. More... | |
void | RemoveEntity (Entity _id) |
Remove an entity by id. More... | |
rendering::ScenePtr | Scene () const |
Get the scene. More... | |
void | SetScene (rendering::ScenePtr _scene) |
Set the scene to manage. More... | |
void | SetWorldId (Entity _id) |
Set the world's ID. More... | |
rendering::VisualPtr | TopLevelVisual (rendering::VisualPtr _visual) const |
Get the top level visual for the given visual, which is the ancestor which is a direct child to the root visual. Usually, this will be a model or a light. More... | |
Detailed Description
Scene manager class for loading and managing objects in the scene.
Constructor & Destructor Documentation
◆ SceneManager()
SceneManager | ( | ) |
Constructor.
◆ ~SceneManager()
~SceneManager | ( | ) |
Destructor.
Member Function Documentation
◆ AddSensor()
bool AddSensor | ( | Entity | _gazeboId, |
const std::string & | _sensorName, | ||
Entity | _parentGazeboId = 0 |
||
) |
Ignition sensors is the one responsible for adding sensors to the scene. Here we just keep track of it and make sure it has the correct parent.
- Parameters
-
[in] _gazeboId Entity in Gazebo [in] _sensorName Name of sensor node in Ignition Rendering. [in] _parentId Parent Id on Gazebo.
- Returns
- True if sensor is successfully handled
◆ CreateLight()
Create a light.
- Parameters
-
[in] _id Unique light id [in] _light Light sdf dom [in] _parentId Parent id
- Returns
- Light object created from the sdf dom
◆ CreateLink()
◆ CreateModel()
◆ CreateVisual()
Create a visual.
- Parameters
-
[in] _id Unique visual id [in] _visual Visual sdf dom [in] _parentId Parent id
- Returns
- Visual object created from the sdf dom
◆ HasEntity()
bool HasEntity | ( | Entity | _id | ) | const |
Check if entity exists.
- Parameters
-
[in] _id Unique entity id
- Returns
- true if exists, false otherwise
◆ NodeById()
rendering::NodePtr NodeById | ( | Entity | _id | ) | const |
Get a rendering node given an id.
- Parameters
-
[in] _id Entity's unique id
- Returns
- Pointer to requested entity's node
◆ RemoveEntity()
void RemoveEntity | ( | Entity | _id | ) |
Remove an entity by id.
- Parameters
-
[in] _id Entity's unique id
◆ Scene()
rendering::ScenePtr Scene | ( | ) | const |
Get the scene.
- Returns
- Pointer to scene
◆ SetScene()
void SetScene | ( | rendering::ScenePtr | _scene | ) |
Set the scene to manage.
- Parameters
-
[in] _scene Scene pointer.
◆ SetWorldId()
void SetWorldId | ( | Entity | _id | ) |
Set the world's ID.
- Parameters
-
[in] _id World ID.
◆ TopLevelVisual()
rendering::VisualPtr TopLevelVisual | ( | rendering::VisualPtr | _visual | ) | const |
Get the top level visual for the given visual, which is the ancestor which is a direct child to the root visual. Usually, this will be a model or a light.
- Parameters
-
[in] _visual Child visual
- Returns
- Top level visual containining this visual
The documentation for this class was generated from the following file: