00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef OXYGEN_SCENESERVER_H
00035 #define OXYGEN_SCENESERVER_H
00036
00037 #include <zeitgeist/class.h>
00038 #include <zeitgeist/node.h>
00039
00040 namespace oxygen
00041 {
00042 #if 0
00043 }
00044 #endif
00045
00046 class Scene;
00047 class Space;
00048 class World;
00049 class BaseNode;
00050 class Transform;
00051
00057 class SceneServer : public zeitgeist::Node
00058 {
00059
00060
00061
00062 public:
00063 SceneServer();
00064 ~SceneServer();
00065
00068 boost::shared_ptr<Scene> CreateScene(const std::string &location);
00069
00071 bool SetActiveScene(const std::string &location);
00072
00074 boost::shared_ptr<Scene> GetActiveScene() { return mActiveScene; }
00075
00078 void Update(float deltaTime);
00079
00081 bool ImportScene(const std::string& fileName,
00082 boost::shared_ptr<BaseNode> root,
00083 boost::shared_ptr<zeitgeist::ParameterList> parameter);
00084
00088 bool InitSceneImporter(const std::string& importerName);
00089
00091 static int GetTransformMark();
00092
00093 protected:
00094
00095
00096
00097
00099 void UpdateCache();
00100
00102 void ResetCache();
00103
00105 virtual void OnUnlink();
00106
00111 void ReparentTransformChildren(boost::shared_ptr<Transform> node);
00112
00116 void RemoveTransformPaths(boost::shared_ptr<zeitgeist::Leaf> root);
00117
00118 private:
00120 boost::shared_ptr<Scene> mActiveScene;
00121
00123 boost::shared_ptr<Space> mActiveSpace;
00124
00126 boost::shared_ptr<World> mActiveWorld;
00127
00131 static int mTransformMark;
00132 };
00133
00134 DECLARE_CLASS(SceneServer);
00135
00136 }
00137
00138 #endif //OXYGEN_SCENESERVER_H