# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CSceneUser Class Reference

<Class description>. More...

#include <scene_user.h>

Inheritance diagram for NL3D::CSceneUser:

NL3D::UScene List of all members.

Public Methods

Object
 CSceneUser (CDriverUser *drv)
virtual ~CSceneUser ()
Render
virtual void render ()
 Render the scene from the CurrentCamera view (setCam()), and the current Viewport. More...

virtual void updateWaitingInstances (double ellapsedTime)
 Update waiting instances and igs that are loaded asynchronously NB: this is called by render(). More...

virtual void animate (TGlobalAnimationTime time)
 Set the animation time for lightmap and Particle System animation. More...

Camera/Viewport.
virtual void setCam (UCamera *cam)
 Set the current camera for this scene. nlError if NULL, or if the camera was not created by this UScene. More...

virtual UCameragetCam ()
 Get the current camera. More...

virtual void setViewport (const class CViewport &viewport)
 Set the current Viewport. More...

virtual CViewport getViewport ()
 Get the current Viewport. More...

Component Mgt.
virtual UCameracreateCamera ()
 Create a camera. Usefull for this scene only. More...

virtual void deleteCamera (UCamera *cam)
 Delete a camera. More...

virtual UInstancecreateInstance (const std::string &shapeName)
 Create an instance of the shape "shapename". More...

virtual void createInstanceAsync (const std::string &shapeName, UInstance **ppInstance)
 Same as createInstance but the instance is loaded asynchronously. More...

virtual void deleteInstance (UInstance *inst)
 Delete an instance via his pointer. More...

virtual void createInstanceGroupAndAddToSceneAsync (const std::string &instanceGroup, UInstanceGroup **pIG, const NLMISC::CVector &offset)
 create an instance group asynchronously, and add it to a scene asynchronously once it has been loaded. More...

virtual void stopCreatingAndAddingIG (UInstanceGroup **pIG)
 Stop loading and adding an ig to the scene. More...

void updateWaitingIG ()
 should be called at each render. More...

virtual UTransformcreateTransform ()
 Create a dummy object. More...

virtual void deleteTransform (UTransform *tr)
 Delete a dummy object. More...

virtual USkeletoncreateSkeleton (const std::string &shapeName)
 Create a skeleton instance of the skeleton shape "shapename". More...

virtual void deleteSkeleton (USkeleton *skel)
 Delete a skeleton instance via his pointer. More...

virtual ULandscapecreateLandscape ()
 Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :). More...

virtual void deleteLandscape (ULandscape *land)
 delete a landscape. More...

virtual UCloudScapecreateCloudScape ()
 Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :). More...

virtual void deleteCloudScape (UCloudScape *cs)
 delete a landscape. More...

virtual void setToGlobalInstanceGroup (UInstanceGroup *pIG)
 Assign the Instance Group to the root cluster. More...

virtual UPointLightcreatePointLight ()
 Create a dynamic PointLight. Usefull for this scene only. More...

virtual void deletePointLight (UPointLight *light)
 Delete a dynamic PointLight. More...

Animation gestion.
virtual UAnimationSetcreateAnimationSet ()
 Create an empty AnimationSet. More...

virtual UAnimationSetcreateAnimationSet (const std::string &animationSetFile)
 Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found. More...

virtual void deleteAnimationSet (UAnimationSet *animationSet)
 Delete a AnimationSet. More...

virtual void setAutomaticAnimationSet (UAnimationSet *as)
 Set the automatic animation set used by the scene. More...

virtual UPlayListManagercreatePlayListManager ()
 Create a new PlayListManager. More...

virtual void deletePlayListManager (UPlayListManager *playListManager)
 Delete a PlayListManager. More...

Visual Collision manager.
virtual UVisualCollisionManagercreateVisualCollisionManager ()
virtual void deleteVisualCollisionManager (UVisualCollisionManager *mgr)
LoadBalancing mgt.
virtual void setPolygonBalancingMode (TPolygonBalancingMode polBalMode)
 Set the PolygonBalancingMode. More...

virtual TPolygonBalancingMode getPolygonBalancingMode () const
 Get the PolygonBalancingMode. More...

virtual float getNbFaceAsked () const
 Get the last face count asked from the instances before reduction. More...

virtual void setGroupLoadMaxPolygon (const std::string &group, uint nFaces)
 Set the number of faces wanted for a LoadBlancingGroup. More...

