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. | |
| ~RenderEngineManager () | |
| Destructor. | |
| 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. | |
| 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. | |
| unsigned int | EngineCount () const |
| Get the number of available render-engines. | |
| 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 gz-rendering. | |
| bool | IsEngineLoaded (const std::string &_name) const |
| Determine if a render-engine with the given name is already loaded. | |
| std::vector< std::string > | LoadedEngines () const |
| Get the list of all engines already loaded. | |
| 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. | |
| void | SetPluginPaths (const std::list< std::string > &_paths) |
| Set the plugin paths from which render engines can be loaded. | |
| 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. | |
| 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. | |
| 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. | |
| void | UnregisterEngine (RenderEngine *_engine) |
| Unregister the given render-engine. If the given render-engine is not currently registered, no work will be done. | |
| 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. | |
Static Public Member Functions | |
| static RenderEngineManager * | Instance () |
| Get a pointer to the render engine manager. | |
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.
Constructor & Destructor Documentation
◆ RenderEngineManager()
Constructor.
◆ ~RenderEngineManager()
| ~RenderEngineManager | ( | ) |
Destructor.
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] _name Name of the desired render-engine [in] _params Parameters to be passed to the render engine. [in] _path Another 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] _index Index of the desired render-engine [in] _params Parameters to be passed to the render engine. [in] _path Another 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 gz-rendering.
- Parameters
-
[in] _name Name of the desired render-engine
- Returns
- True if the specified render-engine is available
◆ Instance()
|
static |
Get a pointer to the render engine manager.
- Returns
- a pointer to the render engine manager
◆ IsEngineLoaded()
| bool IsEngineLoaded | ( | const std::string & | _name | ) | const |
Determine if a render-engine with the given name is already loaded.
- Parameters
-
[in] _name Name 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] _name Name the render-engine will be registered under [in] _engine Render-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] _paths The 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] _name Name 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] _index Index 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] _name Name 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] _engine Render-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] _index Index of the render-engine to unregister
The documentation for this class was generated from the following file: