#include <SceneManager.hpp>
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::Logger * | getLogger () |
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. | |
Scene * | getScene (const std::string &name) |
Get a pointer to a scene. | |
Private Attributes | |
Core::Logger * | m_pLogger |
Pointer to the logger to be used. | |
GUIManager * | m_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. | |
Scene * | m_pActiveScene |
Active scene. |
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.
syBR::Game::SceneManager::SceneManager | ( | GUIManager * | pGUIManager, | |
Core::Logger * | pLogger | |||
) |
Constructor.
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.
const bool syBR::Game::SceneManager::hasLogger | ( | ) | const |
Indicate if a logger is used for all scene-related stuff.
Core::Logger * syBR::Game::SceneManager::getLogger | ( | ) |
Get the logger used for all scene-related stuff.
void syBR::Game::SceneManager::update | ( | const float | timeSinceLastUpdate | ) |
Update scenes.
Run physics simulations of the scenes and update them
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.
name | Name of the scene to create |
bool syBR::Game::SceneManager::removeScene | ( | const std::string & | name | ) |
Remove a scene and unload its data.
name | Name of the scene to remove |
bool syBR::Game::SceneManager::activateScene | ( | const std::string & | name | ) |
Activate a scene.
name | Name of the scene to activate |
bool syBR::Game::SceneManager::disableScene | ( | const std::string & | name | ) |
Disable a scene.
name | Name of the scene to disable |
Scene * syBR::Game::SceneManager::getScene | ( | const std::string & | name | ) |
Get a pointer to a scene.
name | Name of the scene to retrieve |
Core::Logger* syBR::Game::SceneManager::m_pLogger [private] |
Pointer to the logger to be used.
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.
Copyright © 2008 by Sebastien Frippiat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008