virtual uint getGroupLoadMaxPolygon (const std::string &group)
 Get the number of faces wanted for a LoadBlancingGroup. More...

virtual float getGroupNbFaceAsked (const std::string &group) const
 Get the last face count asked from the instances before reduction. More...

virtual void setMaxSkeletonsInNotCLodForm (uint m)
 LoadBalancing for CLod and Skeletons. More...

virtual uint getMaxSkeletonsInNotCLodForm () const
 see setMaxSkeletonsInNotCLodForm(). More...

Coarse meshes mgt.
virtual void setStaticCoarseMeshManagerTexture (const char *sPath)
 Set the static coarse meshes's common texture. More...

virtual void setDynamicCoarseMeshManagerTexture (const char *sPath)
 Set the dynamic coarse meshes's common texture. More...

virtual void setCoarseMeshLightingUpdate (uint8 period)
 Each coarseMesh lighting will be updated every "period" frame. More...

virtual uint8 getCoarseMeshLightingUpdate () const
 see setCoarseMeshLightingUpdate(). More...

transparent Layers mgt
virtual void setLayersRenderingOrder (bool directOrder=true)
 Set the order or rendering of layers containing transparent objects. More...

virtual bool getLayersRenderingOrder () const
Global light setup.
virtual void enableLightingSystem (bool enable)
 Enable Scene Lighting system. More...

virtual void setAmbientGlobal (NLMISC::CRGBA ambient)
 set the global Ambient used for the scene. Default to (50, 50, 50). More...

virtual void setSunAmbient (NLMISC::CRGBA ambient)
 set the Ambient of the Sun used for the scene. More...

virtual void setSunDiffuse (NLMISC::CRGBA diffuse)
 set the Diffuse of the Sun used for the scene. More...

virtual void setSunSpecular (NLMISC::CRGBA specular)
 set the Specular of the Sun used for the scene. More...

virtual void setSunDirection (const NLMISC::CVector &direction)
 set the Direction of the Sun used for the scene. More...

virtual NLMISC::CRGBA getAmbientGlobal () const
 get the global Ambient used for the scene. Default to (50, 50, 50). More...

virtual NLMISC::CRGBA getSunAmbient () const
 get the Ambient of the Sun used for the scene. More...

virtual NLMISC::CRGBA getSunDiffuse () const
 get the Diffuse of the Sun used for the scene. More...

virtual NLMISC::CRGBA getSunSpecular () const
 get the Specular of the Sun used for the scene. More...

virtual NLMISC::CVector getSunDirection () const
 get the Direction of the Sun used for the scene. More...

virtual void setMaxLightContribution (uint nlights)
 setup the max number of point light that can influence a model. More...

virtual uint getMaxLightContribution () const
 
See also:
setMaxLightContribution().
More...


virtual void setLightTransitionThreshold (float lightTransitionThreshold)
 Advanced. More...

virtual float getLightTransitionThreshold () const
 
See also:
getLightTransitionThreshold().
More...


Weather mgt
virtual void setGlobalWindPower (float gwp)
 Set the current windPower for all the scene. 0-1. More...

virtual float getGlobalWindPower () const
 get the current windPower. More...

virtual void setGlobalWindDirection (const NLMISC::CVector &gwd)
 Set the current windDirection for all the scene. dir.z set to 0 and vector normalized. More...

virtual const NLMISC::CVectorgetGlobalWindDirection () const
 get the current windDirection. More...

CLod / Character Lod mgt
virtual void resetCLodManager ()
 reset the manager. More...

virtual uint32 loadCLodShapeBank (const std::string &fileName)
 Load a Shape Bank. More...

virtual void deleteCLodShapeBank (uint32 bankId)
 delete a Shape Bank. No-op if bad id. More...

virtual sint32 getCLodShapeIdByName (const std::string &name) const
 Get a shapeId by its name. More...

virtual sint32 getCLodAnimIdByName (uint32 shapeId, const std::string &name) const
 Get a AnimId of a shape by its name. More...

Accessor for CSceneUser.
CScenegetScene ()

Protected Types

typedef CPtrSet< CTransformUserTTransformSet
typedef CPtrSet< CLandscapeUserTLandscapeSet
typedef CPtrSet< CCloudScapeUserTCloudScapeSet
typedef CPtrSet< CInstanceGroupUserTInstanceGroupSet
typedef CPtrSet< CVisualCollisionManagerUserTVisualCollisionManagerSet
typedef CPtrSet< CAnimationSetUserTAnimationSetSet
typedef CPtrSet< CPlayListManagerUserTPlayListManagerSet
typedef std::list< CWaitingIGTWaitingIGList

