Home | nevrax.com |
|
root_model.hGo to the documentation of this file.00001 00007 /* Copyright, 2001 Nevrax Ltd. 00008 * 00009 * This file is part of NEVRAX NEL. 00010 * NEVRAX NEL is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2, or (at your option) 00013 * any later version. 00014 00015 * NEVRAX NEL is distributed in the hope that it will be useful, but 00016 * WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * General Public License for more details. 00019 00020 * You should have received a copy of the GNU General Public License 00021 * along with NEVRAX NEL; see the file COPYING. If not, write to the 00022 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 00023 * MA 02111-1307, USA. 00024 */ 00025 00026 #ifndef NL_ROOT_MODEL_H 00027 #define NL_ROOT_MODEL_H 00028 00029 #include "nel/misc/types_nl.h" 00030 #include "3d/mot.h" 00031 #include "3d/hrc_trav.h" 00032 #include "3d/clip_trav.h" 00033 #include "3d/anim_detail_trav.h" 00034 #include "3d/load_balancing_trav.h" 00035 #include "3d/light_trav.h" 00036 #include "3d/render_trav.h" 00037 00038 00039 namespace NL3D { 00040 00041 00042 // *************************************************************************** 00043 // ClassIds. 00044 const NLMISC::CClassId RootModelId=NLMISC::CClassId(0x25f0505d, 0x75c69f9); 00045 00046 00047 // *************************************************************************** 00055 class CRootModel : public IModel 00056 { 00057 public: 00059 static void registerBasic(); 00060 00061 00063 IObs *getObs(const NLMISC::CClassId &idTrav); 00064 00065 00066 protected: 00068 CRootModel() {} 00070 virtual ~CRootModel() {} 00071 00072 private: 00073 static IModel *creator() {return new CRootModel;} 00074 friend class CRootModelHrcObs; 00075 friend class CRootModelClipObs; 00076 friend class CRootModelAnimDetailObs; 00077 friend class CRootModelLoadBalancingObs; 00078 friend class CRootModelLightObs; 00079 friend class CRootModelRenderObs; 00080 00081 }; 00082 00083 00084 // *************************************************************************** 00085 class CRootModelHrcObs : public IBaseHrcObs 00086 { 00087 public: 00088 CRootModelHrcObs() {} 00089 00090 virtual void traverse(IObs *caller); 00091 00092 static IObs *creator() {return new CRootModelHrcObs;} 00093 00094 }; 00095 // *************************************************************************** 00096 class CRootModelClipObs : public IBaseClipObs 00097 { 00098 public: 00099 CRootModelClipObs() {} 00100 00101 virtual bool clip(IBaseClipObs *caller) {return true;} 00102 virtual void traverse(IObs *caller); 00103 00104 static IObs *creator() {return new CRootModelClipObs;} 00105 00106 }; 00107 // *************************************************************************** 00108 class CRootModelAnimDetailObs : public IBaseAnimDetailObs 00109 { 00110 public: 00111 CRootModelAnimDetailObs() {} 00112 00113 virtual void traverse(IObs *caller); 00114 00115 static IObs *creator() {return new CRootModelAnimDetailObs;} 00116 00117 }; 00118 // *************************************************************************** 00119 class CRootModelLoadBalancingObs : public IBaseLoadBalancingObs 00120 { 00121 public: 00122 CRootModelLoadBalancingObs() {} 00123 00124 virtual void traverse(IObs *caller); 00125 00126 static IObs *creator() {return new CRootModelLoadBalancingObs;} 00127 00128 }; 00129 // *************************************************************************** 00130 class CRootModelLightObs : public IBaseLightObs 00131 { 00132 public: 00133 CRootModelLightObs() {} 00134 00135 virtual void traverse(IObs *caller); 00136 00137 static IObs *creator() {return new CRootModelLightObs;} 00138 00139 }; 00140 // *************************************************************************** 00141 class CRootModelRenderObs : public IBaseRenderObs 00142 { 00143 public: 00144 CRootModelRenderObs() {} 00145 00146 virtual void traverse(IObs *caller); 00147 00148 static IObs *creator() {return new CRootModelRenderObs;} 00149 00150 }; 00151 00152 00153 } // NL3D 00154 00155 00156 #endif // NL_ROOT_MODEL_H 00157 00158 /* End of root_model.h */ |