Ignition Rendering

API Reference

0.1.0

#include <BaseRenderEngine.hh>

Public Member Functions

virtual ~BaseRenderEngine ()
 
virtual void AddResourcePath (const std::string &_path)
 Documentation Inherited. More...
 
virtual ScenePtr CreateScene (const std::string &_name)
 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)
 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 ()
 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)
 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)
 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)
 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)
 Destroy the scene with the given name. If no scenes exist with the given name, no work will be done. More...
 
virtual void DestroyScenes ()
 Destroy all scenes managed by this render-engine. More...
 
virtual bool Fini ()
 
virtual bool HasScene (ConstScenePtr _scene) const
 Determine if the given scene is actively managed by this render-engine. More...
 
virtual bool HasSceneId (unsigned int _id) const
 Determine if this render-engine manages a scene with the given ID. More...
 
virtual bool HasSceneName (const std::string &_name) const
 Determine if this render-engine manages a scene with the given name. More...
 
virtual bool Init ()
 Initialize the render-engine. This should be called immediately after a successful call to Load. More...
 
virtual bool IsEnabled () const
 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
 Determines if the render-engine has been initialized. More...
 
virtual bool IsLoaded () const
 Determines if the render-engine has been loaded. More...
 
virtual bool Load ()
 Load any necessary resources to set up render-engine. This should called before any other function. More...
 
virtual ScenePtr SceneById (unsigned int _id) const
 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
 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
 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
 Get the number of scenes actively managed by this render-engine. More...
 
- Public Member Functions inherited from RenderEngine
virtual ~RenderEngine ()
 Deconstructor. More...
 
virtual std::string Name () const =0
 Get name of the render-engine. More...
 

Protected Member Functions

 BaseRenderEngine ()
 
virtual ScenePtr CreateSceneImpl (unsigned int _id, const std::string &_name)=0
 
virtual bool InitImpl ()=0
 
virtual bool LoadImpl ()=0
 
virtual unsigned int NextSceneId ()
 
virtual void PrepareScene (ScenePtr _scene)
 
virtual SceneStorePtr Scenes () const =0
 

Protected Attributes

bool initialized
 
bool loaded
 
unsigned int nextSceneId
 
std::vector< std::stringresourcePaths
 a list of paths that render engines use to locate their resources More...
 

Constructor & Destructor Documentation

◆ BaseRenderEngine()

BaseRenderEngine ( )
protected

◆ ~BaseRenderEngine()

virtual ~BaseRenderEngine ( )
virtual

Member Function Documentation

◆ AddResourcePath()

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

Documentation Inherited.

Implements RenderEngine.

Reimplemented in OgreRenderEngine.

◆ CreateScene() [1/2]

virtual ScenePtr CreateScene ( const std::string _name)
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

Implements RenderEngine.

◆ CreateScene() [2/2]

virtual ScenePtr CreateScene ( unsigned int  _id,
const std::string _name 
)
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

Implements RenderEngine.

◆ CreateSceneImpl()

virtual ScenePtr CreateSceneImpl ( unsigned int  _id,
const std::string _name 
)
protectedpure virtual

Implemented in OgreRenderEngine.

◆ Destroy()

virtual void Destroy ( )
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

Implements RenderEngine.

◆ DestroyScene()

virtual void DestroyScene ( ScenePtr  _scene)
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

Implements RenderEngine.

◆ DestroySceneById()

virtual void DestroySceneById ( unsigned int  _id)
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

Implements RenderEngine.

◆ DestroySceneByIndex()

virtual void DestroySceneByIndex ( unsigned int  _index)
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

Implements RenderEngine.

◆ DestroySceneByName()

virtual void DestroySceneByName ( const std::string _name)
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

Implements RenderEngine.

◆ DestroyScenes()

virtual void DestroyScenes ( )
virtual

Destroy all scenes managed by this render-engine.

Implements RenderEngine.

◆ Fini()

virtual bool Fini ( )
virtual

Implements RenderEngine.

Reimplemented in OgreRenderEngine.

◆ HasScene()

virtual bool HasScene ( ConstScenePtr  _scene) const
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

Implements RenderEngine.

◆ HasSceneId()

virtual bool HasSceneId ( unsigned int  _id) const
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

Implements RenderEngine.

◆ HasSceneName()

virtual bool HasSceneName ( const std::string _name) const
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

Implements RenderEngine.

◆ Init()

virtual bool Init ( )
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

Implements RenderEngine.

◆ InitImpl()

virtual bool InitImpl ( )
protectedpure virtual

Implemented in OgreRenderEngine.

◆ IsEnabled()

virtual bool IsEnabled ( ) const
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

Implements RenderEngine.

Reimplemented in OgreRenderEngine.

◆ IsInitialized()

virtual bool IsInitialized ( ) const
virtual

Determines if the render-engine has been initialized.

Returns
True if the render-engine is initialized

Implements RenderEngine.

◆ IsLoaded()

virtual bool IsLoaded ( ) const
virtual

Determines if the render-engine has been loaded.

Returns
True if the render-engine is loaded

Implements RenderEngine.

◆ Load()

virtual bool Load ( )
virtual

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

Returns
True if the render-engine was successfully loaded

Implements RenderEngine.

◆ LoadImpl()

virtual bool LoadImpl ( )
protectedpure virtual

Implemented in OgreRenderEngine.

◆ NextSceneId()

virtual unsigned int NextSceneId ( )
protectedvirtual

◆ PrepareScene()

virtual void PrepareScene ( ScenePtr  _scene)
protectedvirtual

◆ SceneById()

virtual ScenePtr SceneById ( unsigned int  _id) const
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

Implements RenderEngine.

◆ SceneByIndex()

virtual ScenePtr SceneByIndex ( unsigned int  _index) const
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

Implements RenderEngine.

◆ SceneByName()

virtual ScenePtr SceneByName ( const std::string _name) const
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

Implements RenderEngine.

◆ SceneCount()

virtual unsigned int SceneCount ( ) const
virtual

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

Returns
The number of active scenes

Implements RenderEngine.

◆ Scenes()

virtual SceneStorePtr Scenes ( ) const
protectedpure virtual

Implemented in OgreRenderEngine.

Member Data Documentation

◆ initialized

bool initialized
protected

◆ loaded

bool loaded
protected

◆ nextSceneId

unsigned int nextSceneId
protected

◆ resourcePaths

std::vector<std::string> resourcePaths
protected

a list of paths that render engines use to locate their resources


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