Protected Attributes

CDriverUser_DriverUser
 The driver which owns this scene. More...

CScene _Scene
 The Scene. More...

CCameraUser_CurrentCamera
 The Current camera. More...

TTransformSet _Transforms
TLandscapeSet _Landscapes
TCloudScapeSet _CloudScapes
TInstanceGroupSet _InstanceGroups
TVisualCollisionManagerSet _VisualCollisionManagers
TAnimationSetSet _AnimationSets
TPlayListManagerSet _PlayListManagers
std::map< UInstance **, CTransformShape * > _WaitingInstances
TWaitingIGList _WaitingIGs

Private Methods

virtual void updateWaitingInstances ()
 update async loading during a call to render. More...


Detailed Description

<Class description>.

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 62 of file scene_user.h.


Member Typedef Documentation

typedef CPtrSet<CAnimationSetUser> NL3D::CSceneUser::TAnimationSetSet [protected]
 

Definition at line 82 of file scene_user.h.

typedef CPtrSet<CCloudScapeUser> NL3D::CSceneUser::TCloudScapeSet [protected]
 

Definition at line 79 of file scene_user.h.

typedef CPtrSet<CInstanceGroupUser> NL3D::CSceneUser::TInstanceGroupSet [protected]
 

Definition at line 80 of file scene_user.h.

typedef CPtrSet<CLandscapeUser> NL3D::CSceneUser::TLandscapeSet [protected]
 

Definition at line 78 of file scene_user.h.

typedef CPtrSet<CPlayListManagerUser> NL3D::CSceneUser::TPlayListManagerSet [protected]
 

Definition at line 83 of file scene_user.h.

typedef CPtrSet<CTransformUser> NL3D::CSceneUser::TTransformSet [protected]
 

Definition at line 77 of file scene_user.h.

typedef CPtrSet<CVisualCollisionManagerUser> NL3D::CSceneUser::TVisualCollisionManagerSet [protected]
 

Definition at line 81 of file scene_user.h.

typedef std::list<CWaitingIG> NL3D::CSceneUser::TWaitingIGList [protected]
 

Definition at line 104 of file scene_user.h.


Constructor & Destructor Documentation

NL3D::CSceneUser::CSceneUser CDriverUser   drv
 

Definition at line 919 of file scene_user.cpp.

References _CurrentCamera, _DriverUser, _Scene, createCamera, NL3D_MEM_SCENE_INIT, nlassert, and setCam.

NL3D::CSceneUser::~CSceneUser   [virtual]
 

Definition at line 952 of file scene_user.cpp.

References _CloudScapes, _CurrentCamera, _DriverUser, _Landscapes, _Scene, _Transforms, _VisualCollisionManagers, and NL3D_MEM_SCENE.


Member Function Documentation

void NL3D::CSceneUser::animate TGlobalAnimationTime    time [virtual]
 

Set the animation time for lightmap and Particle System animation.

Implements NL3D::UScene.

Definition at line 611 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_RENDER_SCENE_ANIMATE, and NL3D::TGlobalAnimationTime.

UAnimationSet * NL3D::CSceneUser::createAnimationSet const std::string &    animationSetFile [virtual]
 

Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.

Implements NL3D::UScene.

Definition at line 84 of file scene_user.cpp.

References _AnimationSets, NL3D_HAUTO_LOAD_ANIMSET, and NLMISC::CIFile::open.

UAnimationSet * NL3D::CSceneUser::createAnimationSet   [virtual]
 

Create an empty AnimationSet.

Implements NL3D::UScene.

Definition at line 76 of file scene_user.cpp.

References NL3D_HAUTO_ELT_SCENE.

UCamera * NL3D::CSceneUser::createCamera   [virtual]
 

Create a camera. Usefull for this scene only.

Implements NL3D::UScene.

Definition at line 658 of file scene_user.cpp.

References _Scene, _Transforms, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_SCENE.

Referenced by CSceneUser.

UCloudScape * NL3D::CSceneUser::createCloudScape   [virtual]
 

Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :).

Implements NL3D::UScene.

Definition at line 846 of file scene_user.cpp.

References _CloudScapes, _Scene, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_CLOUDS.

