#include <u_scene.h>
Inheritance diagram for NL3D::UScene:
The scene is created with a default camera that you can retrieve with getCam().
Nevrax France
Definition at line 90 of file u_scene.h.
LoadBalancing mgt. | |
enum | TPolygonBalancingMode { PolygonBalancingOff = 0, PolygonBalancingOn, PolygonBalancingClamp, CountPolygonBalancing } |
virtual uint | getGroupLoadMaxPolygon (const std::string &group)=0 |
virtual float | getGroupNbFaceAsked (const std::string &group) const=0 |
virtual uint | getMaxSkeletonsInNotCLodForm () const=0 |
see setMaxSkeletonsInNotCLodForm() | |
virtual float | getNbFaceAsked () const=0 |
virtual TPolygonBalancingMode | getPolygonBalancingMode () const=0 |
Get the PolygonBalancingMode. | |
virtual void | setGroupLoadMaxPolygon (const std::string &group, uint nFaces)=0 |
virtual void | setMaxSkeletonsInNotCLodForm (uint m)=0 |
virtual void | setPolygonBalancingMode (TPolygonBalancingMode polBalMode)=0 |
Set the PolygonBalancingMode. | |
Profiling and Render Filtering | |
enum | TRenderFilter { FilterLandscape = 0x00000001, FilterWater = 0x00000002, FilterMeshNoVP = 0x00000004, FilterMeshVP = 0x00000008, FilterMeshMRMNoVP = 0x00000010, FilterMeshMRMVP = 0x00000020, FilterMeshLodNoVP = 0x00000040, FilterMeshLodVP = 0x00000080, FilterSkeleton = 0x00000100, FilterSegRemanence = 0x00000200, FilterPS = 0x00000400, FilterFlare = 0x00000800, FilterCoarseMesh = 0x00001000, FilterAllMeshNoVP = FilterMeshNoVP + FilterMeshMRMNoVP + FilterMeshLodNoVP, FilterAllMeshVP = FilterMeshVP + FilterMeshMRMVP + FilterMeshLodVP, FilterAllMesh = FilterAllMeshNoVP+FilterAllMeshVP, FilterFX = FilterSegRemanence + FilterPS + FilterFlare } |
virtual void | enableElementRender (TRenderFilter elt, bool state)=0 |
virtual void | getProfileResults (CBenchResults &results)=0 |
get The result of the profiling. | |
virtual void | profileNextRender ()=0 |
Enable Profiling for the next render(). Reset All stats. | |
virtual void | profileQuadGridClipManager ()=0 |
Public Types | |
Public Member Functions | |
virtual IWaterSurfaceAddedCallback * | getWaterCallback () const=0 |
virtual void | setWaterCallback (IWaterSurfaceAddedCallback *wcb)=0 |
Render | |
virtual void | animate (TGlobalAnimationTime time)=0 |
virtual void | render ()=0 |
virtual void | updateWaitingInstances (double systemTimeEllapsed)=0 |
Animation gestion. | |
virtual UAnimationSet * | createAnimationSet (const std::string &animationSetFile)=0 |
Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found. | |
virtual UAnimationSet * | createAnimationSet ()=0 |
Create an empty AnimationSet. | |
virtual UPlayListManager * | createPlayListManager ()=0 |
Create a new PlayListManager. | |
virtual void | deleteAnimationSet (UAnimationSet *animationSet)=0 |
Delete a AnimationSet. NB: actually, this animation set is internally deleted only when no more UPlayList use it. | |
virtual void | deletePlayListManager (UPlayListManager *playListManager)=0 |
Delete a PlayListManager. | |
virtual void | setAutomaticAnimationSet (UAnimationSet *as)=0 |
Component Mgt. | |
virtual UCamera * | createCamera ()=0 |
Create a camera. Usefull for this scene only. | |
virtual UCloudScape * | createCloudScape ()=0 |
Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :). | |
virtual UInstance * | createInstance (const std::string &shapeName)=0 |
virtual void | createInstanceAsync (const std::string &shapeName, UInstance **ppInstance, const NLMISC::CVector &position, uint selectedTexture)=0 |
virtual void | createInstanceGroupAndAddToSceneAsync (const std::string &instanceGroup, UInstanceGroup **pIG, const NLMISC::CVector &pos, const NLMISC::CQuat &rot, uint selectedTexture, IAsyncLoadCallback *pCB=NULL)=0 |
virtual ULandscape * | createLandscape ()=0 |
Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :). | |
virtual UPointLight * | createPointLight ()=0 |
Create a dynamic PointLight. Usefull for this scene only. | |
virtual USkeleton * | createSkeleton (const std::string &shapeName)=0 |
virtual UTransform * | createTransform ()=0 |
virtual void | deleteCamera (UCamera *cam)=0 |
Delete a camera. | |
virtual void | deleteCloudScape (UCloudScape *cs)=0 |
delete a landscape. | |
virtual void | deleteInstance (UInstance *inst)=0 |
virtual void | deleteInstanceGroup (UInstanceGroup *pIG)=0 |
virtual void | deleteLandscape (ULandscape *land)=0 |
delete a landscape. | |
virtual void | deletePointLight (UPointLight *light)=0 |
Delete a dynamic PointLight. | |
virtual void | deleteSkeleton (USkeleton *skel)=0 |
virtual void | deleteTransform (UTransform *tr)=0 |
virtual void | setToGlobalInstanceGroup (UInstanceGroup *pIGU)=0 |
virtual void | stopCreatingAndAddingIG (UInstanceGroup **pIG)=0 |
Visual Collision manager. | |
virtual UVisualCollisionManager * | createVisualCollisionManager ()=0 |
virtual void | deleteVisualCollisionManager (UVisualCollisionManager *mgr)=0 |
CLod / Character Lod mgt | |
virtual void | deleteCLodShapeBank (uint32 bankId)=0 |
delete a Shape Bank. No-op if bad id. | |
virtual sint32 | getCLodAnimIdByName (uint32 shapeId, const std::string &name) const=0 |
virtual sint32 | getCLodShapeIdByName (const std::string &name) const=0 |
virtual uint32 | loadCLodShapeBank (const std::string &fileName)=0 |
virtual void | resetCLodManager ()=0 |
reset the manager. | |
Global light setup. | |
virtual void | enableLightingSystem (bool enable)=0 |
virtual NLMISC::CRGBA | getAmbientGlobal () const=0 |
get the global Ambient used for the scene. Default to (50, 50, 50). | |
virtual float | getLightTransitionThreshold () const=0 |
getLightTransitionThreshold() | |
virtual uint | getMaxLightContribution () const=0 |
setMaxLightContribution() | |
virtual NLMISC::CRGBA | getSunAmbient () const=0 |
get the Ambient of the Sun used for the scene. | |
virtual NLMISC::CRGBA | getSunDiffuse () const=0 |
get the Diffuse of the Sun used for the scene. | |
virtual NLMISC::CVector | getSunDirection () const=0 |
get the Direction of the Sun used for the scene. | |
virtual NLMISC::CRGBA | getSunSpecular () const=0 |
get the Specular of the Sun used for the scene. | |
virtual void | setAmbientGlobal (NLMISC::CRGBA ambient)=0 |
set the global Ambient used for the scene. Default to (50, 50, 50). | |
virtual void | setLightGroupColor (uint lightmapGroup, NLMISC::CRGBA color)=0 |
set the color of a light group. | |
virtual void | setLightTransitionThreshold (float lightTransitionThreshold)=0 |
virtual void | setMaxLightContribution (uint nlights)=0 |
virtual void | setSunAmbient (NLMISC::CRGBA ambient)=0 |
set the Ambient of the Sun used for the scene. | |
virtual void | setSunDiffuse (NLMISC::CRGBA diffuse)=0 |
set the Diffuse of the Sun used for the scene. | |
virtual void | setSunDirection (const NLMISC::CVector &direction)=0 |
set the Direction of the Sun used for the scene. | |
virtual void | setSunSpecular (NLMISC::CRGBA specular)=0 |
set the Specular of the Sun used for the scene. | |
ShadowMapping Options | |
virtual void | enableShadowPolySmooth (bool enable)=0 |
Enable Polygon Smoothing. | |
virtual bool | getEnableShadowPolySmooth () const=0 |
get Enable Polygon Smoothing flag | |
virtual uint | getShadowMapBlurSize () const=0 |
get the size of the blur (<=3 means number of fakeBlur). | |
virtual float | getShadowMapDistFadeEnd () const=0 |
Enable Polygon Smoothing. | |
virtual float | getShadowMapDistFadeStart () const=0 |
Enable Polygon Smoothing. | |
virtual uint | getShadowMapMaxCasterAround () const=0 |
Enable Polygon Smoothing. | |
virtual uint | getShadowMapMaxCasterInScreen () const=0 |
Enable Polygon Smoothing. | |
virtual float | getShadowMapMaxDepth () const=0 |
return the current ShadowMap Max Depth. This is the length in the lightDir direction where the shadow can touch receivers | |
virtual uint | getShadowMapTextureSize () const=0 |
return the current base ShadowMap TextureSize. Default is 64 texels. | |
virtual void | setShadowMapBlurSize (uint bs)=0 |
set the size of the blur (<=3 means number of fakeBlur). | |
virtual void | setShadowMapDistFadeEnd (float dist)=0 |
ShadowMap Distance Fade end (50 default). | |
virtual void | setShadowMapDistFadeStart (float dist)=0 |
ShadowMap Distance Fade Start (40 default). | |
virtual void | setShadowMapMaxCasterAround (uint num)=0 |
ShadowMap max Caster Around (optimize memory). | |
virtual void | setShadowMapMaxCasterInScreen (uint num)=0 |
ShadowMap max Caster In Screen (optimize CPU/GPU). | |
virtual void | setShadowMapMaxDepth (float depth)=0 |
set the ShadowMap Extent | |
virtual void | setShadowMapTextureSize (uint size)=0 |
must be a power of 2. | |
Camera/Viewport. | |
virtual void | findCameraClusterSystemFromRay (UCamera *cam, UInstanceGroup *startClusterSystem, const NLMISC::CVector &startPos, const NLMISC::CVector &endPos)=0 |
virtual UCamera * | getCam ()=0 |
Get the current camera. | |
virtual CViewport | getViewport ()=0 |
Get the current Viewport. | |
virtual void | setCam (UCamera *cam)=0 |
Set the current camera for this scene. nlError if NULL, or if the camera was not created by this UScene. | |
virtual void | setViewport (const class CViewport &viewport)=0 |
Set the current Viewport. | |
Coarse meshes mgt. | |
virtual uint8 | getCoarseMeshLightingUpdate () const=0 |
see setCoarseMeshLightingUpdate() | |
virtual void | setCoarseMeshLightingUpdate (uint8 period)=0 |
virtual void | setCoarseMeshManagerTexture (const char *sPath)=0 |
Flare contexts | |
The flare objects are designed to work with a single scene, because they simulate 'retinian persistence' based on the visibility in the current scene. Several context allow to deals with a flare rendered from several points of views. There's a limited number of contexts | |
virtual uint | getFlareContext () const=0 |
virtual uint | getNumFlareContexts () const=0 |
virtual void | setFlareContext (uint context)=0 |
Weather mgt | |
virtual const NLMISC::CVector & | getGlobalWindDirection () const=0 |
get the current windDirection | |
virtual float | getGlobalWindPower () const=0 |
get the current windPower | |
virtual void | setGlobalWindDirection (const NLMISC::CVector &gwd)=0 |
Set the current windDirection for all the scene. dir.z set to 0 and vector normalized. | |
virtual void | setGlobalWindPower (float gwp)=0 |
Set the current windPower for all the scene. 0-1. | |
transparent Layers mgt | |
virtual bool | getLayersRenderingOrder () const=0 |
virtual void | setLayersRenderingOrder (bool directOrder=true)=0 |
Protected Member Functions | |
Object | |
UScene () | |
virtual | ~UScene () |
|
The mode of polygon balancing. NB: this apply to All LoadBalancingGroups, but the "Default" group which is always considered as PolygonBalancingOff PolygonBalancingOff => Models will be rendered with the number of faces they want to render. PolygonBalancingOn => Models will be rendered with the number of faces the LoadBalancing want. PolygonBalancingClamp => Same as PolygonBalancingOn, but factor <= 1, ie models won't be rendered with more face they want to render.
Definition at line 271 of file u_scene.h.
|
|
Definition at line 459 of file u_scene.h.
00460 { 00461 FilterLandscape= 0x00000001, 00462 FilterWater= 0x00000002, 00463 FilterMeshNoVP= 0x00000004, 00464 FilterMeshVP= 0x00000008, 00465 FilterMeshMRMNoVP= 0x00000010, 00466 FilterMeshMRMVP= 0x00000020, 00467 FilterMeshLodNoVP= 0x00000040, 00468 FilterMeshLodVP= 0x00000080, 00469 FilterSkeleton= 0x00000100, // For skins, and also for sticked objects. 00470 FilterSegRemanence= 0x00000200, 00471 FilterPS= 0x00000400, 00472 FilterFlare= 0x00000800, 00473 FilterCoarseMesh= 0x00001000, // Disable render of CoarseMesh (but not management through Meshs!) 00474 00475 // Combos: 00476 FilterAllMeshNoVP= FilterMeshNoVP + FilterMeshMRMNoVP + FilterMeshLodNoVP, 00477 FilterAllMeshVP= FilterMeshVP + FilterMeshMRMVP + FilterMeshLodVP, 00478 FilterAllMesh= FilterAllMeshNoVP+FilterAllMeshVP, 00479 FilterFX= FilterSegRemanence + FilterPS + FilterFlare, 00480 }; |
|
Definition at line 96 of file u_scene.h.
00096 {} |
|
Definition at line 97 of file u_scene.h.
00097 {} |
|
Set the animation time for lightmap and Particle System animation. Implemented in NL3D::CSceneUser. |
|
Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.
Implemented in NL3D::CSceneUser. |
|
Create an empty AnimationSet.
Implemented in NL3D::CSceneUser. |
|
Create a camera. Usefull for this scene only. A Uscene is a factory of Instance/Landscape/Lights etc... Implemented in NL3D::CSceneUser. |
|
Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :).
Implemented in NL3D::CSceneUser. |
|
Create an instance of the shape "shapename". If not present, try to load "shapename" via CPath. If fails (file not found), return NULL. nlerror if the file is not a mesh file. Implemented in NL3D::CSceneUser. |
|
Same as createInstance but the instance is loaded asynchronously. You must poll to know if the instance if created by calling render() Implemented in NL3D::CSceneUser. |
|
create an instance group asynchronously, and add it to a scene asynchronously once it has been loaded. The instance groups that must be added to the scene are checked at each render. The pIG pointer is filled once the instance group has been loaded and add to the scene Implemented in NL3D::CSceneUser. |
|
Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :).
Implemented in NL3D::CSceneUser. |
|
Create a new PlayListManager.
Implemented in NL3D::CSceneUser. |
|
Create a dynamic PointLight. Usefull for this scene only.
Implemented in NL3D::CSceneUser. |
|
Create a skeleton instance of the skeleton shape "shapename". If not present, try to load "shapename" via CPath. If fails (file not found), return NULL. nlerror if the file is not a skeleton shape file. Implemented in NL3D::CSceneUser. |
|
Create a dummy object Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
Delete a AnimationSet. NB: actually, this animation set is internally deleted only when no more UPlayList use it.
Implemented in NL3D::CSceneUser. |
|
Delete a camera.
Implemented in NL3D::CSceneUser. |
|
delete a Shape Bank. No-op if bad id.
Implemented in NL3D::CSceneUser. |
|
delete a landscape.
Implemented in NL3D::CSceneUser. |
|
Delete an instance via his pointer. Implemented in NL3D::CSceneUser. |
|
Delete an instance group Implemented in NL3D::CSceneUser. |
|
delete a landscape.
Implemented in NL3D::CSceneUser. |
|
Delete a PlayListManager.
Implemented in NL3D::CSceneUser. |
|
Delete a dynamic PointLight.
Implemented in NL3D::CSceneUser. |
|
Delete a skeleton instance via his pointer. Implemented in NL3D::CSceneUser. |
|
Delete a dummy object Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
Enable or disable some Models to be rendered (for profile). Default is ALL enabled NB: filtering is made at clip pass. Hence, much of the render processing is skipped (animDetail, light, lod, render) Implemented in NL3D::CSceneUser. |
|
Enable Scene Lighting system. For backward compatibility, false by default. If false, all objects will take last driver 's light setup Implemented in NL3D::CSceneUser. |
|
Enable Polygon Smoothing.
Implemented in NL3D::CSceneUser. |
|
Special For Camera Third person. Traverse the ClusterSystem with a Ray (clip through portals, cluster system hierarchy...), to find where could lies the camera at End point. As result, a camera->setClusterSystem() is done with the found cluster system Implemented in NL3D::CSceneUser. |
|
get the global Ambient used for the scene. Default to (50, 50, 50).
Implemented in NL3D::CSceneUser. |
|
Get the current camera.
Implemented in NL3D::CSceneUser. |
|
Get a AnimId of a shape by its name. -1 if not found. Implemented in NL3D::CSceneUser. |
|
Get a shapeId by its name. -1 if not found. Implemented in NL3D::CSceneUser. |
|
see setCoarseMeshLightingUpdate()
Implemented in NL3D::CSceneUser. |
|
get Enable Polygon Smoothing flag
Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
get the current windDirection
Implemented in NL3D::CSceneUser. |
|
get the current windPower
Implemented in NL3D::CSceneUser. |
|
Get the number of faces wanted for a LoadBlancingGroup. The Group is created if did not exist. Implemented in NL3D::CSceneUser. |
|
Get the last face count asked from the instances before reduction. only for the given group return 0 if the Group does not exist. Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
see setMaxSkeletonsInNotCLodForm()
Implemented in NL3D::CSceneUser. |
|
Get the last face count asked from the instances before reduction. It gets the sum of All groups. Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
Get the PolygonBalancingMode.
Implemented in NL3D::CSceneUser. |
|
get The result of the profiling.
Implemented in NL3D::CSceneUser. |
|
get the size of the blur (<=3 means number of fakeBlur).
Implemented in NL3D::CSceneUser. |
|
Enable Polygon Smoothing.
Implemented in NL3D::CSceneUser. |
|
Enable Polygon Smoothing.
Implemented in NL3D::CSceneUser. |
|
Enable Polygon Smoothing.
Implemented in NL3D::CSceneUser. |
|
Enable Polygon Smoothing.
Implemented in NL3D::CSceneUser. |
|
return the current ShadowMap Max Depth. This is the length in the lightDir direction where the shadow can touch receivers
Implemented in NL3D::CSceneUser. |
|
return the current base ShadowMap TextureSize. Default is 64 texels.
Implemented in NL3D::CSceneUser. |
|
get the Ambient of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
get the Diffuse of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
get the Direction of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
get the Specular of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
Get the current Viewport.
Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
Load a Shape Bank. The ShapeMap is rebuilded. Hence slow call. NB: a vector of ShapeBank is maintained internally, hence, not so many shapeBank should be created at same Time. trhow exception if failed to load the file
Implemented in NL3D::CSceneUser. |
|
Enable Profiling for the next render(). Reset All stats.
Implemented in NL3D::CSceneUser. |
|
output (nlinfo) Stats for Usage of the QuadClip Implemented in NL3D::CSceneUser. |
|
Render the scene from the CurrentCamera view (setCam()), and the current Viewport. nlError if no current camera. NB: no Driver clear buffers (color or ZBuffer) are done.... Implemented in NL3D::CSceneUser. |
|
reset the manager. NB: for an historic reason, CLod interface is in UScene, BUT THERE IS ONLY ONE LOD MANAGER PER UDriver! Implemented in NL3D::CSceneUser. |
|
set the global Ambient used for the scene. Default to (50, 50, 50).
Implemented in NL3D::CSceneUser. |
|
Set the automatic animation set used by the scene. Implemented in NL3D::CSceneUser. |
|
Set the current camera for this scene. nlError if NULL, or if the camera was not created by this UScene.
Implemented in NL3D::CSceneUser. |
|
Each coarseMesh lighting will be updated every "period" frame. clamped to 1,255 Implemented in NL3D::CSceneUser. |
|
Set the coarse meshes's common texture. Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
Set the current windDirection for all the scene. dir.z set to 0 and vector normalized.
Implemented in NL3D::CSceneUser. |
|
Set the current windPower for all the scene. 0-1.
Implemented in NL3D::CSceneUser. |
|
Set the number of faces wanted for a LoadBlancingGroup. The Group is created if did not exist. Implemented in NL3D::CSceneUser. |
|
Set the order or rendering of layers containing transparent objects. In real case, with direct order, we have:
Implemented in NL3D::CSceneUser. |
|
set the color of a light group.
Implemented in NL3D::CSceneUser. |
|
Advanced. When a model is influenced by more light than allowed, or when it reach the limits of the light (attenuationEnd), the light can be darkened according to some threshold. The resultLightColor begin to fade when distModelToLight== attEnd- threshold*(attEnd-attBegin). when distModelToLight== 0, resultLightColor==Black. By default, this value is 0.1f. Setting higher values will smooth transition but will generally darken the global effects of lights. NB: clamp(value, 0, 1); Implemented in NL3D::CSceneUser. |
|
setup the max number of point light that can influence a model. NB: clamped by NL3D_MAX_LIGHT_CONTRIBUTION Default is 3. NB: the sun contribution is not taken into account Implemented in NL3D::CSceneUser. |
|
LoadBalancing for CLod and Skeletons. Setup the max number of skeletons displayed in std way (ie not CLod). Default is 20. Implemented in NL3D::CSceneUser. |
|
Set the PolygonBalancingMode.
Implemented in NL3D::CSceneUser. |
|
set the size of the blur (<=3 means number of fakeBlur).
Implemented in NL3D::CSceneUser. |
|
ShadowMap Distance Fade end (50 default).
Implemented in NL3D::CSceneUser. |
|
ShadowMap Distance Fade Start (40 default).
Implemented in NL3D::CSceneUser. |
|
ShadowMap max Caster Around (optimize memory).
Implemented in NL3D::CSceneUser. |
|
ShadowMap max Caster In Screen (optimize CPU/GPU).
Implemented in NL3D::CSceneUser. |
|
set the ShadowMap Extent
Implemented in NL3D::CSceneUser. |
|
must be a power of 2.
Implemented in NL3D::CSceneUser. |
|
set the Ambient of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
set the Diffuse of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
set the Direction of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
set the Specular of the Sun used for the scene.
Implemented in NL3D::CSceneUser. |
|
Assign the Instance Group to the root cluster Implemented in NL3D::CSceneUser. |
|
Set the current Viewport.
Implemented in NL3D::CSceneUser. |
|
Implemented in NL3D::CSceneUser. |
|
If we are adding the ig : stop loading and adding it to the scene if the ig is already added to the scene : remove it from scene Implemented in NL3D::CSceneUser. |
|
Update waiting instances and igs that are loaded asynchronously NB: this is called by render()
Implemented in NL3D::CSceneUser. |