Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/scene/SceneManager.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _SCENE_MANAGER_H_
00004 #define _SCENE_MANAGER_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <core/Singleton.h>
00009 #include <engine/Object.h>
00010 
00011 #include <map>
00012 
00013 namespace resource
00014 {
00015 class Resource;
00016 class Serializer;
00017 }
00018 
00019 namespace scene
00020 {
00021 
00022 class Node;
00023 class Scene;
00024 class Scene;
00025 class SceneFactory;
00026 
00029 class ENGINE_PUBLIC_EXPORT SceneManager: public engine::Object, public core::Singleton<SceneManager>
00030 {
00031 public:
00032 
00033         SceneManager();
00034         ~SceneManager();
00035 
00036         void start();
00037 
00038         void stop();
00039 
00043         Node* getRootNode();
00044 
00046         Node* createNode(Node* parent = NULL);
00047         Node* createNode(const std::string& name, Node* parent = NULL);
00048 
00050         void addNode(Node* node, Node* parent = NULL);
00051 
00053         Node* getNode(const u32& id);
00054 
00056         u32 getNumberOfNodes() const;
00057 
00059         void removeNode(Node* node);
00061         void removeNode(const u32& id);
00062 
00063         void removeAllNodes();
00064 
00066         Scene* createScene(const std::string& sceneFilename);
00067         
00069         Scene* getScene(const u32& id);
00070 
00072         u32 getNumberOfScenes() const;
00073 
00075         void removeScene(Scene* scene);
00077         void removeScene(const u32& id);
00078 
00079         void removeAllScenes();
00080 
00081         void registerDefaultFactories();
00082         void removeDefaultFactories();
00083 
00084         static SceneManager* getInstance();
00085 
00086 private:
00087 
00088 protected:
00089 
00090         void initializeImpl();
00091         void uninitializeImpl();
00092         void updateImpl(f32 elapsedTime);
00093 
00094         SceneFactory* mDefaultSceneFactory;
00095 
00097         std::map<u32, Node*> mNodes;
00098 
00100         std::map<u32, Scene*> mScenes;
00101 
00103         Node* mRoot;
00104 };
00105 
00106 } // end namespace scene
00107 
00108 #endif

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