UInstance * NL3D::CSceneUser::createInstance const std::string &    shapeName [virtual]
 

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.

Implements NL3D::UScene.

Definition at line 680 of file scene_user.cpp.

References _Scene, _Transforms, NL3D_HAUTO_CREATE_INSTANCE, and NL3D_MEM_INSTANCE.

void NL3D::CSceneUser::createInstanceAsync const std::string &    shapeName,
UInstance **    ppInstance
[virtual]
 

Same as createInstance but the instance is loaded asynchronously.

You must poll to know if the instance if created by calling render()

Implements NL3D::UScene.

Definition at line 704 of file scene_user.cpp.

References _Scene, _WaitingInstances, NL3D_HAUTO_CREATE_INSTANCE, and NL3D_MEM_INSTANCE.

void NL3D::CSceneUser::createInstanceGroupAndAddToSceneAsync const std::string &    instanceGroup,
UInstanceGroup **    pIG,
const NLMISC::CVector   offset
[virtual]
 

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

Implements NL3D::UScene.

Definition at line 733 of file scene_user.cpp.

References _WaitingIGs, NL3D_HAUTO_ASYNC_IG, NL3D_MEM_IG, and offset.

ULandscape * NL3D::CSceneUser::createLandscape   [virtual]
 

Create a landscape. There could be many Landscape per Scene (Driver? :). But never tested :).

Implements NL3D::UScene.

Definition at line 829 of file scene_user.cpp.

References _Landscapes, _Scene, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_LANDSCAPE.

UPlayListManager * NL3D::CSceneUser::createPlayListManager   [virtual]
 

Create a new PlayListManager.

Implements NL3D::UScene.

Definition at line 117 of file scene_user.cpp.

References _PlayListManagers, and NL3D_HAUTO_ELT_SCENE.

UPointLight * NL3D::CSceneUser::createPointLight   [virtual]
 

Create a dynamic PointLight. Usefull for this scene only.

Implements NL3D::UScene.

Definition at line 363 of file scene_user.cpp.

References _Scene, _Transforms, NL3D_HAUTO_ELT_SCENE, NL3D_MEM_LIGHT, and NL3D::PointLightModelId.

USkeleton * NL3D::CSceneUser::createSkeleton const std::string &    shapeName [virtual]
 

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.

Implements NL3D::UScene.

Definition at line 803 of file scene_user.cpp.

References _Scene, _Transforms, NL3D_HAUTO_CREATE_SKELETON, NL3D_MEM_SKELETON, and nlerror.

UTransform * NL3D::CSceneUser::createTransform   [virtual]
 

Create a dummy object.

Implements NL3D::UScene.

Definition at line 779 of file scene_user.cpp.

References _Scene, _Transforms, NL3D_HAUTO_ELT_SCENE, NL3D_MEM_SCENE, and NL3D::TransformId.

UVisualCollisionManager * NL3D::CSceneUser::createVisualCollisionManager   [virtual]
 

Implements NL3D::UScene.

Definition at line 902 of file scene_user.cpp.

References _VisualCollisionManagers, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_VISUAL_COLLISION.

void NL3D::CSceneUser::deleteAnimationSet UAnimationSet   animationSet [virtual]
 

Delete a AnimationSet.

Implements NL3D::UScene.

Definition at line 96 of file scene_user.cpp.

References _AnimationSets, and NL3D_HAUTO_ELT_SCENE.

void NL3D::CSceneUser::deleteCamera UCamera   cam [virtual]
 

Delete a camera.

Implements NL3D::UScene.

Definition at line 666 of file scene_user.cpp.

References _CurrentCamera, _Transforms, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_SCENE.

void NL3D::CSceneUser::deleteCLodShapeBank uint32    bankId [virtual]
 

delete a Shape Bank. No-op if bad id.

Implements NL3D::UScene.

Definition at line 502 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_LOAD_LOD, NL3D_MEM_LOD, and nlassert.

void NL3D::CSceneUser::deleteCloudScape UCloudScape   cs [virtual]
 

delete a landscape.

Implements NL3D::UScene.

Definition at line 854 of file scene_user.cpp.

References _CloudScapes, and NL3D_MEM_CLOUDS.

void NL3D::CSceneUser::deleteInstance UInstance   inst [virtual]
 

Delete an instance via his pointer.

Implements NL3D::UScene.

Definition at line 723 of file scene_user.cpp.

References _Transforms, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_INSTANCE.

