Gazebo Rendering

API Reference

6.6.3
RenderEngine Class Referenceabstract

An abstract interface to a concrete render-engine. A RenderEngine is responsible for initializing a render-engine as well as creating, storing, and destroying scenes. More...

#include <ignition/rendering/RenderEngine.hh>

Public Member Functions

virtual ~RenderEngine ()
 Deconstructor. More...
 
virtual void AddResourcePath (const std::string &_path)=0
 Add path to media resource location. More...
 
virtual ScenePtr CreateScene (const std::string &_name)=0
 Create a new scene with the given name. The given name should be unique across all scenes managed by this render-engine. If a duplicate name is given, NULL will be returned. An unique ID will automatically be assigned to the created scene. More...
 
virtual ScenePtr CreateScene (unsigned int _id, const std::string &_name)=0
 Create a new scene with the given ID. The given ID should be unique across all scenes managed by this render-engine. If a duplicate ID is given, NULL will be returned. An unique name will automatically be assigned to the created scene. More...
 
virtual void Destroy ()=0
 Destroys all scenes created by render-engine and releases all loaded resources. This should be called when the given render-engine will no longer be used during runtime. More...
 
virtual void DestroyScene (ScenePtr _scene)=0
 Destroy the given scene. If the given scene is not managed by this render-engine, no work will be done. More...
 
virtual void DestroySceneById (unsigned int _id)=0
 Destroy the scene with the given ID. If no scenes exist with the given ID, no work will be done. More...
 
virtual void DestroySceneByIndex (unsigned int _index)=0
 Destroy the scene at the given index. If no scenes exist at the given index, no work will be done. More...
 
virtual void DestroySceneByName (const std::string &_name)=0
 Destroy the scene with the given name. If no scenes exist with the given name, no work will be done. More...
 
virtual void DestroyScenes ()=0
 Destroy all scenes managed by this render-engine. More...
 
virtual bool Fini ()=0
 
virtual bool HasScene (ConstScenePtr _scene) const =0
 Determine if the given scene is actively managed by this render-engine. More...
 
virtual bool HasSceneId (unsigned int _id) const =0
 Determine if this render-engine manages a scene with the given ID. More...
 
virtual bool HasSceneName (const std::string &_name) const =0
 Determine if this render-engine manages a scene with the given name. More...
 
virtual bool Headless () const =0
 Get headless mode. More...
 
virtual bool Init ()=0
 Initialize the render-engine. This should be called immediately after a successful call to Load. More...
 
virtual bool IsEnabled () const =0
 Determines if the render-engine can be used. Despite loading and initializing the render-engine, it may not be possible to use due to hardware capabilities of the runtime system. More...
 
virtual bool IsInitialized () const =0
 Determines if the render-engine has been initialized. More...
 
virtual bool IsLoaded () const =0
 Determines if the render-engine has been loaded. More...
 
virtual bool Load (const std::map< std::string, std::string > &_params={})=0
 Load any necessary resources to set up render-engine. This should called before any other function. More...
 
virtual std::string Name () const =0
 Get name of the render-engine. More...
 
virtual RenderPassSystemPtr RenderPassSystem () const =0
 Get the render pass system for this engine. More...
 
virtual ScenePtr SceneById (unsigned int _id) const =0
 Get the scene with the given ID. If no scenes exist with the given ID, NULL will be returned. More...
 
virtual ScenePtr SceneByIndex (unsigned int _index) const =0
 Get the scene at the given index. If no scenes exist at the given index, NULL will be returned. More...
 
virtual ScenePtr SceneByName (const std::string &_name) const =0
 Get the scene with the given name. If no scenes exist with the given name, NULL will be returned. More...
 
virtual unsigned int SceneCount () const =0
 Get the number of scenes actively managed by this render-engine. More...
 
virtual void SetHeadless (bool _headless)=0
 Set headless mode Only available in OGRE 2.2, which makes use of EGL. More...
 

Detailed Description

An abstract interface to a concrete render-engine. A RenderEngine is responsible for initializing a render-engine as well as creating, storing, and destroying scenes.

Constructor & Destructor Documentation

◆ ~RenderEngine()

virtual ~RenderEngine ( )
inlinevirtual

Deconstructor.

Member Function Documentation

◆ AddResourcePath()

virtual void AddResourcePath ( const std::string _path)
pure virtual

Add path to media resource location.

Parameters
[in]_pathAbsolute path to resource location

Implemented in OgreRenderEngine, Ogre2RenderEngine, and BaseRenderEngine.

◆ CreateScene() [1/2]

virtual ScenePtr CreateScene ( const std::string _name)
pure virtual

Create a new scene with the given name. The given name should be unique across all scenes managed by this render-engine. If a duplicate name is given, NULL will be returned. An unique ID will automatically be assigned to the created scene.

Parameters
[in]_nameName of the new scene
Returns
The created scene

Implemented in BaseRenderEngine.

◆ CreateScene() [2/2]

virtual ScenePtr CreateScene ( unsigned int  _id,
const std::string _name 
)
pure virtual

Create a new scene with the given ID. The given ID should be unique across all scenes managed by this render-engine. If a duplicate ID is given, NULL will be returned. An unique name will automatically be assigned to the created scene.

Parameters
[in]_idID of the new scene
[in]_nameName of the new scene
Returns
The created scene

Implemented in BaseRenderEngine.

◆ Destroy()

virtual void Destroy ( )
pure virtual

Destroys all scenes created by render-engine and releases all loaded resources. This should be called when the given render-engine will no longer be used during runtime.

Returns
True if the render-engine was successfully destroyed

