Home | nevrax.com |
|
u_scene.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_U_SCENE_H 00027 #define NL_U_SCENE_H 00028 00029 #include "nel/misc/types_nl.h" 00030 #include "nel/3d/animation_time.h" 00031 00032 00033 namespace NLMISC 00034 { 00035 class CRGBA; 00036 class CVector; 00037 }; 00038 00039 namespace NL3D 00040 { 00041 00042 00043 class UCamera; 00044 class UInstance; 00045 class ULandscape; 00046 class UInstanceGroup; 00047 class USkeleton; 00048 class UTransform; 00049 class UVisualCollisionManager; 00050 class UAnimationSet; 00051 class UPlayListManager; 00052 class UPointLight; 00053 00054 00055 //**************************************************************************** 00067 class UScene 00068 { 00069 protected: 00070 00072 // @{ 00073 UScene() {} 00074 virtual ~UScene() {} 00075 // @} 00076 00077 public: 00078 00080 00081 00088 virtual void render()=0; 00089 00093 virtual void animate (TGlobalAnimationTime time) =0; 00094 00096 00097 00099 00100 00101 virtual void setCam(UCamera *cam)=0; 00103 virtual UCamera *getCam()=0; 00105 virtual void setViewport(const class CViewport& viewport)=0; 00107 virtual CViewport getViewport()=0; 00109 00110 00112 00116 00118 virtual UCamera *createCamera()=0; 00120 virtual void deleteCamera(UCamera *cam)=0; 00121 00126 virtual UInstance *createInstance(const std::string &shapeName)=0; 00130 virtual void createInstanceAsync(const std::string &shapeName,UInstance**ppInstance)=0; 00131 00136 virtual void createInstanceGroupAndAddToSceneAsync (const std::string &instanceGroup, 00137 UInstanceGroup **pIG, 00138 const NLMISC::CVector &offset 00139 ) = 0; 00140 00143 virtual void stopCreatingAndAddingIG(UInstanceGroup **pIG) = 0; 00144 00145 00148 virtual UTransform *createTransform()=0; 00151 virtual void deleteInstance(UInstance *inst)=0; 00152 00157 virtual USkeleton *createSkeleton(const std::string &shapeName)=0; 00160 virtual void deleteSkeleton(USkeleton *skel)=0; 00161 00163 virtual ULandscape *createLandscape()=0; 00165 virtual void deleteLandscape(ULandscape *land)=0; 00166 00170 virtual void setToGlobalInstanceGroup(UInstanceGroup *pIGU) = 0; 00171 //virtual UInstanceGroup *createInstanceGroup(const std::string &instanceGroup) =0; 00173 //virtual void deleteInstanceGroup(UInstanceGroup *group) =0; 00174 00175 00177 virtual UPointLight *createPointLight()=0; 00179 virtual void deletePointLight(UPointLight *light)=0; 00180 00181 00183 00185 // @{ 00187 virtual UAnimationSet *createAnimationSet() =0; 00189 virtual UAnimationSet *createAnimationSet(const std::string &animationSetFile) =0; 00191 virtual void deleteAnimationSet(UAnimationSet *animationSet) =0; 00193 virtual UPlayListManager *createPlayListManager() =0; 00195 virtual void deletePlayListManager(UPlayListManager *playListManager) =0; 00198 virtual void setAutomaticAnimationSet(UAnimationSet *as) = 0; 00199 // @} 00200 00202 00203 virtual UVisualCollisionManager *createVisualCollisionManager() =0; 00204 virtual void deleteVisualCollisionManager(UVisualCollisionManager *mgr) =0; 00206 00207 00209 00210 00218 enum TPolygonBalancingMode {PolygonBalancingOff=0, PolygonBalancingOn, PolygonBalancingClamp, CountPolygonBalancing }; 00219 00221 virtual void setPolygonBalancingMode(TPolygonBalancingMode polBalMode) =0; 00223 virtual TPolygonBalancingMode getPolygonBalancingMode() const =0; 00224 00225 00229 virtual void setLoadMaxPolygon(uint nFaces) =0; 00233 virtual uint getLoadMaxPolygon() =0; 00237 virtual float getNbFaceAsked () const =0; 00238 00239 00243 virtual void setGroupLoadMaxPolygon(const std::string &group, uint nFaces) =0; 00247 virtual uint getGroupLoadMaxPolygon(const std::string &group) =0; 00251 virtual float getGroupNbFaceAsked (const std::string &group) const =0; 00252 00254 00256 00257 00260 virtual void setStaticCoarseMeshManagerTexture (const char *sPath) =0; 00261 00264 virtual void setDynamicCoarseMeshManagerTexture (const char *sPath) =0; 00265 00269 virtual void setCoarseMeshLightingUpdate(uint8 period) =0; 00270 00272 virtual uint8 getCoarseMeshLightingUpdate() const =0; 00273 00275 00276 00278 00279 00283 virtual void enableLightingSystem(bool enable) =0; 00284 00285 00287 virtual void setAmbientGlobal(NLMISC::CRGBA ambient) =0; 00289 virtual void setSunAmbient(NLMISC::CRGBA ambient) =0; 00291 virtual void setSunDiffuse(NLMISC::CRGBA diffuse) =0; 00293 virtual void setSunSpecular(NLMISC::CRGBA specular) =0; 00295 virtual void setSunDirection(const NLMISC::CVector &direction) =0; 00296 00297 00299 virtual NLMISC::CRGBA getAmbientGlobal() const =0; 00301 virtual NLMISC::CRGBA getSunAmbient() const =0; 00303 virtual NLMISC::CRGBA getSunDiffuse() const =0; 00305 virtual NLMISC::CRGBA getSunSpecular() const =0; 00307 virtual NLMISC::CVector getSunDirection() const =0; 00308 00313 virtual void setMaxLightContribution(uint nlights) =0; 00315 virtual uint getMaxLightContribution() const =0; 00316 00325 virtual void setLightTransitionThreshold(float lightTransitionThreshold) =0; 00327 virtual float getLightTransitionThreshold() const =0; 00328 00329 00331 00332 00334 00335 00341 virtual void setLayersRenderingOrder(bool directOrder = true) = 0; 00342 virtual bool getLayersRenderingOrder() const = 0; 00344 00345 00347 00348 00350 virtual void setGlobalWindPower(float gwp) =0; 00352 virtual float getGlobalWindPower() const =0; 00353 00355 virtual void setGlobalWindDirection(const NLMISC::CVector &gwd) =0; 00357 virtual const NLMISC::CVector &getGlobalWindDirection() const =0; 00358 00360 00361 00363 00364 00366 virtual void resetCLodManager() =0; 00367 00375 virtual uint32 loadCLodShapeBank(const std::string &fileName) =0; 00376 00378 virtual void deleteCLodShapeBank(uint32 bankId) =0; 00379 00382 virtual sint32 getCLodShapeIdByName(const std::string &name) const =0; 00383 00386 virtual sint32 getCLodAnimIdByName(uint32 shapeId, const std::string &name) const =0; 00387 00389 00390 }; 00391 00392 00393 } // NL3D 00394 00395 00396 #endif // NL_U_SCENE_H 00397 00398 /* End of u_scene.h */ |