void NL3D::CSceneUser::deleteLandscape ULandscape   land [virtual]
 

delete a landscape.

Implements NL3D::UScene.

Definition at line 837 of file scene_user.cpp.

References _Landscapes, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_LANDSCAPE.

void NL3D::CSceneUser::deletePlayListManager UPlayListManager   playListManager [virtual]
 

Delete a PlayListManager.

Implements NL3D::UScene.

Definition at line 125 of file scene_user.cpp.

References _PlayListManagers, and NL3D_HAUTO_ELT_SCENE.

void NL3D::CSceneUser::deletePointLight UPointLight   light [virtual]
 

Delete a dynamic PointLight.

Implements NL3D::UScene.

Definition at line 377 of file scene_user.cpp.

References _Transforms, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::deleteSkeleton USkeleton   skel [virtual]
 

Delete a skeleton instance via his pointer.

Implements NL3D::UScene.

Definition at line 819 of file scene_user.cpp.

References _Transforms, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_SKELETON.

void NL3D::CSceneUser::deleteTransform UTransform   tr [virtual]
 

Delete a dummy object.

Implements NL3D::UScene.

Definition at line 793 of file scene_user.cpp.

References _Transforms, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_SCENE.

void NL3D::CSceneUser::deleteVisualCollisionManager UVisualCollisionManager   mgr [virtual]
 

Implements NL3D::UScene.

Definition at line 909 of file scene_user.cpp.

References _VisualCollisionManagers, NL3D_HAUTO_ELT_SCENE, and NL3D_MEM_VISUAL_COLLISION.

void NL3D::CSceneUser::enableLightingSystem bool    enable [virtual]
 

Enable Scene Lighting system.

For backward compatibility, false by default. If false, all objects will take last driver 's light setup

Implements NL3D::UScene.

Definition at line 246 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

NLMISC::CRGBA NL3D::CSceneUser::getAmbientGlobal   const [virtual]
 

get the global Ambient used for the scene. Default to (50, 50, 50).

Implements NL3D::UScene.

Definition at line 293 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

UCamera * NL3D::CSceneUser::getCam   [virtual]
 

Get the current camera.

Implements NL3D::UScene.

Definition at line 635 of file scene_user.cpp.

References NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

sint32 NL3D::CSceneUser::getCLodAnimIdByName uint32    shapeId,
const std::string &    name
const [virtual]
 

Get a AnimId of a shape by its name.

-1 if not found.

Implements NL3D::UScene.

Definition at line 530 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, NL3D_MEM_LOD, and nlassert.

sint32 NL3D::CSceneUser::getCLodShapeIdByName const std::string &    name const [virtual]
 

Get a shapeId by its name.

-1 if not found.

Implements NL3D::UScene.

Definition at line 518 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, NL3D_MEM_LOD, and nlassert.

uint8 NL3D::CSceneUser::getCoarseMeshLightingUpdate   const [virtual]
 

see setCoarseMeshLightingUpdate().

Implements NL3D::UScene.

Definition at line 237 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

const CVector & NL3D::CSceneUser::getGlobalWindDirection   const [virtual]
 

get the current windDirection.

Implements NL3D::UScene.

Definition at line 409 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

float NL3D::CSceneUser::getGlobalWindPower   const [virtual]
 

get the current windPower.

Implements NL3D::UScene.

Definition at line 396 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

uint NL3D::CSceneUser::getGroupLoadMaxPolygon const std::string &    group [virtual]
 

Get the number of faces wanted for a LoadBlancingGroup.

The Group is created if did not exist.

Implements NL3D::UScene.

Definition at line 174 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

float NL3D::CSceneUser::getGroupNbFaceAsked const std::string &    group const [virtual]
 

Get the last face count asked from the instances before reduction.

only for the given group return 0 if the Group does not exist.

Implements NL3D::UScene.

Definition at line 182 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

virtual bool NL3D::CSceneUser::getLayersRenderingOrder   const [inline, virtual]
 

Implements NL3D::UScene.

Definition at line 231 of file scene_user.h.

References _Scene.

float NL3D::CSceneUser::getLightTransitionThreshold   const [virtual]
 

See also:
getLightTransitionThreshold().

Implements NL3D::UScene.

Definition at line 353 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

uint NL3D::CSceneUser::getMaxLightContribution   const [virtual]
 

See also:
setMaxLightContribution().

Implements NL3D::UScene.

Definition at line 338 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

