Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

sceneserver.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002 
00003    this file is part of rcssserver3D
00004    Fri May 9 2003
00005    Copyright (C) 2002,2003 Koblenz University
00006    Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: sceneserver.h,v 1.9 2004/04/30 09:32:30 rollmark Exp $
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; version 2 of the License.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 
00022    SceneServer
00023 
00024    NOTE:
00025 
00026    HISTORY:
00027        05.11.02 - MK
00028                 - Initial version
00029 
00030    TODO:
00031 
00032    TOFIX:
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     // Functions
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     // Members
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 } //namespace oxygen
00137 
00138 #endif //OXYGEN_SCENESERVER_H

Generated on Thu Apr 6 15:25:39 2006 for rcssserver3d by  doxygen 1.4.4