Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
scene::SceneManager Class Reference

#include <SceneManager.h>

Inheritance diagram for scene::SceneManager:
engine::Object core::Singleton< SceneManager >

List of all members.

Public Member Functions

void addNode (Node *node, Node *parent=NULL)
 Adds a node to be managed by scene manager.
NodecreateNode (Node *parent=NULL)
 Creates a node to be managed by scene manager.
NodecreateNode (const std::string &name, Node *parent=NULL)
ScenecreateScene (const std::string &sceneFilename)
 Creates a scene to be managed by scene manager.
NodegetNode (const u32 &id)
 Retrieves a pointer to a node by id.
u32 getNumberOfNodes () const
 Retrieves the total number of created nodes.
u32 getNumberOfScenes () const
 Retrieves the total number of created scene.
NodegetRootNode ()
ScenegetScene (const u32 &id)
 Retrieves a pointer to a scene by id.
void registerDefaultFactories ()
void removeAllNodes ()
void removeAllScenes ()
void removeDefaultFactories ()
void removeNode (Node *node)
 Removes a node.
void removeNode (const u32 &id)
 Removes a node.
void removeScene (Scene *scene)
 Removes a scene.
void removeScene (const u32 &id)
 Removes a scene.
 SceneManager ()
void start ()
void stop ()
 ~SceneManager ()

Static Public Member Functions

static SceneManagergetInstance ()
 Get instance.

Protected Member Functions

void initializeImpl ()
void uninitializeImpl ()
void updateImpl (f32 elapsedTime)

Protected Attributes

SceneFactorymDefaultSceneFactory
std::map< u32, Node * > mNodes
 Central list of Nodes - for easy memory management.
NodemRoot
 Root node.
std::map< u32, Scene * > mScenes
 Central list of Scenes - for easy memory management and lookup.

Detailed Description

Scene Manager. Defines the functionality of a 3D Scene.


Constructor & Destructor Documentation

scene::SceneManager::SceneManager ( )
scene::SceneManager::~SceneManager ( )

Member Function Documentation

void scene::SceneManager::addNode ( Node node,
Node parent = NULL 
)

Adds a node to be managed by scene manager.

References scene::Node::addChild(), engine::Object::getID(), mNodes, and mRoot.

Node * scene::SceneManager::createNode ( const std::string &  name,
Node parent = NULL 
)
Node * scene::SceneManager::createNode ( Node parent = NULL)

Creates a node to be managed by scene manager.

References scene::Node::addChild(), engine::Object::getID(), mNodes, and mRoot.

Scene * scene::SceneManager::createScene ( const std::string &  sceneFilename)

Creates a scene to be managed by scene manager.

References engine::Object::getID(), getInstance(), mScenes, and resource::RT_RESOURCE_SCENE.

SceneManager * scene::SceneManager::getInstance ( ) [static]
Node * scene::SceneManager::getNode ( const u32 id)

Retrieves a pointer to a node by id.

References mNodes.

u32 scene::SceneManager::getNumberOfNodes ( ) const

Retrieves the total number of created nodes.

References mNodes.

u32 scene::SceneManager::getNumberOfScenes ( ) const

Retrieves the total number of created scene.

References mScenes.

Node * scene::SceneManager::getRootNode ( )

Gets the Node at the root of the scene hierarchy. The entire scene is held as a hierarchy of nodes, which allows things like relative transforms.

References mRoot.

Scene * scene::SceneManager::getScene ( const u32 id)

Retrieves a pointer to a scene by id.

References mScenes.

void scene::SceneManager::initializeImpl ( ) [protected, virtual]

Reimplemented from engine::Object.

References getInstance().

void scene::SceneManager::registerDefaultFactories ( )
void scene::SceneManager::removeAllNodes ( )

References mNodes.

Referenced by uninitializeImpl().

void scene::SceneManager::removeAllScenes ( )
void scene::SceneManager::removeDefaultFactories ( )
void scene::SceneManager::removeNode ( Node node)

Removes a node.

References engine::Object::getID().

Referenced by scene::Scene::removeAllNodes().

void scene::SceneManager::removeNode ( const u32 id)

Removes a node.

References mNodes.

void scene::SceneManager::removeScene ( Scene scene)

Removes a scene.

References engine::Object::getID().

void scene::SceneManager::removeScene ( const u32 id)

Removes a scene.

References getInstance(), and mScenes.

void scene::SceneManager::start ( )
void scene::SceneManager::stop ( )
void scene::SceneManager::uninitializeImpl ( ) [protected, virtual]

Reimplemented from engine::Object.

References getInstance(), removeAllNodes(), and removeAllScenes().

void scene::SceneManager::updateImpl ( f32  elapsedTime) [protected, virtual]

Reimplemented from engine::Object.

References mNodes, mRoot, mScenes, and engine::Object::update().


Member Data Documentation

std::map<u32, Node*> scene::SceneManager::mNodes [protected]

Central list of Nodes - for easy memory management.

Referenced by addNode(), createNode(), getNode(), getNumberOfNodes(), removeAllNodes(), removeNode(), and updateImpl().

std::map<u32, Scene*> scene::SceneManager::mScenes [protected]

Central list of Scenes - for easy memory management and lookup.

Referenced by createScene(), getNumberOfScenes(), getScene(), removeAllScenes(), removeScene(), and updateImpl().


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:10 by Doxygen (1.7.4)