uint NL3D::CSceneUser::getMaxSkeletonsInNotCLodForm   const [virtual]
 

see setMaxSkeletonsInNotCLodForm().

Implements NL3D::UScene.

Definition at line 973 of file scene_user.cpp.

References _Scene.

float NL3D::CSceneUser::getNbFaceAsked   const [virtual]
 

Get the last face count asked from the instances before reduction.

It gets the sum of All groups.

Implements NL3D::UScene.

Definition at line 157 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

CSceneUser::TPolygonBalancingMode NL3D::CSceneUser::getPolygonBalancingMode   const [virtual]
 

Get the PolygonBalancingMode.

Implements NL3D::UScene.

Definition at line 146 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, NL3D_MEM_SCENE, and nlassert.

CScene& NL3D::CSceneUser::getScene void    [inline]
 

Definition at line 284 of file scene_user.h.

References _Scene, and NL3D_MEM_SCENE.

NLMISC::CRGBA NL3D::CSceneUser::getSunAmbient   const [virtual]
 

get the Ambient of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 300 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

NLMISC::CRGBA NL3D::CSceneUser::getSunDiffuse   const [virtual]
 

get the Diffuse of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 307 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

NLMISC::CVector NL3D::CSceneUser::getSunDirection   const [virtual]
 

get the Direction of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 321 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

NLMISC::CRGBA NL3D::CSceneUser::getSunSpecular   const [virtual]
 

get the Specular of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 314 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

CViewport NL3D::CSceneUser::getViewport   [virtual]
 

Get the current Viewport.

Implements NL3D::UScene.

Definition at line 649 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

uint32 NL3D::CSceneUser::loadCLodShapeBank const std::string &    fileName [virtual]
 

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

Parameters:
fileName  is a .clodbank file, to be loaded. CPath::lookup is used.
Returns:
id of the shape Bank.

Implements NL3D::UScene.

Definition at line 474 of file scene_user.cpp.

References _Scene, file, NL3D_HAUTO_LOAD_LOD, NL3D_MEM_LOD, and nlassert.

void NL3D::CSceneUser::render   [virtual]
 

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....
NB: The UDriver Matrix/Viewport context for 2D/3D interface is restored after this render. NB: nlerror if the current camera has been deleted. NB: the UDriver Light setup (see UDriver::setLight() / UDriver::setAmbientColor()) is modified. At the exit of render(), all UDriver lights are disabled.

Implements NL3D::UScene.

Definition at line 547 of file scene_user.cpp.

References _CurrentCamera, _DriverUser, _Scene, NL3D_HAUTO_RENDER_SCENE, NL3D_MEM_SCENE_RENDER, nlerror, and updateWaitingInstances.

void NL3D::CSceneUser::resetCLodManager   [virtual]
 

reset the manager.

Implements NL3D::UScene.

Definition at line 462 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, NL3D_MEM_LOD, and nlassert.

void NL3D::CSceneUser::setAmbientGlobal NLMISC::CRGBA    ambient [virtual]
 

set the global Ambient used for the scene. Default to (50, 50, 50).

Implements NL3D::UScene.

Definition at line 255 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setAutomaticAnimationSet UAnimationSet   as [virtual]
 

Set the automatic animation set used by the scene.

Implements NL3D::UScene.

Definition at line 105 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and nlassert.

void NL3D::CSceneUser::setCam UCamera   cam [virtual]
 

Set the current camera for this scene. nlError if NULL, or if the camera was not created by this UScene.

Implements NL3D::UScene.

Definition at line 621 of file scene_user.cpp.

References _CurrentCamera, _Scene, NL3D_HAUTO_UI_SCENE, NL3D_MEM_SCENE, and nlerror.

Referenced by CSceneUser.

void NL3D::CSceneUser::setCoarseMeshLightingUpdate uint8    period [virtual]
 

Each coarseMesh lighting will be updated every "period" frame.

clamped to 1,255

Implements NL3D::UScene.

Definition at line 228 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setDynamicCoarseMeshManagerTexture const char *    sPath [virtual]
 

Set the dynamic coarse meshes's common texture.

Implements NL3D::UScene.

Definition at line 211 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_LOAD_LOD, and NL3D_MEM_LOD.

void NL3D::CSceneUser::setGlobalWindDirection const NLMISC::CVector   gwd [virtual]
 

Set the current windDirection for all the scene. dir.z set to 0 and vector normalized.

