syBR::Game::SceneManager Class Reference

Scene manager class. More...

#include <SceneManager.hpp>

List of all members.

Public Member Functions

 SceneManager (GUIManager *pGUIManager, Core::Logger *pLogger)
 Constructor.
 ~SceneManager ()
 Destructor.
const bool hasLogger () const
 Indicate if a logger is used for all scene-related stuff.
Core::LoggergetLogger ()
 Get the logger used for all scene-related stuff.
void update (const float timeSinceLastUpdate)
 Update scenes.
bool createScene (const std::string &name)
 Create a scene and activate it if there is no current active scene.
bool removeScene (const std::string &name)
 Remove a scene and unload its data.
bool activateScene (const std::string &name)
 Activate a scene.
bool disableScene (const std::string &name)
 Disable a scene.
ScenegetScene (const std::string &name)
 Get a pointer to a scene.

Private Attributes

Core::Loggerm_pLogger
 Pointer to the logger to be used.
GUIManagerm_pGUIManager
 GUI manager to be used.
Ogre::SceneManager * m_pRenderSceneManager
 Ogre scene manager to be used for rendering.
std::map
< std::string, Scene * > 
m_mapScenes
 Scenes.
Scenem_pActiveScene
 Active scene.


Detailed Description

Scene manager class.

It is the object responsible for managing all the available scenes. See the Scene class for more information about scenes.

Rendering system must be initialized before any GUIManager is created, failure to do so will results in errors.


Constructor & Destructor Documentation

syBR::Game::SceneManager::SceneManager ( GUIManager pGUIManager,
Core::Logger pLogger 
)

Constructor.

Parameters:
pGUIManager GUI manager to be used by this scene manager
pLogger Pointer to the instance of the logger to use

syBR::Game::SceneManager::~SceneManager (  ) 

Destructor.


Member Function Documentation

const bool syBR::Game::SceneManager::hasLogger (  )  const

Indicate if a logger is used for all scene-related stuff.

Returns:
One of these:
  • true if a logger has been specified
  • false otherwise

Core::Logger * syBR::Game::SceneManager::getLogger (  ) 

Get the logger used for all scene-related stuff.

Returns:
Pointer to the logger instance

void syBR::Game::SceneManager::update ( const float  timeSinceLastUpdate  ) 

Update scenes.

Run physics simulations of the scenes and update them

Parameters:
timeSinceLastUpdate Time since last update in seconds

bool syBR::Game::SceneManager::createScene ( const std::string &  name  ) 

Create a scene and activate it if there is no current active scene.

Parameters:
name Name of the scene to create
Returns:
One of these:
  • true in case of success
  • false otherwise

bool syBR::Game::SceneManager::removeScene ( const std::string &  name  ) 

Remove a scene and unload its data.

Parameters:
name Name of the scene to remove
Returns:
One of these:
  • true in case of success
  • false otherwise

bool syBR::Game::SceneManager::activateScene ( const std::string &  name  ) 

Activate a scene.

Parameters:
name Name of the scene to activate
Returns:
One of these:
  • true in case of success
  • false otherwise

bool syBR::Game::SceneManager::disableScene ( const std::string &  name  ) 

Disable a scene.

Parameters:
name Name of the scene to disable
Returns:
One of these:
  • true in case of success
  • false otherwise

Scene * syBR::Game::SceneManager::getScene ( const std::string &  name  ) 

Get a pointer to a scene.

Parameters:
name Name of the scene to retrieve
Returns:
One of these:
  • Pointer to the requested scene if it exists
  • NULL otherwise


Member Data Documentation

Core::Logger* syBR::Game::SceneManager::m_pLogger [private]

Pointer to the logger to be used.

GUIManager* syBR::Game::SceneManager::m_pGUIManager [private]

GUI manager to be used.

Ogre::SceneManager* syBR::Game::SceneManager::m_pRenderSceneManager [private]

Ogre scene manager to be used for rendering.

std::map<std::string, Scene *> syBR::Game::SceneManager::m_mapScenes [private]

Scenes.

Scene* syBR::Game::SceneManager::m_pActiveScene [private]

Active scene.


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

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008