Implemented in OgreRenderEngine, Ogre2RenderEngine, and BaseRenderEngine.

◆ DestroyScene()

virtual void DestroyScene ( ScenePtr  _scene)
pure virtual

Destroy the given scene. If the given scene is not managed by this render-engine, no work will be done.

Parameters
[in]_sceneScene to be destroyed

Implemented in BaseRenderEngine.

◆ DestroySceneById()

virtual void DestroySceneById ( unsigned int  _id)
pure virtual

Destroy the scene with the given ID. If no scenes exist with the given ID, no work will be done.

Parameters
[in]_idID of the scene to destroy

Implemented in BaseRenderEngine.

◆ DestroySceneByIndex()

virtual void DestroySceneByIndex ( unsigned int  _index)
pure virtual

Destroy the scene at the given index. If no scenes exist at the given index, no work will be done.

Parameters
[in]_indexIndex of the scene to destroy

Implemented in BaseRenderEngine.

◆ DestroySceneByName()

virtual void DestroySceneByName ( const std::string _name)
pure virtual

Destroy the scene with the given name. If no scenes exist with the given name, no work will be done.

Parameters
[in]_nameName of the scene to destroy

Implemented in BaseRenderEngine.

◆ DestroyScenes()

virtual void DestroyScenes ( )
pure virtual

Destroy all scenes managed by this render-engine.

Implemented in BaseRenderEngine.

◆ Fini()

virtual bool Fini ( )
pure virtual

Implemented in BaseRenderEngine.

◆ HasScene()

virtual bool HasScene ( ConstScenePtr  _scene) const
pure virtual

Determine if the given scene is actively managed by this render-engine.

Parameters
[in]_sceneScene in question
Returns
True if the scene is managed by this render-engine

Implemented in BaseRenderEngine.

◆ HasSceneId()

virtual bool HasSceneId ( unsigned int  _id) const
pure virtual

Determine if this render-engine manages a scene with the given ID.

Parameters
[in]_idID of scene in question
Returns
True if this render-engine manages the specified scene

Implemented in BaseRenderEngine.

◆ HasSceneName()

virtual bool HasSceneName ( const std::string _name) const
pure virtual

Determine if this render-engine manages a scene with the given name.

Parameters
[in]_nameName of scene in question
Returns
True if this render-engine manages the specified scene

Implemented in BaseRenderEngine.

◆ Headless()

virtual bool Headless ( ) const
pure virtual

Get headless mode.

Returns
True if headless mode is enable, false otherwise.

Implemented in BaseRenderEngine.

◆ Init()

virtual bool Init ( )
pure virtual

Initialize the render-engine. This should be called immediately after a successful call to Load.

Returns
True if the render-engine was successfully initialized

Implemented in BaseRenderEngine.

◆ IsEnabled()

virtual bool IsEnabled ( ) const
pure virtual

Determines if the render-engine can be used. Despite loading and initializing the render-engine, it may not be possible to use due to hardware capabilities of the runtime system.

Returns
True if the render-engine can be used

Implemented in OgreRenderEngine, Ogre2RenderEngine, and BaseRenderEngine.

◆ IsInitialized()

virtual bool IsInitialized ( ) const
pure virtual

Determines if the render-engine has been initialized.

Returns
True if the render-engine is initialized

Implemented in BaseRenderEngine.

◆ IsLoaded()

virtual bool IsLoaded ( ) const
pure virtual

Determines if the render-engine has been loaded.

Returns
True if the render-engine is loaded

Implemented in BaseRenderEngine.

◆ Load()

virtual bool Load ( const std::map< std::string, std::string > &  _params = {})
pure virtual

Load any necessary resources to set up render-engine. This should called before any other function.

Parameters
[in]_paramsParameters to be passed to the underlying rendering engine.
Returns
True if the render-engine was successfully loaded

Implemented in BaseRenderEngine.

◆ Name()

virtual std::string Name ( ) const
pure virtual

◆ RenderPassSystem()

virtual RenderPassSystemPtr RenderPassSystem ( ) const
pure virtual

Get the render pass system for this engine.

Implemented in BaseRenderEngine.

◆ SceneById()

virtual ScenePtr SceneById ( unsigned int  _id) const
pure virtual

Get the scene with the given ID. If no scenes exist with the given ID, NULL will be returned.

Parameters
[in]_idID of scene to be retrieved
Returns
The specified scene

Implemented in BaseRenderEngine.

◆ SceneByIndex()

virtual ScenePtr SceneByIndex ( unsigned int  _index) const
pure virtual

Get the scene at the given index. If no scenes exist at the given index, NULL will be returned.

Parameters
[in]_indexIndex of scene, which is a number from 0 to SceneCount() - 1. Note that the index for a specific scene might change as other scenes are destroyed.
Returns
The specified scene

Implemented in BaseRenderEngine.

◆ SceneByName()

virtual ScenePtr SceneByName ( const std::string _name) const
pure virtual

Get the scene with the given name. If no scenes exist with the given name, NULL will be returned.

Parameters
[in]_nameName of scene to be retrieved
Returns
The specified scene

Implemented in BaseRenderEngine.

◆ SceneCount()

virtual unsigned int SceneCount ( ) const
pure virtual

Get the number of scenes actively managed by this render-engine.

Returns
The number of active scenes

Implemented in BaseRenderEngine.

◆ SetHeadless()

virtual void SetHeadless ( bool  _headless)
pure virtual

Set headless mode Only available in OGRE 2.2, which makes use of EGL.

Parameters
[in]_headlessSet to true to enable headless mode.

Implemented in BaseRenderEngine.


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