Implements NL3D::UScene.

Definition at line 404 of file scene_user.cpp.

References _Scene.

void NL3D::CSceneUser::setGlobalWindPower float    gwp [virtual]
 

Set the current windPower for all the scene. 0-1.

Implements NL3D::UScene.

Definition at line 388 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

void NL3D::CSceneUser::setGroupLoadMaxPolygon const std::string &    group,
uint    nFaces
[virtual]
 

Set the number of faces wanted for a LoadBlancingGroup.

The Group is created if did not exist.

Implements NL3D::UScene.

Definition at line 166 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

virtual void NL3D::CSceneUser::setLayersRenderingOrder bool    directOrder = true [inline, virtual]
 

Set the order or rendering of layers containing transparent objects.

In real case, with direct order, we have:

  • Underwater is rendered.
  • Water is rendered.
  • Objects above water are rendered.

Implements NL3D::UScene.

Definition at line 230 of file scene_user.h.

References _Scene.

void NL3D::CSceneUser::setLightTransitionThreshold float    lightTransitionThreshold [virtual]
 

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);

Implements NL3D::UScene.

Definition at line 346 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setMaxLightContribution uint    nlights [virtual]
 

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

Implements NL3D::UScene.

Definition at line 331 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setMaxSkeletonsInNotCLodForm uint    m [virtual]
 

LoadBalancing for CLod and Skeletons.

Setup the max number of skeletons displayed in std way (ie not CLod). Default is 20.

Implements NL3D::UScene.

Definition at line 967 of file scene_user.cpp.

References _Scene.

void NL3D::CSceneUser::setPolygonBalancingMode TPolygonBalancingMode    polBalMode [virtual]
 

Set the PolygonBalancingMode.

Implements NL3D::UScene.

Definition at line 135 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, NL3D_MEM_SCENE, and nlassert.

void NL3D::CSceneUser::setStaticCoarseMeshManagerTexture const char *    sPath [virtual]
 

Set the static coarse meshes's common texture.

Implements NL3D::UScene.

Definition at line 193 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_LOAD_LOD, and NL3D_MEM_LOD.

void NL3D::CSceneUser::setSunAmbient NLMISC::CRGBA    ambient [virtual]
 

set the Ambient of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 262 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setSunDiffuse NLMISC::CRGBA    diffuse [virtual]
 

set the Diffuse of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 269 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setSunDirection const NLMISC::CVector   direction [virtual]
 

set the Direction of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 283 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setSunSpecular NLMISC::CRGBA    specular [virtual]
 

set the Specular of the Sun used for the scene.

Implements NL3D::UScene.

Definition at line 276 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_LIGHT.

void NL3D::CSceneUser::setToGlobalInstanceGroup UInstanceGroup   pIG [virtual]
 

Assign the Instance Group to the root cluster.

Implements NL3D::UScene.

Definition at line 892 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_IG.

Referenced by updateWaitingIG.

void NL3D::CSceneUser::setViewport const class CViewport   viewport [virtual]
 

Set the current Viewport.

Implements NL3D::UScene.

Definition at line 642 of file scene_user.cpp.

References _Scene, NL3D_HAUTO_UI_SCENE, and NL3D_MEM_SCENE.

void NL3D::CSceneUser::stopCreatingAndAddingIG UInstanceGroup **    pIG [virtual]
 

Stop loading and adding an ig to the scene.

Implements NL3D::UScene.

Definition at line 743 of file scene_user.cpp.

References _WaitingIGs, NL3D_HAUTO_ASYNC_IG, and NL3D_MEM_IG.

void NL3D::CSceneUser::updateWaitingIG  
 

should be called at each render.

Definition at line 418 of file scene_user.cpp.

References _DriverUser, _WaitingIGs, NL3D_MEM_IG, and setToGlobalInstanceGroup.

Referenced by updateWaitingInstances.

void NL3D::CSceneUser::updateWaitingInstances double    ellapsedTime [virtual]
 

Update waiting instances and igs that are loaded asynchronously NB: this is called by render().

Parameters:
systemTimeEllapsed  : the time between 2 calls to updateWaitingInstances, in seconds

Implements NL3D::UScene.

Definition at line 568 of file scene_user.cpp.

References _Scene, NL3D_MEM_INSTANCE, and updateWaitingInstances.

void NL3D::CSceneUser::updateWaitingInstances   [private, virtual]
 

update async loading during a call to render.

