Gazebo Rendering

API Reference

6.6.3
RenderEngineManager Class Reference

Collection of render-engines. This provides access to all the render-engines available at runtime. RenderEngine objects should not be access directly, but instead via the RenderEngineManager to maintain a flexible render-engine agnostic design. More...

#include <RenderEngineManager.hh>

Public Member Functions

 RenderEngineManager ()
 Constructor. More...
 
 ~RenderEngineManager ()
 Deconstructor. More...
 
RenderEngineEngine (const std::string &_name, const std::map< std::string, std::string > &_params={}, const std::string &_path="")
 Get the render-engine with the given name. If the no render-engine is registered under the given name, NULL will be returned. More...
 
RenderEngineEngineAt (unsigned int _index, const std::map< std::string, std::string > &_params={}, const std::string &_path="")
 Get the render-engine at the given index. If no render-engine is exists at the given index, NULL will be returned. More...
 
unsigned int EngineCount () const
 Get the number of available render-engines. More...
 
bool HasEngine (const std::string &_name) const
 Determine if a render-engine with the given name is avaiable. It also checks the list of default engines supplied by ign-rendering. More...
 
bool IsEngineLoaded (const std::string &_name) const
 Determine if a render-engine with the given name is already loaded. More...
 
std::vector< std::stringLoadedEngines () const
 Get the list of all engines already loaded. More...
 
void RegisterEngine (const std::string &_name, RenderEngine *_engine)
 Register a new render-engine under the given name. If the given name is already in use, the render-engine will not be registered. More...
 
void SetPluginPaths (const std::list< std::string > &_paths)
 Set the plugin paths from which render engines can be loaded. More...
 
bool UnloadEngine (const std::string &_name)
 Unload the render-engine with the given name. If the no render-engine is registered under the given name, false will be returned. More...
 
bool UnloadEngineAt (unsigned int _index)
 Unload the render-engine at the given index. If the no render-engine is registered under the given name, false will be returned. More...
 
void UnregisterEngine (const std::string &_name)
 Unregister a render-engine registered under the given name. If no render-engine is registered under the given name no work will be done. More...
 
void UnregisterEngine (RenderEngine *_engine)
 Unregister the given render-engine. If the given render-engine is not currently registered, no work will be done. More...
 
void UnregisterEngineAt (unsigned int _index)
 Unregister a render-engine at the given index. If the no render-engine is registered at the given index, no work will be done. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SingletonT< RenderEngineManager >
static T * Instance ()
 
- Protected Member Functions inherited from SingletonT< RenderEngineManager >
 SingletonT ()
 
virtual ~SingletonT ()
 

Detailed Description

Collection of render-engines. This provides access to all the render-engines available at runtime. RenderEngine objects should not be access directly, but instead via the RenderEngineManager to maintain a flexible render-engine agnostic design.

ignition/rendering/RenderEngineManager.hh

Constructor & Destructor Documentation

◆ RenderEngineManager()

Constructor.

◆ ~RenderEngineManager()

Deconstructor.

Member Function Documentation

◆ Engine()

RenderEngine* Engine ( const std::string _name,
const std::map< std::string, std::string > &  _params = {},
const std::string _path = "" 
)

Get the render-engine with the given name. If the no render-engine is registered under the given name, NULL will be returned.

Parameters
[in]_nameName of the desired render-engine
[in]_paramsParameters to be passed to the render engine.
[in]_pathAnother search path for rendering engine plugin.
Returns
The specified render-engine

◆ EngineAt()

RenderEngine* EngineAt ( unsigned int  _index,
const std::map< std::string, std::string > &  _params = {},
const std::string _path = "" 
)

Get the render-engine at the given index. If no render-engine is exists at the given index, NULL will be returned.

Parameters
[in]_indexIndex of the desired render-engine
[in]_paramsParameters to be passed to the render engine.
[in]_pathAnother search path for rendering engine plugin.
Returns
The specified render-engine

◆ EngineCount()

unsigned int EngineCount ( ) const

Get the number of available render-engines.

Returns
the number of available render-engines

◆ HasEngine()

bool HasEngine ( const std::string _name) const

Determine if a render-engine with the given name is avaiable. It also checks the list of default engines supplied by ign-rendering.

Parameters
[in]_nameName of the desired render-engine
Returns
True if the specified render-engine is available

◆ IsEngineLoaded()

bool IsEngineLoaded ( const std::string _name) const

Determine if a render-engine with the given name is already loaded.

Parameters
[in]_nameName of the desired render-engine
Returns
True if the specified render-engine is loaded.

◆ LoadedEngines()

std::vector<std::string> LoadedEngines ( ) const

Get the list of all engines already loaded.

Returns
Names of all loaded engines.

◆ RegisterEngine()

void RegisterEngine ( const std::string _name,
RenderEngine _engine 
)

Register a new render-engine under the given name. If the given name is already in use, the render-engine will not be registered.

Parameters
[in]_nameName the render-engine will be registered under
[in]_engineRender-engine to be registered

◆ SetPluginPaths()

void SetPluginPaths ( const std::list< std::string > &  _paths)

Set the plugin paths from which render engines can be loaded.

Parameters
[in]_pathsThe list of the plugin paths

◆ UnloadEngine()

bool UnloadEngine ( const std::string _name)

Unload the render-engine with the given name. If the no render-engine is registered under the given name, false will be returned.

Parameters
[in]_nameName of the desired render-engine
Returns
True if the engine is unloaded

◆ UnloadEngineAt()

bool UnloadEngineAt ( unsigned int  _index)

Unload the render-engine at the given index. If the no render-engine is registered under the given name, false will be returned.

Parameters
[in]_indexIndex of the desired render-engine
Returns
True if the engine is unloaded

◆ UnregisterEngine() [1/2]

void UnregisterEngine ( const std::string _name)

Unregister a render-engine registered under the given name. If no render-engine is registered under the given name no work will be done.

Parameters
[in]_nameName of the render-engine to unregister

◆ UnregisterEngine() [2/2]

void UnregisterEngine ( RenderEngine _engine)

Unregister the given render-engine. If the given render-engine is not currently registered, no work will be done.

Parameters
[in]_engineRender-engine to unregister

◆ UnregisterEngineAt()

void UnregisterEngineAt ( unsigned int  _index)

Unregister a render-engine at the given index. If the no render-engine is registered at the given index, no work will be done.

Parameters
[in]_indexIndex of the render-engine to unregister

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