RenderEngine Class Reference

Adaptor to Ogre3d. More...

#include <rendering/rendering.hh>

Inherits SingletonT< RenderEngine >.

Public Types

enum  RenderPathType {
  NONE = 0, VERTEX = 1, FORWARD = 2, DEFERRED = 3,
  RENDER_PATH_COUNT
}
 The type of rendering path used by the rendering engine. More...
 

Public Member Functions

void AddResourcePath (const std::string &_uri)
 Add a new path for Ogre to search for resources. More...
 
ScenePtr CreateScene (const std::string &_name, bool _enableVisualizations, bool _isServer=false)
 Create a scene. More...
 
void Fini ()
 Tears down the rendering engine. More...
 
RenderPathType GetRenderPathType () const
 Get the type of rendering path to use. More...
 
ScenePtr GetScene (const std::string &_name="")
 Get a scene by name. More...
 
ScenePtr GetScene (unsigned int _index)
 Get a scene by index. More...
 
unsigned int GetSceneCount () const GAZEBO_DEPRECATED(7.0)
 Get the number of scenes. More...
 
WindowManagerPtr GetWindowManager () const
 Get a pointer to the window manager. More...
 
void Init ()
 Initialize Ogre. Load must happen before Init. More...
 
void Load ()
 Load the parameters for Ogre. Load must happen before Init. More...
 
void RemoveScene (const std::string &_name)
 Remove a scene. More...
 
Ogre::Root * Root () const
 Get a pointer to the Ogre root object. More...
 
unsigned int SceneCount () const
 Get the number of scenes. More...
 

Static Public Member Functions

static RenderEngineInstance ()
 Get an instance of the singleton. More...
 

Protected Attributes

void * dummyContext
 GLX context used to render the scenes.Used for gui-less operation. More...
 
void * dummyDisplay
 Pointer to the dummy display.Used for gui-less operation. More...
 
uint64_t dummyWindowId
 ID for a dummy window. Used for gui-less operation. More...
 

Detailed Description

Adaptor to Ogre3d.

Provides the interface to load, initialize the rendering engine.

Member Enumeration Documentation

The type of rendering path used by the rendering engine.

Enumerator
NONE 

No rendering is done.

VERTEX 

Most basic rendering, with least fidelity.

FORWARD 

Utilizes the RTT shader system.

DEFERRED 

Utilizes deferred rendering. Best fidelity.

RENDER_PATH_COUNT 

Count of the rendering path enums.

Member Function Documentation

void AddResourcePath ( const std::string &  _uri)

Add a new path for Ogre to search for resources.

Parameters
[in]_uriURI of the path. The uri should be of the form file:// or model://
ScenePtr CreateScene ( const std::string &  _name,
bool  _enableVisualizations,
bool  _isServer = false 
)

Create a scene.

Parameters
[in]_nameThe name of the scene.
[in]_enableVisualizationsTrue enables visualization elements such as laser lines.
void Fini ( )

Tears down the rendering engine.

RenderPathType GetRenderPathType ( ) const

Get the type of rendering path to use.

This is automatically determined based on the computers capabilities

Returns
The RenderPathType
ScenePtr GetScene ( const std::string &  _name = "")

Get a scene by name.

Parameters
[in]_nameName of the scene to retreive.
Returns
A pointer to the Scene, or NULL if the scene doesn't exist.
ScenePtr GetScene ( unsigned int  _index)

Get a scene by index.

The index should be between 0 and GetSceneCount().

Parameters
[in]_indexThe index of the scene.
Returns
A pointer to a Scene, or NULL if the index was invalid.
unsigned int GetSceneCount ( ) const

Get the number of scenes.

Returns
The number of scenes created by the RenderEngine.
Deprecated:
See SceneCount()
WindowManagerPtr GetWindowManager ( ) const

Get a pointer to the window manager.

Returns
Pointer to the window manager.
void Init ( )

Initialize Ogre. Load must happen before Init.

static RenderEngine * Instance ( )
inlinestaticinherited

Get an instance of the singleton.

void Load ( )

Load the parameters for Ogre. Load must happen before Init.

void RemoveScene ( const std::string &  _name)

Remove a scene.

Parameters
[in]_nameThe name of the scene to remove.
Ogre::Root* Root ( ) const

Get a pointer to the Ogre root object.

Returns
Pointer to the Ogre root object.
unsigned int SceneCount ( ) const

Get the number of scenes.

Returns
The number of scenes created by the RenderEngine.

Member Data Documentation

void* dummyContext
protected

GLX context used to render the scenes.Used for gui-less operation.

void* dummyDisplay
protected

Pointer to the dummy display.Used for gui-less operation.

uint64_t dummyWindowId
protected

ID for a dummy window. Used for gui-less operation.


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