Definition at line 577 of file scene_user.cpp.

References _Scene, _Transforms, _WaitingInstances, NL3D_HAUTO_ASYNC_IG, NL3D_MEM_INSTANCE, and updateWaitingIG.

Referenced by render, and updateWaitingInstances.


Member Data Documentation

TAnimationSetSet NL3D::CSceneUser::_AnimationSets [protected]
 

Definition at line 89 of file scene_user.h.

Referenced by createAnimationSet, and deleteAnimationSet.

TCloudScapeSet NL3D::CSceneUser::_CloudScapes [protected]
 

Definition at line 86 of file scene_user.h.

Referenced by createCloudScape, deleteCloudScape, and ~CSceneUser.

CCameraUser* NL3D::CSceneUser::_CurrentCamera [protected]
 

The Current camera.

Definition at line 73 of file scene_user.h.

Referenced by CSceneUser, deleteCamera, render, setCam, and ~CSceneUser.

CDriverUser* NL3D::CSceneUser::_DriverUser [protected]
 

The driver which owns this scene.

Definition at line 69 of file scene_user.h.

Referenced by CSceneUser, render, updateWaitingIG, and ~CSceneUser.

TInstanceGroupSet NL3D::CSceneUser::_InstanceGroups [protected]
 

Definition at line 87 of file scene_user.h.

TLandscapeSet NL3D::CSceneUser::_Landscapes [protected]
 

Definition at line 85 of file scene_user.h.

Referenced by createLandscape, deleteLandscape, and ~CSceneUser.

TPlayListManagerSet NL3D::CSceneUser::_PlayListManagers [protected]
 

Definition at line 90 of file scene_user.h.

Referenced by createPlayListManager, and deletePlayListManager.

CScene NL3D::CSceneUser::_Scene [protected]
 

The Scene.

Definition at line 71 of file scene_user.h.

Referenced by animate, createCamera, createCloudScape, createInstance, createInstanceAsync, createLandscape, createPointLight, createSkeleton, createTransform, CSceneUser, deleteCLodShapeBank, enableLightingSystem, getAmbientGlobal, getCLodAnimIdByName, getCLodShapeIdByName, getCoarseMeshLightingUpdate, getGlobalWindDirection, getGlobalWindPower, getGroupLoadMaxPolygon, getGroupNbFaceAsked, getLayersRenderingOrder, getLightTransitionThreshold, getMaxLightContribution, getMaxSkeletonsInNotCLodForm, getNbFaceAsked, getPolygonBalancingMode, getScene, getSunAmbient, getSunDiffuse, getSunDirection, getSunSpecular, getViewport, loadCLodShapeBank, render, resetCLodManager, setAmbientGlobal, setAutomaticAnimationSet, setCam, setCoarseMeshLightingUpdate, setDynamicCoarseMeshManagerTexture, setGlobalWindDirection, setGlobalWindPower, setGroupLoadMaxPolygon, setLayersRenderingOrder, setLightTransitionThreshold, setMaxLightContribution, setMaxSkeletonsInNotCLodForm, setPolygonBalancingMode, setStaticCoarseMeshManagerTexture, setSunAmbient, setSunDiffuse, setSunDirection, setSunSpecular, setToGlobalInstanceGroup, setViewport, updateWaitingInstances, and ~CSceneUser.

TTransformSet NL3D::CSceneUser::_Transforms [protected]
 

Definition at line 84 of file scene_user.h.

Referenced by createCamera, createInstance, createPointLight, createSkeleton, createTransform, deleteCamera, deleteInstance, deletePointLight, deleteSkeleton, deleteTransform, updateWaitingInstances, and ~CSceneUser.

TVisualCollisionManagerSet NL3D::CSceneUser::_VisualCollisionManagers [protected]
 

Definition at line 88 of file scene_user.h.

Referenced by createVisualCollisionManager, deleteVisualCollisionManager, and ~CSceneUser.

TWaitingIGList NL3D::CSceneUser::_WaitingIGs [protected]
 

Definition at line 105 of file scene_user.h.

Referenced by createInstanceGroupAndAddToSceneAsync, stopCreatingAndAddingIG, and updateWaitingIG.

std::map<UInstance**,CTransformShape*> NL3D::CSceneUser::_WaitingInstances [protected]
 

Definition at line 92 of file scene_user.h.

Referenced by createInstanceAsync, and updateWaitingInstances.


The documentation for this class was generated from the following files: