00001 /* 00002 * This file is part of the "Archon" framework. 00003 * (http://files3d.sourceforge.net) 00004 * 00005 * Copyright © 2002 by Kristian Spangsege and Brian Kristiansen. 00006 * 00007 * Permission to use, copy, modify, and distribute this software and 00008 * its documentation under the terms of the GNU General Public License is 00009 * hereby granted. No representations are made about the suitability of 00010 * this software for any purpose. It is provided "as is" without express 00011 * or implied warranty. See the GNU General Public License 00012 * (http://www.gnu.org/copyleft/gpl.html) for more details. 00013 * 00014 * The characters in this file are ISO8859-1 encoded. 00015 * 00016 * The documentation in this file is in "Doxygen" style 00017 * (http://www.doxygen.org). 00018 */ 00019 00020 #ifndef ARCHON_X3D_SCENE_H 00021 #define ARCHON_X3D_SCENE_H 00022 00029 #include <vector> 00030 #include <string> 00031 00032 #include <archon/math/vector.H> 00033 #include <archon/math/geometry.H> 00034 #include <archon/util/logger.H> 00035 #include <archon/util/ref.H> 00036 00037 #include <archon/x3d/server/load.H> 00038 #include <archon/x3d/server/time.H> 00039 #include <archon/x3d/server/group.H> 00040 #include <archon/x3d/server/event.H> 00041 00042 namespace Archon 00043 { 00044 namespace X3D 00045 { 00046 using namespace std; 00047 using namespace Utilities; 00048 using namespace Math; 00049 00050 struct SceneBase: ExecutionContext 00051 { 00052 Ref<Group> getRootGroup() const; 00053 void setRootGroup(Ref<Group>); 00054 00058 Ref<Group> getRootGroupNoLock() { return rootGroup; } 00059 00063 // virtual string dump(int level) const { return rootGroup->dump(level); } 00064 00065 protected: 00066 SceneBase(Ref<Server>, Uri baseUri, Ref<AbstractFileServer>); 00067 00068 private: 00069 void refForwardDestroy(); 00070 00074 Ref<Group> rootGroup; 00075 }; 00076 00077 struct Scene: SceneBase 00078 { 00079 Scene(Ref<Server>, Uri baseUri, Ref<AbstractFileServer> =0); 00080 00081 // string dump(int level = 0) const; 00082 }; 00083 } 00084 } 00085 00086 #endif // ARCHON_X3D_SCENE_H