NL3D::CScene Class Reference

#include <scene.h>


Detailed Description

A CScene, which own a list of Render Traversals, and a render() method.

USER RULES:

CScene own those Traversals and those Root and kill them at ~CScene().

Coordinate System: right hand cordinates with: X to the right, Y to the far, Z to the top.

Z ^ | > Y | / | / |/ -------> X

Shape System:
The scene has an instance Managagement:

Author:
Lionel Berenguier

Nevrax France

Date:
2000

Definition at line 114 of file scene.h.

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 (MaxNumFlareContexts)

enum  { MaxNumFlareContexts = CFlareModel::MaxNumContext }
uint getFlareContext () const
void setFlareContext (uint context)

Private

typedef TSkeletonModelList::iterator ItSkeletonModelList
typedef std::list< CSkeletonModel * > TSkeletonModelList
ItSkeletonModelList appendSkeletonModelToList (CSkeletonModel *skel)
 Private.

void eraseSkeletonModelToList (ItSkeletonModelList it)
ItSkeletonModelList getSkeletonModelListBegin ()
ItSkeletonModelList getSkeletonModelListEnd ()

LoadBalancing mgt.

enum  TPolygonBalancingMode { PolygonBalancingOff = 0, PolygonBalancingOn, PolygonBalancingClamp, CountPolygonBalancing }
uint getGroupLoadMaxPolygon (const std::string &group)
float getGroupNbFaceAsked (const std::string &group) const
uint getMaxSkeletonsInNotCLodForm () const
float getNbFaceAsked () const
TPolygonBalancingMode getPolygonBalancingMode () const
 Get the PolygonBalancingMode.

void setGroupLoadMaxPolygon (const std::string &group, uint nFaces)
void setMaxSkeletonsInNotCLodForm (uint m)
void setPolygonBalancingMode (TPolygonBalancingMode polBalMode)
 Set the PolygonBalancingMode.


Profiling

void incrementProfileTriVBFormat (std::map< uint32, uint32 > &formatToTri, uint32 vbFormat, uint32 numTris)
bool isNextRenderProfile () const
void profileNextRender ()
 Misc.

UScene::CBenchResults BenchRes

Shape/Instances.

typedef std::multimap< std::string,
CTransformShape ** > 
TWaitingInstancesMMap
CInstanceGroup_GlobalInstanceGroup
CShapeBank_ShapeBank
TWaitingInstancesMMap _WaitingInstances

Public Types


Public Member Functions

CAsyncTextureManagergetAsyncTextureManager () const
 Get the async texture manager. NULL if was not setuped.

CAnimationSetgetAutomaticAnimationSet () const
 Get a reference to the set of automatic animations.

double getCurrentSystemTime () const
TGlobalAnimationTime getCurrentTime (void) const
 get the current time of the scene, in second. It start from 0 (at the firt call of animate)

double getEllapsedSystemTime () const
 get the ellapsed time (in second) between the last 2 calls of render().

TAnimationTime getEllapsedTime (void) const
 get the ellapsed time (in second) between the last 2 calls of animate.

CInstanceGroupgetGlobalInstanceGroup ()
uint64 getNumRender () const
 get the number of time render has been called

CParticleSystemManagergetParticleSystemManager ()
 Get a ref. to the particle system manager. You shouldn't call this (has methods for private processing).

IWaterSurfaceAddedCallbackgetWaterCallback () const
void setAsyncTextureManager (CAsyncTextureManager *mgr)
 Set the async texture manager.

void setAutomaticAnimationSet (CAnimationSet *as)
 set the automatic animation set used by this scene. It is stored as a smart pointer

void setWaterCallback (IWaterSurfaceAddedCallback *wcb)
void updateWaitingInstances (double systemTimeEllapsed)
Light Mgt.
void addInstanceGroupForLightAnimation (CInstanceGroup *ig)
 Add an IG for auto PointLight Factor animation. called by CInstanceGroup::addToScene().

void animate (TGlobalAnimationTime atTime)
 Add an IG for auto PointLight Factor animation. called by CInstanceGroup::addToScene().

void removeInstanceGroupForLightAnimation (CInstanceGroup *ig)
 Remove an IG for auto PointLight Factor animation. called by CInstanceGroup::removeFromScene().

Instance Mgt.
CTransformShapecreateInstance (const std::string &shapeName)
void createInstanceAsync (const std::string &shapeName, CTransformShape **pInstance, const NLMISC::CVector &position, uint selectedTexture)
void deleteInstance (CTransformShape *model)
const CShapeBankgetShapeBank (void) const
 Get the shape bank (const version).

CShapeBankgetShapeBank (void)
 Get the shape bank.

void setShapeBank (CShapeBank *pShapeBank)
 Set the shape bank.

Model mgt.
CTransformcreateModel (const NLMISC::CClassId &idModel)
void deleteModel (CTransform *model)
Construction / destruction.
 CScene (bool bSmallScene)
 Constructor.

IDrivergetDriver () const
 Get the driver of render Traversal.

void initDefaultRoots ()
 Create/setRoot the defaults models roots: a CTransform and a CLightGroup.

void initQuadGridClipManager ()
 init QuadGridClipManager

void release ()
void setDriver (IDriver *drv)
 Set the driver to render Traversal.

 ~CScene ()
 Destructor. release().

Render Filtering
void enableElementRender (UScene::TRenderFilter elt, bool state)
uint32 getFilterRenderFlags () const
Sun Light mgt
void enableLightingSystem (bool enable)
NLMISC::CRGBA getAmbientGlobal () const
 get the global Ambient used for the scene. Default to (50, 50, 50).

NLMISC::CRGBA getAnimatedLightFactor (sint animatedLightmap, uint lightGroup) const
 get an animated light factor.

sint getAnimatedLightNameToIndex (const std::string &name) const
 get an animated lightmap index by name. Return -1 if not found.

NLMISC::CRGBA getLightmapGroupColor (uint lightGroup) const
 get the color of a lightmap group.

float getLightTransitionThreshold () const
 getLightTransitionThreshold()

uint getMaxLightContribution () const
 setMaxLightContribution()

uint getNumLightGroup () const
 get the number of light group.

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

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

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

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

bool isLightingSystemEnabled () const
 see enableLightingSystem

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

void setLightGroupColor (uint lightmapGroup, NLMISC::CRGBA color)
 set the color of a light group.

void setLightTransitionThreshold (float lightTransitionThreshold)
void setMaxLightContribution (uint nlights)
void setSunAmbient (NLMISC::CRGBA ambient)
 set the Ambient of the Sun used for the scene.

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

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

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

ShadowMapping Options
void enableShadowPolySmooth (bool enable)
 Enable Polygon Smoothing.

bool getEnableShadowPolySmooth () const
 get Enable Polygon Smoothing flag

uint getShadowMapBlurSize () const
 get the size of the blur (<=3 means number of fakeBlur).

float getShadowMapDistFadeEnd () const
 Enable Polygon Smoothing.

float getShadowMapDistFadeStart () const
 Enable Polygon Smoothing.

uint getShadowMapMaxCasterAround () const
 Enable Polygon Smoothing.

uint getShadowMapMaxCasterInScreen () const
 Enable Polygon Smoothing.

float getShadowMapMaxDepth () const
 return the current ShadowMap Max Depth. This is the length in the lightDir direction where the shadow can touch receivers

uint getShadowMapTextureSize () const
 return the current base ShadowMap TextureSize. Default is 64 texels.

void setShadowMapBlurSize (uint bs)
 set the size of the blur (<=3 means number of fakeBlur).

void setShadowMapDistFadeEnd (float dist)
 ShadowMap Distance Fade end (50 default).

void setShadowMapDistFadeStart (float dist)
 ShadowMap Distance Fade Start (40 default).

void setShadowMapMaxCasterAround (uint num)
 ShadowMap max Caster Around (optimize memory).

void setShadowMapMaxCasterInScreen (uint num)
 ShadowMap max Caster In Screen (optimize CPU/GPU).

void setShadowMapMaxDepth (float depth)
 set the ShadowMap Extent

void setShadowMapTextureSize (uint size)
 must be a power of 2.

Camera/Viewport.
void findCameraClusterSystemFromRay (CCamera *cam, CInstanceGroup *startClusterSystem, const NLMISC::CVector &startPos, const NLMISC::CVector &endPos)
CCameragetCam ()
CViewport getViewport ()
void setCam (CCamera *cam)
 Set/Get the current camera/Viewport.

void setViewport (const class CViewport &viewport)
Trav accessor. Use it with caution. (used for mesh rendering)
CAnimDetailTravgetAnimDetailTrav ()
CClipTravgetClipTrav ()
CHrcTravgetHrcTrav ()
CLightTravgetLightTrav ()
CLoadBalancingTravgetLoadBalancingTrav ()
CRenderTravgetRenderTrav ()
CTransformgetRoot () const
 Get the Root For Hrc and Basics Clip of the scene.

CClustergetRootCluster () const
 Get the RootCluster For Clip of the scene.

Coarse meshes managers.
uint8 getCoarseMeshLightingUpdate () const
 see setCoarseMeshLightingUpdate()

CCoarseMeshManagergetCoarseMeshManager ()
 see setCoarseMeshLightingUpdate()

CLodCharacterManagergetLodCharacterManager () const
 Get the LodCharacterManager. NULL if user did not set it. (done in DriverUser).

void setCoarseMeshLightingUpdate (uint8 period)
void setLodCharacterManager (CLodCharacterManager *m)
 set the LodCharacterManager

Weather mgt
const CVectorgetGlobalWindDirection () const
 get the current windDirection

float getGlobalWindPower () const
 get the current windPower

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

void setGlobalWindPower (float gwp)
 Weather mgt.

transparent Layer mgt
bool getLayersRenderingOrder () const
void setLayersRenderingOrder (bool directOrder=true)
Render
void render (bool doHrcPass=true)

Static Public Member Functions

Basic registration.
void registerBasics ()
 Register Basic models.

void registerModel (const NLMISC::CClassId &idModel, const NLMISC::CClassId &idModelBase, CTransform *(*creator)())

Private Types

typedef TAnimatedIgSet::iterator ItAnimatedIgSet
typedef std::set< CInstanceGroup * > TAnimatedIgSet

Private Member Functions

void updateModels ()
 Update all models. All dirty models are cleaned.


Private Attributes

TAnimatedIgSet _AnimatedIgSet
std::list< CAnimatedLightmap_AnimatedLight
std::map< std::string, uint_AnimatedLightNameToIndex
std::vector< CAnimatedLightmap * > _AnimatedLightPtr
CAsyncTextureManager_AsyncTextureManager
NLMISC::CSmartPtr< CAnimationSet_AutomaticAnimationSet
uint8 _CoarseMeshLightingUpdate
 set setCoarseMeshLightingUpdate

TGlobalAnimationTime _CurrentTime
double _DeltaSystemTimeBetweenRender
TAnimationTime _EllapsedTime
uint32 _FilterRenderFlags
bool _FirstAnimateCall
uint _FlareContext
double _GlobalSystemTime
TGlobalAnimationTime _InitTime
std::vector< NLMISC::CRGBA_LightGroupColor
bool _LightingSystemEnabled
CPlayListManager _LMAnimsAuto
uint _MaxSkeletonsInNotCLodForm
std::set< CTransform * > _Models
bool _NextRenderProfile
uint64 _NumRender
TGlobalAnimationTime _RealTime
uint _ShadowMapBlurSize
float _ShadowMapDistFadeEnd
float _ShadowMapDistFadeStart
uint _ShadowMapMaxCasterAround
uint _ShadowMapMaxCasterInScreen
float _ShadowMapMaxDepth
uint _ShadowMapTextureSize
TSkeletonModelList _SkeletonModelList
CTransform_UpdateModelList
CViewport _Viewport
IWaterSurfaceAddedCallback_WaterCallback
CRefPtr< CCameraCurrentCamera
 The camera / Viewport.

CTransformRoot
CClusterRootCluster
CRootModelSonsOfAncestorSkeletonModelGroup
Coarse meshes managers.
CCoarseMeshManager_CoarseMeshManager
CLodCharacterManager_LodCharacterManager
Weather mgt
CVector _GlobalWindDirection
float _GlobalWindPower
Particle systems specific
CParticleSystemManager _ParticleSystemManager
Clip features
CQuadGridClipManager_QuadGridClipManager
The traversals
CAnimDetailTrav AnimDetailTrav
CClipTrav ClipTrav
CHrcTrav HrcTrav
CLightTrav LightTrav
CLoadBalancingTrav LoadBalancingTrav
CRenderTrav RenderTrav

Static Private Attributes

std::set< CModelEntry_RegModels

Friends

class CClipTrav
class CTransform


Member Typedef Documentation

typedef TAnimatedIgSet::iterator NL3D::CScene::ItAnimatedIgSet [private]
 

Definition at line 652 of file scene.h.

Referenced by animate(), and removeInstanceGroupForLightAnimation().

typedef TSkeletonModelList::iterator NL3D::CScene::ItSkeletonModelList
 

Definition at line 514 of file scene.h.

Referenced by appendSkeletonModelToList(), NL3D::CClipTrav::clipSkeletonShadowMaps(), eraseSkeletonModelToList(), getSkeletonModelListBegin(), getSkeletonModelListEnd(), NL3D::CClipTrav::loadBalanceSkeletonCLod(), and NL3D::CClipTrav::traverse().

typedef std::set<CInstanceGroup*> NL3D::CScene::TAnimatedIgSet [private]
 

Definition at line 651 of file scene.h.

typedef std::list<CSkeletonModel*> NL3D::CScene::TSkeletonModelList
 

Definition at line 513 of file scene.h.

typedef std::multimap<std::string,CTransformShape**> NL3D::CScene::TWaitingInstancesMMap [private]
 

Definition at line 659 of file scene.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MaxNumFlareContexts 

Definition at line 552 of file scene.h.

00552 { MaxNumFlareContexts = CFlareModel::MaxNumContext };

enum NL3D::CScene::TPolygonBalancingMode
 

The mode of polygon balancing. 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.

Enumeration values:
PolygonBalancingOff 
PolygonBalancingOn 
PolygonBalancingClamp 
CountPolygonBalancing 

Definition at line 317 of file scene.h.


Constructor & Destructor Documentation

NL3D::CScene::CScene bool  bSmallScene  ) 
 

Constructor.

Definition at line 134 of file scene.cpp.

References _CoarseMeshLightingUpdate, _CoarseMeshManager, _FilterRenderFlags, _FirstAnimateCall, _FlareContext, _GlobalWindDirection, _GlobalWindPower, _LightingSystemEnabled, _MaxSkeletonsInNotCLodForm, _NextRenderProfile, _NumRender, _RealTime, _ShadowMapBlurSize, _ShadowMapDistFadeEnd, _ShadowMapDistFadeStart, _ShadowMapMaxCasterAround, _ShadowMapMaxCasterInScreen, _ShadowMapMaxDepth, _ShadowMapTextureSize, _UpdateModelList, _WaterCallback, AnimDetailTrav, ClipTrav, HrcTrav, LightTrav, LoadBalancingTrav, NL3D_SCENE_COARSE_MANAGER_TEXTURE, NL3D_SCENE_DEFAULT_SHADOW_MAP_BLUR_SIZE, NL3D_SCENE_DEFAULT_SHADOW_MAP_DEPTH, NL3D_SCENE_DEFAULT_SHADOW_MAP_DIST_FADE_END, NL3D_SCENE_DEFAULT_SHADOW_MAP_DIST_FADE_START, NL3D_SCENE_DEFAULT_SHADOW_MAP_MAX_CASTER_AROUND, NL3D_SCENE_DEFAULT_SHADOW_MAP_MAX_CASTER_IN_SCREEN, NL3D_SCENE_DEFAULT_SHADOW_MAP_SIZE, Root, NL3D::CTraversal::Scene, NLMISC::CVector::set(), NL3D::CCoarseMeshManager::setTextureFile(), and SonsOfAncestorSkeletonModelGroup.

00134                                : LightTrav(bSmallScene)
00135 {
00136         HrcTrav.Scene= this;
00137         ClipTrav.Scene= this;
00138         LightTrav.Scene= this;
00139         AnimDetailTrav.Scene= this;
00140         LoadBalancingTrav.Scene= this;
00141         RenderTrav.Scene= this;
00142 
00143         _ShapeBank = NULL;
00144 
00145         Root= NULL;
00146         RootCluster= NULL;
00147         SonsOfAncestorSkeletonModelGroup= NULL;
00148         _QuadGridClipManager= NULL;
00149 
00150         _CurrentTime = 0 ;
00151         _EllapsedTime = 0 ;
00152         _RealTime = 0 ;
00153         _FirstAnimateCall = true ;
00154 
00155         _LightingSystemEnabled= false;
00156         _CoarseMeshLightingUpdate= 50;
00157 
00158         _GlobalWindDirection.set(1,0,0);
00159         // Default as Sithikt wants.
00160         _GlobalWindPower= 0.2f;
00161 
00162         // global manager (created in CDriverUser)
00163         _LodCharacterManager= NULL;
00164         _AsyncTextureManager= NULL;
00165 
00166         _NumRender = 0;
00167 
00168         _MaxSkeletonsInNotCLodForm= 20;
00169 
00170         _FilterRenderFlags= ~0;
00171 
00172         _NextRenderProfile= false;
00173 
00174         // Init default _CoarseMeshManager
00175         _CoarseMeshManager= new CCoarseMeshManager;
00176         _CoarseMeshManager->setTextureFile (NL3D_SCENE_COARSE_MANAGER_TEXTURE);
00177 
00178         // Update model list to NULL
00179         _UpdateModelList= NULL;
00180 
00181         _FlareContext = 0;
00182 
00183         _ShadowMapTextureSize= NL3D_SCENE_DEFAULT_SHADOW_MAP_SIZE;
00184         _ShadowMapMaxDepth= NL3D_SCENE_DEFAULT_SHADOW_MAP_DEPTH;
00185         _ShadowMapBlurSize= NL3D_SCENE_DEFAULT_SHADOW_MAP_BLUR_SIZE;
00186         _ShadowMapDistFadeStart= NL3D_SCENE_DEFAULT_SHADOW_MAP_DIST_FADE_START;
00187         _ShadowMapDistFadeEnd= NL3D_SCENE_DEFAULT_SHADOW_MAP_DIST_FADE_END;
00188         _ShadowMapMaxCasterInScreen= NL3D_SCENE_DEFAULT_SHADOW_MAP_MAX_CASTER_IN_SCREEN;
00189         _ShadowMapMaxCasterAround= NL3D_SCENE_DEFAULT_SHADOW_MAP_MAX_CASTER_AROUND;
00190 
00191         _WaterCallback = NULL;
00192 }

NL3D::CScene::~CScene  ) 
 

Destructor. release().

Definition at line 244 of file scene.cpp.

References release().

00245 {
00246         release();
00247 }


Member Function Documentation

void NL3D::CScene::addInstanceGroupForLightAnimation CInstanceGroup ig  ) 
 

Add an IG for auto PointLight Factor animation. called by CInstanceGroup::addToScene().

Definition at line 910 of file scene.cpp.

References _AnimatedIgSet, and nlassert.

Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded().

00911 {
00912         nlassert( ig );
00913         nlassert( _AnimatedIgSet.find(ig) == _AnimatedIgSet.end() );
00914         _AnimatedIgSet.insert(ig);
00915 }

void NL3D::CScene::animate TGlobalAnimationTime  atTime  ) 
 

Add an IG for auto PointLight Factor animation. called by CInstanceGroup::addToScene().

Definition at line 710 of file scene.cpp.

References _AnimatedIgSet, _AnimatedLightPtr, _FirstAnimateCall, _InitTime, _LMAnimsAuto, _RealTime, NL3D::CPlayListManager::animate(), count, ItAnimatedIgSet, NL3D::CInstanceGroup::setPointLightFactor(), NL3D::TGlobalAnimationTime, and uint.

Referenced by NL3D::CSceneUser::animate().

00711 {
00712         // todo hulud remove
00713         if (_FirstAnimateCall)
00714         {
00715                 _InitTime = atTime;
00716                 _RealTime = atTime;
00717                 // dummy value for first frame
00718                 _EllapsedTime = 0.01f ;
00719                 _FirstAnimateCall = false ;
00720         }
00721         else
00722         {
00723                 _EllapsedTime = (float) (atTime - _RealTime);
00724                 //nlassert(_EllapsedTime >= 0);
00725                 if (_EllapsedTime < 0.0f)       // NT WorkStation PATCH (Yes you are not dreaming
00726                         _EllapsedTime = 0.01f;  // deltaTime can be less than zero!!)
00727                 _EllapsedTime = fabsf(_EllapsedTime);
00728                 _RealTime = atTime ;
00729                 _CurrentTime += _EllapsedTime;
00730         }
00731         
00732         _LMAnimsAuto.animate( atTime );
00733 
00734         // Change PointLightFactors of all pointLights in registered Igs.
00735         //----------------
00736 
00737         // First list all current AnimatedLightmaps (for faster vector iteration per ig)
00738         const uint count = _AnimatedLightPtr.size ();
00739         uint i;
00740         for (i=0; i<count; i++)
00741         {
00742                 // Blend final colors
00743                 _AnimatedLightPtr[i]->updateGroupColors (*this);
00744         }
00745 
00746         // For all registered igs.
00747         ItAnimatedIgSet         itAnIgSet;
00748         for(itAnIgSet= _AnimatedIgSet.begin(); itAnIgSet!=_AnimatedIgSet.end(); itAnIgSet++)
00749         {
00750                 CInstanceGroup  *ig= *itAnIgSet;
00751 
00752                 // Set the light factor
00753                 ig->setPointLightFactor(*this);
00754         }
00755 }

CScene::ItSkeletonModelList NL3D::CScene::appendSkeletonModelToList CSkeletonModel skel  ) 
 

Private.

Definition at line 961 of file scene.cpp.

References _SkeletonModelList, and ItSkeletonModelList.

Referenced by NL3D::CSkeletonModel::initModel().

00962 {
00963         _SkeletonModelList.push_front(skel);
00964         return _SkeletonModelList.begin();
00965 }

CTransformShape * NL3D::CScene::createInstance const std::string &  shapeName  ) 
 

Create a model, instance of the shape "shapename". If not present, try to load "shapename" via the CPath. If fails, return NULL.

Definition at line 600 of file scene.cpp.

References _AutomaticAnimationSet, NL3D::CShapeBank::addRef(), NL3D::IShape::createInstance(), NL3D::CMeshBase::getAutoAnim(), NL3D::CLandscape::initAnimatedLightIndex(), NL3D::CMeshBaseInstance::initAnimatedLightIndex(), NL3D::CShapeBank::isPresent(), NL3D::CLandscapeModel::Landscape, NL3D::CShapeBank::load(), NL3D_MEM_INSTANCE, nlassert, NL3D::CMeshBaseInstance::registerToChannelMixer(), NL3D::CChannelMixer::setAnimationSet(), NL3D::CTransform::setChannelMixerOwnerShip(), NL3D::CTransformShape::setDistMax(), NL3D::CChannelMixer::setSlotAnimation(), NL3D::CTransformShape::Shape, NLMISC::strlwr(), and uint.

Referenced by NL3D::CInstanceGroup::addToScene(), NL3D::CSceneUser::createInstance(), NL3D::CSceneUser::createSkeleton(), NL3D::CPSMesh::newElement(), and NL3D::CPSMesh::updatePos().

00601 {
00602         NL3D_MEM_INSTANCE
00603 
00604         // We must attach a bank to the scene (a ShapeBank handle the shape caches and 
00605         // the creation/deletion of the instances)
00606         nlassert( _ShapeBank != NULL );
00607         
00608         // If the shape is not present in the bank
00609         if (_ShapeBank->isPresent( shapeName ) != CShapeBank::Present)
00610         {
00611                 // Load it from file
00612                 _ShapeBank->load( shapeName );
00613                 if (_ShapeBank->isPresent( shapeName ) != CShapeBank::Present)
00614                 {
00615                         return NULL;
00616                 }
00617         }
00618         // Then create a reference to the shape
00619         CTransformShape *pTShp = _ShapeBank->addRef( shapeName )->createInstance(*this);
00620         if (pTShp) pTShp->setDistMax(pTShp->Shape->getDistMax());
00621 #ifdef NL_DEBUG
00622         //pTShp->NameForDebug = shapeName; // \todo traptemp
00623 #endif
00624 
00625         // Look if this instance get lightmap information
00626 #if defined(__GNUC__) && __GNUC__ < 3
00627         CMeshBase *pMB = (CMeshBase*)((IShape*)(pTShp->Shape));
00628 #else // not GNUC
00629         CMeshBase *pMB = dynamic_cast<CMeshBase*>((IShape*)(pTShp->Shape));
00630 #endif // not GNUC
00631         CMeshBaseInstance *pMBI = dynamic_cast<CMeshBaseInstance*>( pTShp );
00632         if( ( pMB != NULL ) && ( pMBI != NULL ) )
00633         { 
00634                 // Init lightmap information
00635                 pMBI->initAnimatedLightIndex (*this);
00636 
00637                 // Auto animations
00638                 //==========================
00639 
00640                 if (_AutomaticAnimationSet)
00641                 {
00642                         if (pMB->getAutoAnim())
00643                         {
00644                                 
00645                                 std::string animName = CFile::getFilenameWithoutExtension(shapeName);                   
00646                                 animName = strlwr (animName);
00647                                 uint animID = _AutomaticAnimationSet->getAnimationIdByName(animName);
00648                                 if (animID != CAnimationSet::NotFound)
00649                                 {
00650                                         CChannelMixer *chanMix = new CChannelMixer;
00651                                         chanMix->setAnimationSet((CAnimationSet *) _AutomaticAnimationSet);
00652                                         chanMix->setSlotAnimation(0, animID);
00653                                         
00654                                         pMBI->registerToChannelMixer(chanMix, "");
00655                                         // Gives this object ownership of the channel mixer so we don't need to keep track of it
00656                                         pMBI->setChannelMixerOwnerShip(true);
00657                                 }
00658                         }       
00659                 }
00660         }
00661 
00662         CLandscapeModel *pLM = dynamic_cast<CLandscapeModel*>( pTShp );
00663         if( pLM != NULL ) 
00664         { 
00665                 // Init lightmap information
00666                 pLM->Landscape.initAnimatedLightIndex (*this);
00667         }
00668 
00669         return pTShp;
00670 }

void NL3D::CScene::createInstanceAsync const std::string &  shapeName,
CTransformShape **  pInstance,
const NLMISC::CVector position,
uint  selectedTexture
 

Create an instance, if the shape is not present, load the shape asynchronously. The instance is really created when we process it in the rendering.

Definition at line 674 of file scene.cpp.

References _WaitingInstances, getDriver(), NL3D::CShapeBank::isPresent(), NL3D::CShapeBank::loadAsync(), nlassert, NLMISC::strlwr(), and uint.

Referenced by NL3D::CSceneUser::createInstanceAsync().

00675 {
00676         // We must attach a bank to the scene (a ShapeBank handle the shape caches and 
00677         // the creation/deletion of the instances)
00678         nlassert( _ShapeBank != NULL );
00679         *pInstance = NULL;
00680         // Add the instance request
00681         _WaitingInstances.insert(TWaitingInstancesMMap::value_type(shapeName,pInstance));
00682         // If the shape is not present in the bank
00683         if (_ShapeBank->isPresent( shapeName ) != CShapeBank::Present)
00684         {
00685                 // Load it from file asynchronously
00686                 _ShapeBank->loadAsync( strlwr(shapeName), getDriver(), position, NULL, selectedTexture);
00687         }
00688 }

CTransform * NL3D::CScene::createModel const NLMISC::CClassId idModel  ) 
 

Create a model according to his type id. Model must has been previously registered via registerModel().

Then, This function attach this model to the Root (for HRC and for Clip)

Model are deleted with the deleteModel() or with release() which delete all models NB: Since CScene own the model, model MUST NOT be used with SmartPtrs (but CRefPtr always work...).

Parameters:
idModel the Unique Id of the Model
Returns:
a valid model of the required type. NULL, if not found.
See also:
deleteModel()

Definition at line 1004 of file scene.cpp.

References _Models, NL3D::CTransform::_OwnerScene, _RegModels, AnimDetailTrav, NL3D::CTransform::clipAddChild(), ClipTrav, NL3D::CTransform::hrcLinkSon(), NL3D::CTransform::initModel(), LightTrav, NL3D::CTransform::linkToUpdateList(), LoadBalancingTrav, NL3D::CScene::CModelEntry::ModelId, nlassert, nlstop, NL3D::CLightTrav::reserveLightedList(), NL3D::CRenderTrav::reserveRenderList(), NL3D::CLoadBalancingTrav::reserveVisibleList(), NL3D::CAnimDetailTrav::reserveVisibleList(), NL3D::CClipTrav::reserveVisibleList(), and Root.

Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CLandscapeUser::CLandscapeUser(), NL3D::CWaveMakerShape::createInstance(), NL3D::CWaterShape::createInstance(), NL3D::CSkeletonShape::createInstance(), NL3D::IShape::createInstance(), NL3D::CSegRemanenceShape::createInstance(), NL3D::CParticleSystemShape::createInstance(), NL3D::CMeshMultiLod::createInstance(), NL3D::CMeshMRMSkinned::createInstance(), NL3D::CMeshMRM::createInstance(), NL3D::CMesh::createInstance(), NL3D::CFlareShape::createInstance(), NL3D::CSceneUser::createPointLight(), NL3D::CInstanceGroup::createRoot(), NL3D::CSceneUser::createTransform(), initDefaultRoots(), initQuadGridClipManager(), and NL3D::CPSLight::step().

01005 {
01006         nlassert(idModel!=CClassId::Null);
01007 
01008         CModelEntry     e;
01009         e.ModelId= idModel;
01010         set<CModelEntry>::iterator      itModel;
01011         itModel= _RegModels.find(e);
01012 
01013         if(itModel==_RegModels.end())
01014         {
01015                 nlstop;                 // Warning, CScene::registerBasics () has not been called !
01016                 return NULL;
01017         }
01018         else
01019         {
01020                 CTransform      *m= (*itModel).Creator();
01021                 if(!m)  return NULL;
01022 
01023                 // Set the owner for the model.
01024                 m->_OwnerScene= this;
01025 
01026                 // link model to Root in HRC and in clip. NB: if exist!! (case for the Root and RootCluster :) )
01027                 if(Root)
01028                 {
01029                         Root->hrcLinkSon(m);
01030                         Root->clipAddChild(m);
01031                 }
01032 
01033                 // Insert the model into the set.
01034                 _Models.insert(m);
01035 
01036                 // By default the model is update() in CScene::updateModels().
01037                 m->linkToUpdateList();
01038 
01039                 // Once the model is correclty created, finish init him.
01040                 m->initModel();
01041 
01042                 // Ensure all the Traversals has enough space for visible list.
01043                 ClipTrav.reserveVisibleList(_Models.size());
01044                 AnimDetailTrav.reserveVisibleList(_Models.size());
01045                 LoadBalancingTrav.reserveVisibleList(_Models.size());
01046                 LightTrav.reserveLightedList(_Models.size());
01047                 RenderTrav.reserveRenderList(_Models.size());
01048 
01049                 return m;
01050         }
01051 }

void NL3D::CScene::deleteInstance CTransformShape model  ) 
 

Delete an instance via his pointer. An instance is an entity which reference a shape.

Definition at line 691 of file scene.cpp.

References deleteModel(), NL3D::CShapeBank::release(), and NL3D::CTransformShape::Shape.

Referenced by NL3D::CPSMesh::deleteElement(), NL3D::CPSMesh::releaseAllRef(), NL3D::CInstanceGroup::removeFromScene(), NL3D::CPSMesh::~CPSMesh(), and NL3D::CTransformUser::~CTransformUser().

00692 {
00693         IShape *pShp = NULL;
00694         if( pTrfmShp == NULL )
00695                 return;
00696 
00697         pShp = pTrfmShp->Shape;
00698         
00699         deleteModel( pTrfmShp );
00700 
00701         if (pShp)
00702         {
00703                 // Even if model already deleted by smarptr the release function works
00704                 _ShapeBank->release( pShp );
00705         }
00706         
00707 }

void NL3D::CScene::deleteModel CTransform model  ) 
 

Delete a model via his pointer. The model is automatically unlinked from all other model

Once a model is deleted, all pointer to him should have been deleted.

Definition at line 1053 of file scene.cpp.

References _Models.

Referenced by NL3D::CLodCharacterBuilder::addAnim(), NL3D::CPSLight::deleteElement(), deleteInstance(), release(), NL3D::CPSLight::releaseAllRef(), NL3D::CInstanceGroup::removeFromScene(), NL3D::CLandscapeUser::~CLandscapeUser(), NL3D::CPSLight::~CPSLight(), NL3D::CTransformUser::~CTransformUser(), and NL3D::CVegetableManager::~CVegetableManager().

01054 {
01055         if(model==NULL)
01056                 return;
01057         set<CTransform*>::iterator      it= _Models.find(model);
01058         if(it!=_Models.end())
01059         {
01060                 delete *it;
01061                 _Models.erase(it);
01062         }
01063 }

void NL3D::CScene::enableElementRender UScene::TRenderFilter  elt,
bool  state
 

Definition at line 816 of file scene.cpp.

References _FilterRenderFlags, and uint32.

Referenced by NL3D::CSceneUser::enableElementRender().

00817 {
00818         if(state)
00819                 _FilterRenderFlags|= (uint32)elt;
00820         else
00821                 _FilterRenderFlags&= ~(uint32)elt;
00822 }

void NL3D::CScene::enableLightingSystem bool  enable  ) 
 

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

Definition at line 833 of file scene.cpp.

References _LightingSystemEnabled, NL3D::CLightTrav::LightingSystemEnabled, NL3D::CRenderTrav::LightingSystemEnabled, and LightTrav.

Referenced by NL3D::CSceneUser::enableLightingSystem().

00834 {
00835         _LightingSystemEnabled= enable;
00836 
00837         // Set to RenderTrav and LightTrav
00838         RenderTrav.LightingSystemEnabled= _LightingSystemEnabled;
00839         LightTrav.LightingSystemEnabled= _LightingSystemEnabled;
00840 }

void NL3D::CScene::enableShadowPolySmooth bool  enable  ) 
 

Enable Polygon Smoothing.

Definition at line 1234 of file scene.cpp.

References NL3D::CShadowMapManager::enableShadowPolySmooth(), and NL3D::CRenderTrav::getShadowMapManager().

Referenced by NL3D::CSceneUser::enableShadowPolySmooth().

01235 {
01236         RenderTrav.getShadowMapManager().enableShadowPolySmooth(enable);
01237 }

void NL3D::CScene::eraseSkeletonModelToList ItSkeletonModelList  it  ) 
 

Definition at line 968 of file scene.cpp.

References _SkeletonModelList, and ItSkeletonModelList.

Referenced by NL3D::CSkeletonModel::~CSkeletonModel().

00969 {
00970         _SkeletonModelList.erase(it);
00971 }

void NL3D::CScene::findCameraClusterSystemFromRay CCamera cam,
CInstanceGroup startClusterSystem,
const NLMISC::CVector startPos,
const NLMISC::CVector endPos
 

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

Definition at line 1268 of file scene.cpp.

References NL3D::CClipTrav::Accel, NL3D::CQuadGrid< CCluster * >::begin(), NL3D::CQuadGrid< CCluster * >::end(), getClipTrav(), NL3D::CTransform::getClusterSystem(), NL3D::CInstanceGroup::getParentClusterSystem(), NL3D::CCluster::Group, NL3D::CCluster::isIn(), level, NL3D::CQuadGrid< CCluster * >::select(), NL3D::CTransform::setClusterSystem(), and uint.

Referenced by NL3D::CSceneUser::findCameraClusterSystemFromRay().

01270 {
01271         CClipTrav       &clipTrav= getClipTrav();
01272 
01273         // **** Search all cluster where the startPos is in
01274         static vector<CCluster*> vCluster;
01275         vCluster.clear();
01276 
01277         bool bInWorld = true;
01278         clipTrav.Accel.select (startPos, startPos);
01279         CQuadGrid<CCluster*>::CIterator itAcc = clipTrav.Accel.begin();
01280         while (itAcc != clipTrav.Accel.end())
01281         {
01282                 CCluster *pCluster = *itAcc;
01283                 if( pCluster->Group == startClusterSystem && 
01284                         pCluster->isIn (startPos) )
01285                 {
01286                         vCluster.push_back (pCluster);
01287                         bInWorld = false;
01288                 }
01289                 ++itAcc;
01290         }
01291         if (bInWorld)
01292         {
01293                 vCluster.push_back (RootCluster);
01294         }
01295 
01296         // **** Do a traverse starting from each start cluser, clipping the ray instead of the camera pyramid
01297         uint    i;
01298         static vector<CCluster*> vClusterVisited;
01299         vClusterVisited.clear();
01300         for(i=0;i<vCluster.size();i++)
01301         {
01302                 vCluster[i]->cameraRayClip(startPos, endPos, vClusterVisited);
01303         }
01304 
01305         // **** From each cluster, select possible clusterSystem
01306         static vector<CInstanceGroup*> possibleClusterSystem;
01307         possibleClusterSystem.clear();
01308         for(i=0;i<vClusterVisited.size();i++)
01309         {
01310                 // select only cluster where the EndPos lies in. Important else in landscape, we'll always say
01311                 // that we are in a Son Cluster.
01312                 if(vClusterVisited[i]->isIn(endPos))
01313                 {
01314                         CInstanceGroup  *cs= vClusterVisited[i]->Group;
01315                         // insert if not exist (NB: 1,2 possible clusterSystem so O(N2) is OK)
01316                         uint    j;
01317                         for(j=0;j<possibleClusterSystem.size();j++)
01318                         {
01319                                 if(possibleClusterSystem[j]==cs)
01320                                         break;
01321                         }
01322                         if(j==possibleClusterSystem.size())
01323                                 possibleClusterSystem.push_back(cs);
01324                 }
01325         }
01326 
01327         // **** From each possible clusterSystem, select the one that is the lower in hierarchy
01328         // common case
01329         if(possibleClusterSystem.empty())
01330                 cam->setClusterSystem(NULL);
01331         else if(possibleClusterSystem.size()==1)
01332         {
01333                 // if it is the rootCluster set NULL (should have the same behavior but do like standard case)
01334                 if(possibleClusterSystem[0]==RootCluster->getClusterSystem())
01335                         cam->setClusterSystem(NULL);
01336                 // set this cluster system
01337                 else
01338                         cam->setClusterSystem(possibleClusterSystem[0]);
01339         }
01340         // conflict case
01341         else
01342         {
01343                 // compute the hierarchy level of each cluster system, take the highest
01344                 CInstanceGroup  *highest= NULL;
01345                 uint                    highestLevel= 0;
01346                 for(i=0;i<possibleClusterSystem.size();i++)
01347                 {
01348                         uint    level= 0;
01349                         CInstanceGroup  *ig= possibleClusterSystem[i];
01350                         while(ig)
01351                         {
01352                                 ig= ig->getParentClusterSystem();
01353                                 level++;
01354                         }
01355                         if(level>=highestLevel)
01356                         {
01357                                 highestLevel= level;
01358                                 highest= possibleClusterSystem[i];
01359                         }
01360                 }
01361 
01362                 // set the highest cluster system
01363                 cam->setClusterSystem(highest);
01364         }
01365 }

NLMISC::CRGBA NL3D::CScene::getAmbientGlobal  )  const
 

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

Definition at line 867 of file scene.cpp.

References NL3D::CRenderTrav::AmbientGlobal.

Referenced by NL3D::CSceneUser::getAmbientGlobal().

00868 {
00869         return RenderTrav.AmbientGlobal;
00870 }

NLMISC::CRGBA NL3D::CScene::getAnimatedLightFactor sint  animatedLightmap,
uint  lightGroup
const [inline]
 

get an animated light factor.

Definition at line 418 of file scene.h.

References _AnimatedLightPtr, getLightmapGroupColor(), sint, and uint.

Referenced by NL3D::CPointLightNamedArray::setPointLightFactor(), and NL3D::CMeshBaseInstance::traverseAnimDetail().

00419         {
00420                 if (((uint)animatedLightmap)<_AnimatedLightPtr.size ())
00421                 {
00422                         return _AnimatedLightPtr[animatedLightmap]->getFactor (lightGroup);
00423                 }
00424                 else
00425                 {
00426                         return getLightmapGroupColor (lightGroup);
00427                 }
00428         }

sint NL3D::CScene::getAnimatedLightNameToIndex const std::string &  name  )  const
 

get an animated lightmap index by name. Return -1 if not found.

Definition at line 1101 of file scene.cpp.

References _AnimatedLightNameToIndex, and sint.

Referenced by NL3D::CPointLightNamedArray::initAnimatedLightIndex(), and NL3D::CMeshBaseInstance::initAnimatedLightIndex().

01102 {
01103         std::map<std::string, uint>::const_iterator ite = _AnimatedLightNameToIndex.find (name);
01104         if (ite != _AnimatedLightNameToIndex.end ())
01105                 return (sint)ite->second;
01106         else
01107                 return -1;
01108 }

CAnimDetailTrav& NL3D::CScene::getAnimDetailTrav  )  [inline]
 

Definition at line 477 of file scene.h.

References AnimDetailTrav.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CParticleSystemModel::insertInVisibleList(), NL3D::CClipTrav::traverse(), and NL3D::CTransform::traverseClip().

00477 {return AnimDetailTrav;}

CAsyncTextureManager* NL3D::CScene::getAsyncTextureManager  )  const [inline]
 

Get the async texture manager. NULL if was not setuped.

Definition at line 501 of file scene.h.

Referenced by NL3D::CSkeletonModel::computeLodTexture(), NL3D::CMeshBaseInstance::releaseCurrentAsyncTextures(), and NL3D::CMeshBaseInstance::startAsyncTextureLoading().

00501 {return _AsyncTextureManager;}

CAnimationSet* NL3D::CScene::getAutomaticAnimationSet  )  const [inline]
 

Get a reference to the set of automatic animations.

Definition at line 497 of file scene.h.

References _AutomaticAnimationSet.

00497 { return _AutomaticAnimationSet; }      

CCamera* NL3D::CScene::getCam  )  [inline]
 

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

Definition at line 180 of file scene.h.

References CurrentCamera.

Referenced by NL3D::CCloudScapeUser::anim(), and NL3D::CCloudScapeUser::init().

00180 {return CurrentCamera;}

CClipTrav& NL3D::CScene::getClipTrav  )  [inline]
 

Definition at line 475 of file scene.h.

References ClipTrav.

Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CWaterModel::clip(), NL3D::CTransformShape::clip(), NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CWaterModel::computeClippedPoly(), NL3D::CSkeletonModel::computeDisplayLodCharacterPriority(), NL3D::CWaterModel::computeSimpleClippedPoly(), NL3D::CParticleSystemModel::doAnimate(), findCameraClusterSystemFromRay(), NLSOUND::CClusteredSound::getRootCluster(), NLSOUND::CClusteredSound::init(), NL3D::CParticleSystemModel::insertInVisibleList(), NL3D::CQuadGridClipManager::linkModel(), NL3D::CQuadGridClipManager::profile(), NL3D::CSceneUser::profileQuadGridClipManager(), NL3D::CCluster::recursTraverseClip(), NL3D::CInstanceGroup::removeFromScene(), NL3D::CSkeletonModel::traverseAnimDetail(), NL3D::CParticleSystemModel::traverseAnimDetail(), NL3D::CTransform::traverseClip(), NL3D::CQuadGridClipManager::traverseClip(), NL3D::CParticleSystemModel::traverseClip(), NL3D::CLandscapeModel::traverseClip(), NLSOUND::CClusteredSound::update(), NL3D::CTransform::updateClipTravForAncestorSkeleton(), NL3D::CQuadGridClipManager::updateClustersFromCamera(), and NL3D::CTransform::~CTransform().

00475 {return ClipTrav;}

uint8 NL3D::CScene::getCoarseMeshLightingUpdate  )  const [inline]
 

see setCoarseMeshLightingUpdate()

Definition at line 346 of file scene.h.

References _CoarseMeshLightingUpdate, and uint8.

Referenced by NL3D::CSceneUser::getCoarseMeshLightingUpdate(), and NL3D::CMeshMultiLod::renderCoarseMesh().

00346 {return _CoarseMeshLightingUpdate;}

CCoarseMeshManager* NL3D::CScene::getCoarseMeshManager  )  [inline]
 

see setCoarseMeshLightingUpdate()

Definition at line 335 of file scene.h.

References _CoarseMeshManager.

Referenced by NL3D::CMeshMultiLod::instanciateCoarseMeshSpace(), NL3D::CMeshMultiLod::render(), NL3D::CSceneUser::setCoarseMeshManagerTexture(), and NL3D::CRenderTrav::traverse().

00336         {
00337                 return _CoarseMeshManager;
00338         }

double NL3D::CScene::getCurrentSystemTime  )  const [inline]
 

System time is a time that always run (independent from the animation time that run only on animate()) It is updated at beginning of render()

Definition at line 279 of file scene.h.

References _GlobalSystemTime.

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().

00279 {return _GlobalSystemTime;}

TGlobalAnimationTime NL3D::CScene::getCurrentTime void   )  const [inline]
 

get the current time of the scene, in second. It start from 0 (at the firt call of animate)

Definition at line 271 of file scene.h.

References NL3D::TGlobalAnimationTime.

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CMeshVPWindTree::setupPerMesh(), NL3D::CSegRemanence::traverseAnimDetail(), and NL3D::CMeshBaseInstance::traverseHrc().

00271 { return _CurrentTime ; }

IDriver * NL3D::CScene::getDriver  )  const
 

Get the driver of render Traversal.

Definition at line 579 of file scene.cpp.

Referenced by NL3D::CCloudScapeUser::CCloudScapeUser(), NL3D::CWaterModel::clip(), createInstanceAsync(), NL3D::CLandscapeUser::flushTiles(), and NL3D::CParticleSystemShape::instanciatePS().

00580 {
00581         return (const_cast<CScene*>(this))->RenderTrav.getDriver();
00582 }

double NL3D::CScene::getEllapsedSystemTime  )  const [inline]
 

get the ellapsed time (in second) between the last 2 calls of render().

Definition at line 282 of file scene.h.

References _DeltaSystemTimeBetweenRender.

TAnimationTime NL3D::CScene::getEllapsedTime void   )  const [inline]
 

get the ellapsed time (in second) between the last 2 calls of animate.

Definition at line 274 of file scene.h.

References NL3D::TAnimationTime.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CParticleSystemModel::doAnimate(), NL3D::CTargetAnimCtrl::execute(), NL3D::CSegRemanence::render(), and NL3D::CFlareModel::traverseRender().

00274 { return _EllapsedTime ; }

bool NL3D::CScene::getEnableShadowPolySmooth  )  const
 

get Enable Polygon Smoothing flag

Definition at line 1240 of file scene.cpp.

References NL3D::CShadowMapManager::getEnableShadowPolySmooth(), and NL3D::CRenderTrav::getShadowMapManager().

Referenced by NL3D::CSceneUser::getEnableShadowPolySmooth().

01241 {
01242         return RenderTrav.getShadowMapManager().getEnableShadowPolySmooth();
01243 }

uint32 NL3D::CScene::getFilterRenderFlags  )  const [inline]
 

Definition at line 508 of file scene.h.

References _FilterRenderFlags, and uint32.

Referenced by NL3D::CMeshMultiLod::renderCoarseMesh(), NL3D::CShadowMapManager::selectShadowMapsToGenerate(), NL3D::CTransform::traverseClip(), and NL3D::CParticleSystemModel::traverseClip().

00508 {return _FilterRenderFlags;}

uint NL3D::CScene::getFlareContext  )  const [inline]
 

Definition at line 556 of file scene.h.

References _FlareContext, and uint.

Referenced by NL3D::CSceneUser::getFlareContext(), and NL3D::CFlareModel::traverseRender().

00556 { return _FlareContext; }               

CInstanceGroup* NL3D::CScene::getGlobalInstanceGroup  )  [inline]
 

Definition at line 252 of file scene.h.

References _GlobalInstanceGroup.

Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), and NL3D::CSceneUser::setToGlobalInstanceGroup().

00252 { return _GlobalInstanceGroup;  }

const CVector& NL3D::CScene::getGlobalWindDirection  )  const [inline]
 

get the current windDirection

Definition at line 467 of file scene.h.

References _GlobalWindDirection.

Referenced by NL3D::CSceneUser::getGlobalWindDirection(), and NL3D::CMeshVPWindTree::setupPerMesh().

00467 {return _GlobalWindDirection;}

float NL3D::CScene::getGlobalWindPower  )  const [inline]
 

get the current windPower

Definition at line 462 of file scene.h.

References _GlobalWindPower.

Referenced by NL3D::CSceneUser::getGlobalWindPower(), and NL3D::CMeshVPWindTree::setupPerMesh().

00462 {return _GlobalWindPower;}

uint NL3D::CScene::getGroupLoadMaxPolygon const std::string &  group  ) 
 

Get the number of faces wanted for a LoadBlancingGroup. The Group is created if did not exist.

Definition at line 772 of file scene.cpp.

References NL3D::CLoadBalancingTrav::getGroupNbFaceWanted(), LoadBalancingTrav, and uint.

Referenced by NL3D::CSceneUser::getGroupLoadMaxPolygon().

00773 {
00774         return LoadBalancingTrav.getGroupNbFaceWanted(group);
00775 }

float NL3D::CScene::getGroupNbFaceAsked const std::string &  group  )  const
 

Get the last face count asked from the instances before reduction. only for the given group return 0 if the Group does not exist.

Definition at line 777 of file scene.cpp.

References NL3D::CLoadBalancingTrav::getGroupNbFaceAsked(), and LoadBalancingTrav.

Referenced by NL3D::CSceneUser::getGroupNbFaceAsked().

00778 {
00779         return LoadBalancingTrav.getGroupNbFaceAsked(group);
00780 }

CHrcTrav& NL3D::CScene::getHrcTrav  )  [inline]
 

Definition at line 474 of file scene.h.

References HrcTrav.

Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CMeshMultiLod::renderCoarseMesh(), NL3D::CClipTrav::traverse(), NL3D::CWaterModel::traverseRender(), NL3D::CTransform::update(), and NL3D::CTransform::updateWorld().

00474 {return HrcTrav;}

bool NL3D::CScene::getLayersRenderingOrder  )  const
 

Definition at line 804 of file scene.cpp.

References NL3D::CRenderTrav::getLayersRenderingOrder().

Referenced by NL3D::CSceneUser::getLayersRenderingOrder().

00805 {
00806         return  RenderTrav.getLayersRenderingOrder();
00807 }

NLMISC::CRGBA NL3D::CScene::getLightmapGroupColor uint  lightGroup  )  const [inline]
 

get the color of a lightmap group.

Definition at line 410 of file scene.h.

References _LightGroupColor, and uint.

Referenced by getAnimatedLightFactor(), NL3D::CPointLightNamedArray::setPointLightFactor(), and NL3D::CMeshBaseInstance::traverseAnimDetail().

00411         {
00412                 if (lightGroup<_LightGroupColor.size())
00413                         return _LightGroupColor[lightGroup];
00414                 else
00415                         return CRGBA::White;
00416         }

float NL3D::CScene::getLightTransitionThreshold  )  const
 

getLightTransitionThreshold()

Definition at line 903 of file scene.cpp.

References NL3D::CLightingManager::getLightTransitionThreshold(), NL3D::CLightTrav::LightingManager, and LightTrav.

Referenced by NL3D::CSceneUser::getLightTransitionThreshold().

00904 {
00905         return LightTrav.LightingManager.getLightTransitionThreshold();
00906 }

CLightTrav& NL3D::CScene::getLightTrav  )  [inline]
 

Definition at line 476 of file scene.h.

References LightTrav.

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CPointLightModel::initModel(), NL3D::CClipTrav::traverse(), NL3D::CTransform::traverseClip(), NL3D::CTransform::traverseLight(), NL3D::CPointLightModel::traverseLight(), NL3D::CTransform::unfreezeHRC(), NL3D::CTransform::update(), and NL3D::CTransform::~CTransform().

00476 {return LightTrav;}

CLoadBalancingTrav& NL3D::CScene::getLoadBalancingTrav  )  [inline]
 

Definition at line 478 of file scene.h.

References LoadBalancingTrav.

Referenced by NL3D::CTransform::initModel(), NL3D::CParticleSystemModel::insertInVisibleList(), NL3D::CTransform::setLoadBalancingGroup(), NL3D::CClipTrav::traverse(), NL3D::CTransform::traverseClip(), NL3D::CTransformShape::traverseLoadBalancing(), NL3D::CMeshMultiLodInstance::traverseLoadBalancing(), and NL3D::CTransformShape::traverseLoadBalancingPass0().

00478 {return LoadBalancingTrav;}

CLodCharacterManager* NL3D::CScene::getLodCharacterManager  )  const [inline]
 

Get the LodCharacterManager. NULL if user did not set it. (done in DriverUser).

Definition at line 349 of file scene.h.

Referenced by NL3D::CSkeletonModel::computeLodTexture(), NL3D::CSceneUser::deleteCLodShapeBank(), NL3D::CSceneUser::getCLodAnimIdByName(), NL3D::CSceneUser::getCLodShapeIdByName(), NL3D::CSceneUser::loadCLodShapeBank(), NL3D::CSkeletonModel::renderCLod(), NL3D::CSceneUser::resetCLodManager(), NL3D::CSkeletonModel::setLodCharacterShape(), and NL3D::CRenderTrav::traverse().

00349 {return _LodCharacterManager;}

uint NL3D::CScene::getMaxLightContribution  )  const
 

setMaxLightContribution()

Definition at line 894 of file scene.cpp.

References NL3D::CLightingManager::getMaxLightContribution(), NL3D::CLightTrav::LightingManager, LightTrav, and uint.

Referenced by NL3D::CSceneUser::getMaxLightContribution().

00895 {
00896         return LightTrav.LightingManager.getMaxLightContribution();
00897 }

uint NL3D::CScene::getMaxSkeletonsInNotCLodForm  )  const [inline]
 

The mode of polygon balancing. 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 329 of file scene.h.

References _MaxSkeletonsInNotCLodForm, and uint.

Referenced by NL3D::CSceneUser::getMaxSkeletonsInNotCLodForm(), and NL3D::CClipTrav::loadBalanceSkeletonCLod().

float NL3D::CScene::getNbFaceAsked  )  const
 

Get the last face count asked from the instances before reduction. It gets the sum of All groups.

Definition at line 759 of file scene.cpp.

References NL3D::CLoadBalancingTrav::getNbFaceAsked(), and LoadBalancingTrav.

Referenced by NL3D::CSceneUser::getNbFaceAsked().

00760 {
00761         return LoadBalancingTrav.getNbFaceAsked ();
00762 }

uint NL3D::CScene::getNumLightGroup  )  const [inline]
 

get the number of light group.

Definition at line 405 of file scene.h.

References _LightGroupColor, and uint.

00406         {
00407                 return _LightGroupColor.size ();
00408         }

uint64 NL3D::CScene::getNumRender  )  const [inline]
 

get the number of time render has been called

Definition at line 285 of file scene.h.

References _NumRender, and uint64.

Referenced by NL3D::CShadowMapManager::renderGenerate(), NL3D::CShadowMapManager::selectShadowMapsToGenerate(), and NL3D::CSegRemanence::traverseAnimDetail().

00285 { return _NumRender; }

CParticleSystemManager & NL3D::CScene::getParticleSystemManager  ) 
 

Get a ref. to the particle system manager. You shouldn't call this (has methods for private processing).

Definition at line 810 of file scene.cpp.

References _ParticleSystemManager.

Referenced by NL3D::CParticleSystemModel::reallocRsc(), NL3D::CParticleSystemModel::releasePSPointer(), and NL3D::CParticleSystemModel::traverseClip().

00811 {
00812         return _ParticleSystemManager;
00813 }

CScene::TPolygonBalancingMode NL3D::CScene::getPolygonBalancingMode  )  const
 

Get the PolygonBalancingMode.

Definition at line 792 of file scene.cpp.

References LoadBalancingTrav, NL3D::CLoadBalancingTrav::PolygonBalancingMode, and uint.

Referenced by NL3D::CSceneUser::getPolygonBalancingMode().

00793 {
00794         return (CScene::TPolygonBalancingMode)(uint)LoadBalancingTrav.PolygonBalancingMode;
00795 }

CRenderTrav& NL3D::CScene::getRenderTrav  )  [inline]
 

Definition at line 479 of file scene.h.

Referenced by NL3D::CMeshVPWindTree::begin(), NL3D::CMeshVPPerPixelLight::begin(), NL3D::CMeshVPWindTree::beginMBRInstance(), NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CWaterModel::doSimpleRender(), NL3D::CSkeletonModel::generateShadowMap(), NL3D::CMeshInstance::generateShadowMap(), NL3D::CTransformShape::profileRender(), NL3D::CLandscapeModel::receiveShadowMap(), NL3D::CMeshMRMSkinnedGeom::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CSkeletonModel::renderCLod(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CSkeletonModel::renderIntoSkeletonShadowMap(), NL3D::CMeshInstance::renderIntoSkeletonShadowMap(), NL3D::CShadowMapManager::renderProject(), NL3D::CSkeletonModel::renderShadowSkins(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupGeom(), NL3D::CMeshMRMGeom::renderSkinGroupGeom(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMGeom::renderSkinGroupPrimitives(), NL3D::CMeshMRMSkinnedGeom::renderSkinGroupSpecularRdrPass(), NL3D::CMeshMRMGeom::renderSkinGroupSpecularRdrPass(), NL3D::CSkeletonModel::renderSkinList(), NL3D::CSkeletonModel::renderSkins(), NL3D::CShadowMapManager::selectShadowMapsToGenerate(), NL3D::SetupForMaterial(), NL3D::CMeshVPPerPixelLight::setupForMaterial(), NL3D::CMeshVPWindTree::setupLighting(), NL3D::CClipTrav::traverse(), NL3D::CParticleSystemModel::traverseAnimDetail(), NL3D::CTransform::traverseClip(), NL3D::CWaterModel::traverseRender(), NL3D::CVegetableBlendLayerModel::traverseRender(), NL3D::CTransformShape::traverseRender(), NL3D::CMeshInstance::traverseRender(), NL3D::CLandscapeModel::traverseRender(), and NL3D::CFlareModel::traverseRender().

00479 {return RenderTrav;}

CTransform* NL3D::CScene::getRoot  )  const [inline]
 

Get the Root For Hrc and Basics Clip of the scene.

Definition at line 482 of file scene.h.

References Root.

Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CSkeletonModel::detachSkeletonSon(), NL3D::CLandscapeModel::initModel(), NL3D::CTransform::setForceClipRoot(), NL3D::CHrcTrav::traverse(), NL3D::CClipTrav::traverse(), NL3D::CTransform::unfreezeHRC(), and NL3D::CTransform::updateClipTravForAncestorSkeleton().

00482 {return Root;}

CCluster* NL3D::CScene::getRootCluster  )  const [inline]
 

Get the RootCluster For Clip of the scene.

Definition at line 484 of file scene.h.

Referenced by NL3D::CLandscapeModel::initModel().

00484 {return RootCluster;}

uint NL3D::CScene::getShadowMapBlurSize  )  const [inline]
 

get the size of the blur (<=3 means number of fakeBlur).

Definition at line 571 of file scene.h.

References _ShadowMapBlurSize, and uint.

Referenced by NL3D::CSceneUser::getShadowMapBlurSize(), and NL3D::CShadowMapManager::renderGenerate().

00571 {return _ShadowMapBlurSize;}

float NL3D::CScene::getShadowMapDistFadeEnd  )  const [inline]
 

Enable Polygon Smoothing.

Definition at line 584 of file scene.h.

References _ShadowMapDistFadeEnd.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), and NL3D::CSceneUser::getShadowMapDistFadeEnd().

00584 {return _ShadowMapDistFadeEnd;}

float NL3D::CScene::getShadowMapDistFadeStart  )  const [inline]
 

Enable Polygon Smoothing.

Definition at line 581 of file scene.h.

References _ShadowMapDistFadeStart.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), and NL3D::CSceneUser::getShadowMapDistFadeStart().

00581 {return _ShadowMapDistFadeStart;}

uint NL3D::CScene::getShadowMapMaxCasterAround  )  const [inline]
 

Enable Polygon Smoothing.

Definition at line 590 of file scene.h.

References _ShadowMapMaxCasterAround, and uint.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), and NL3D::CSceneUser::getShadowMapMaxCasterAround().

00590 {return _ShadowMapMaxCasterAround;}

uint NL3D::CScene::getShadowMapMaxCasterInScreen  )  const [inline]
 

Enable Polygon Smoothing.

Definition at line 587 of file scene.h.

References _ShadowMapMaxCasterInScreen, and uint.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), and NL3D::CSceneUser::getShadowMapMaxCasterInScreen().

float NL3D::CScene::getShadowMapMaxDepth  )  const [inline]
 

return the current ShadowMap Max Depth. This is the length in the lightDir direction where the shadow can touch receivers

Definition at line 567 of file scene.h.

References _ShadowMapMaxDepth.

Referenced by NL3D::CShadowMap::buildProjectionInfos(), NL3D::CClipTrav::clipSkeletonShadowMaps(), and NL3D::CSceneUser::getShadowMapMaxDepth().

00567 {return _ShadowMapMaxDepth;}

uint NL3D::CScene::getShadowMapTextureSize  )  const [inline]
 

return the current base ShadowMap TextureSize. Default is 64 texels.

Definition at line 563 of file scene.h.

References _ShadowMapTextureSize, and uint.

Referenced by NL3D::CShadowMapManager::garbageShadowTextures(), NL3D::CSceneUser::getShadowMapTextureSize(), NL3D::CShadowMapManager::renderGenerate(), NL3D::CSkeletonModel::updateShadowMap(), and NL3D::CMeshInstance::updateShadowMap().

00563 {return _ShadowMapTextureSize;}

const CShapeBank* NL3D::CScene::getShapeBank void   )  const [inline]
 

Get the shape bank (const version).

Definition at line 234 of file scene.h.

00234 { return _ShapeBank ; }

CShapeBank* NL3D::CScene::getShapeBank void   )  [inline]
 

Get the shape bank.

Definition at line 231 of file scene.h.

Referenced by NL3D::CPSMesh::newElement(), NL3D::CInstanceGroup::stopAddToSceneAsync(), and NL3D::CPSConstraintMesh::update().

00231 { return _ShapeBank ; }

ItSkeletonModelList NL3D::CScene::getSkeletonModelListBegin  )  [inline]
 

Definition at line 518 of file scene.h.

References _SkeletonModelList, and ItSkeletonModelList.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CClipTrav::loadBalanceSkeletonCLod(), and NL3D::CClipTrav::traverse().

00518 {return _SkeletonModelList.begin();}

ItSkeletonModelList NL3D::CScene::getSkeletonModelListEnd  )  [inline]
 

Definition at line 519 of file scene.h.

References _SkeletonModelList, and ItSkeletonModelList.

Referenced by NL3D::CClipTrav::clipSkeletonShadowMaps(), NL3D::CClipTrav::loadBalanceSkeletonCLod(), and NL3D::CClipTrav::traverse().

00519 {return _SkeletonModelList.end();}

NLMISC::CRGBA NL3D::CScene::getSunAmbient  )  const
 

get the Ambient of the Sun used for the scene.

Definition at line 871 of file scene.cpp.

References NL3D::CRenderTrav::SunAmbient.

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CShadowMapManager::computeShadowColors(), NL3D::CMeshMultiLodInstance::getCoarseMeshLighting(), NL3D::CSceneUser::getSunAmbient(), NL3D::CSkeletonModel::renderCLod(), and NL3D::CParticleSystemModel::traverseRender().

00872 {
00873         return RenderTrav.SunAmbient;
00874 }

NLMISC::CRGBA NL3D::CScene::getSunDiffuse  )  const
 

get the Diffuse of the Sun used for the scene.

Definition at line 875 of file scene.cpp.

References NL3D::CRenderTrav::SunDiffuse.

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CShadowMapManager::computeShadowColors(), NL3D::CShadowMapManager::computeShadowDirection(), NL3D::CMeshMultiLodInstance::getCoarseMeshLighting(), NL3D::CSceneUser::getSunDiffuse(), NL3D::CSkeletonModel::renderCLod(), and NL3D::CParticleSystemModel::traverseRender().

00876 {
00877         return RenderTrav.SunDiffuse;
00878 }

NLMISC::CVector NL3D::CScene::getSunDirection  )  const
 

get the Direction of the Sun used for the scene.

Definition at line 883 of file scene.cpp.

References NL3D::CRenderTrav::getSunDirection().

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CShadowMapManager::computeShadowDirection(), NL3D::CSceneUser::getSunDirection(), and NL3D::CSkeletonModel::renderCLod().

00884 {
00885         return RenderTrav.getSunDirection();
00886 }

NLMISC::CRGBA NL3D::CScene::getSunSpecular  )  const
 

get the Specular of the Sun used for the scene.

Definition at line 879 of file scene.cpp.

References NL3D::CRenderTrav::SunSpecular.

Referenced by NL3D::CSceneUser::getSunSpecular().

00880 {
00881         return RenderTrav.SunSpecular;
00882 }

CViewport NL3D::CScene::getViewport  )  [inline]
 

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

Definition at line 185 of file scene.h.

Referenced by NL3D::CSceneUser::getViewport().

00186         {
00187                 return _Viewport;
00188         }

IWaterSurfaceAddedCallback* NL3D::CScene::getWaterCallback  )  const [inline]
 

Definition at line 594 of file scene.h.

References _WaterCallback.

Referenced by NL3D::CWaterShape::createInstance(), and NL3D::CSceneUser::getWaterCallback().

00594 { return _WaterCallback; }

void NL3D::CScene::incrementProfileTriVBFormat std::map< uint32, uint32 > &  formatToTri,
uint32  vbFormat,
uint32  numTris
[inline]
 

Definition at line 533 of file scene.h.

References uint32.

Referenced by NL3D::CMeshMRMSkinnedGeom::profileSceneRender(), NL3D::CMeshMRMGeom::profileSceneRender(), and NL3D::CMeshGeom::profileSceneRender().

00534         {
00535                 std::map<uint32, uint32>::iterator      it= formatToTri.find(vbFormat);
00536                 if(it==formatToTri.end())
00537                 {
00538                         it= formatToTri.insert(std::make_pair(vbFormat,0)).first;
00539                 }
00540                 it->second+= numTris;
00541         }

void NL3D::CScene::initDefaultRoots  ) 
 

Create/setRoot the defaults models roots: a CTransform and a CLightGroup.

Definition at line 249 of file scene.cpp.

References _GlobalInstanceGroup, NL3D::CInstanceGroup::addCluster(), NL3D::CTransform::clipDelChild(), ClipTrav, NL3D::ClusterId, createModel(), NL3D::CTransform::freeze(), NL3D::CCluster::Group, NL3D::CTransform::hrcUnlink(), NL3D::CCluster::Name, Root, NL3D::CClipTrav::RootCluster, NL3D::RootModelId, SonsOfAncestorSkeletonModelGroup, and NL3D::TransformId.

Referenced by NL3D::CSceneUser::CSceneUser(), and NL3D::CLodCharacterBuilder::setShape().

00250 {
00251         // Create and set root the default models.
00252         Root= static_cast<CTransform*>(createModel(TransformId));
00253 
00254         // The root is always freezed (never move).
00255         Root->freeze();
00256 
00257         // Init the instance group that represent the world
00258         _GlobalInstanceGroup = new CInstanceGroup;
00259         RootCluster= (CCluster*)createModel (ClusterId);
00260         // unlink from hrc.
00261         RootCluster->hrcUnlink();
00262         RootCluster->Name = "ClusterRoot";
00263         RootCluster->Group = _GlobalInstanceGroup;
00264         _GlobalInstanceGroup->addCluster (RootCluster);
00265 
00266         // init the ClipTrav.RootCluster.
00267         ClipTrav.RootCluster = RootCluster;
00268 
00269         // Create a SonsOfAncestorSkeletonModelGroup, for models which have a skeleton ancestor
00270         SonsOfAncestorSkeletonModelGroup= static_cast<CRootModel*>(createModel(RootModelId));
00271         // must unlink it from all traversals, because special, only used in CClipTrav::traverse()
00272         SonsOfAncestorSkeletonModelGroup->hrcUnlink();
00273         Root->clipDelChild(SonsOfAncestorSkeletonModelGroup);
00274 }

void NL3D::CScene::initQuadGridClipManager  ) 
 

init QuadGridClipManager

Definition at line 277 of file scene.cpp.

References NL3D::CTransform::clipAddChild(), NL3D::CTransform::clipUnlinkFromAll(), createModel(), NL3D::CTransform::hrcUnlink(), NL3D::CQuadGridClipManager::init(), NL3D_QuadGridClipClusterSize, NL3D_QuadGridClipManagerRadiusMax, NL3D_QuadGridClipMaxDist, NL3D_QuadGridClipNumDist, and NL3D::QuadGridClipManagerId.

Referenced by NL3D::CSceneUser::CSceneUser(), and NL3D::CLodCharacterBuilder::setShape().

00278 {
00279         // Init clip features.
00280         if( !_QuadGridClipManager )
00281         {
00282                 // create the model
00283                 _QuadGridClipManager= static_cast<CQuadGridClipManager*>(createModel(QuadGridClipManagerId));
00284                 // unlink it from hrc, and link it only to RootCluster. 
00285                 // NB: hence the quadGridClipManager may be clipped by the cluster system
00286                 _QuadGridClipManager->hrcUnlink();
00287                 _QuadGridClipManager->clipUnlinkFromAll();
00288                 RootCluster->clipAddChild(_QuadGridClipManager);
00289 
00290                 // init _QuadGridClipManager.
00291                 _QuadGridClipManager->init(NL3D_QuadGridClipClusterSize, 
00292                         NL3D_QuadGridClipNumDist, 
00293                         NL3D_QuadGridClipMaxDist, 
00294                         NL3D_QuadGridClipManagerRadiusMax);
00295         }
00296 }

bool NL3D::CScene::isLightingSystemEnabled  )  const [inline]
 

see enableLightingSystem

Definition at line 378 of file scene.h.

References _LightingSystemEnabled.

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().

00378 {return _LightingSystemEnabled;}

bool NL3D::CScene::isNextRenderProfile  )  const [inline]
 

Definition at line 528 of file scene.h.

References _NextRenderProfile.

Referenced by NL3D::CRenderTrav::traverse().

00528 {return _NextRenderProfile;}

void NL3D::CScene::profileNextRender  ) 
 

Misc.

Definition at line 1204 of file scene.cpp.

References _NextRenderProfile, BenchRes, and NL3D::UScene::CBenchResults::reset().

Referenced by NL3D::CSceneUser::profileNextRender().

01205 {
01206         _NextRenderProfile= true;
01207 
01208         // Reset All Stats.
01209         BenchRes.reset();
01210 }

void NL3D::CScene::registerBasics  )  [static]
 

Register Basic models.

Definition at line 104 of file scene.cpp.

00105 {
00106         CTransform::registerBasic();
00107         CCamera::registerBasic();
00108         CMeshBaseInstance::registerBasic();
00109         CMeshInstance::registerBasic();
00110         CMeshMRMInstance::registerBasic();
00111         CMeshMRMSkinnedInstance::registerBasic();
00112         CLandscapeModel::registerBasic();
00113         CTransformShape::registerBasic();
00114         CSkeletonModel::registerBasic();
00115         CParticleSystemModel::registerBasic() ;
00116         CMeshMultiLodInstance::registerBasic();
00117         CCluster::registerBasic();
00118         CFlareModel::registerBasic();
00119         CWaterModel::registerBasic();
00120         CWaveMakerModel::registerBasic();
00121         CVegetableBlendLayerModel::registerBasic();
00122         CRootModel::registerBasic();
00123         CPointLightModel::registerBasic();
00124         CSegRemanence::registerBasic();
00125         CQuadGridClipManager::registerBasic();
00126 }

void NL3D::CScene::registerModel const NLMISC::CClassId idModel,
const NLMISC::CClassId idModelBase,
CTransform *(*  creator)()
[static]
 

Register a model, indicating from which he derive.

Parameters:
idModel the Unique Id of the registered model
idModelBase the Unique Id of the base calss of the registered model
creator the function which create the registered model.

Definition at line 986 of file scene.cpp.

References _RegModels, NL3D::CScene::CModelEntry::BaseModelId, NL3D::CScene::CModelEntry::Creator, NL3D::CScene::CModelEntry::ModelId, and nlassert.

00987 {
00988         nlassert(idModel!=CClassId::Null);
00989         nlassert(creator);
00990         // idModelBase may be Null...
00991 
00992         CModelEntry             e;
00993         e.BaseModelId= idModelBase;
00994         e.ModelId= idModel;
00995         e.Creator= creator;
00996 
00997         // Insert/replace e.
00998         _RegModels.erase(e);
00999         _RegModels.insert(e);
01000 }

void NL3D::CScene::release  ) 
 

Release all relative to the scene (Models, traversals...)... Destroy the Basic traversals too. The Lod Character Manager is reset() ed, but not deleted (at dtor only).

Definition at line 194 of file scene.cpp.

References _CoarseMeshManager, _GlobalInstanceGroup, _LMAnimsAuto, _Models, _UpdateModelList, ClipTrav, CurrentCamera, NL3D::CPlayListManager::deleteAll(), deleteModel(), NL3D::CLodCharacterManager::reset(), NL3D::CQuadGridClipManager::reset(), Root, NL3D::CClipTrav::setQuadGridClipManager(), and SonsOfAncestorSkeletonModelGroup.

Referenced by NL3D::CLodCharacterBuilder::~CLodCharacterBuilder(), ~CScene(), and NL3D::CSceneUser::~CSceneUser().

00195 {
00196         // terminate async loading
00197         CAsyncFileManager::terminate();
00198 
00199         // reset the _QuadGridClipManager, => unlink models, and delete clusters.
00200         if( _QuadGridClipManager )
00201                 _QuadGridClipManager->reset();
00202 
00203         // First, delete models
00204         set<CTransform*>::iterator      it;
00205         it= _Models.begin();
00206         while( it!=_Models.end())
00207         {
00208                 deleteModel(*it);
00209                 it= _Models.begin();
00210         }
00211         // No models at all.
00212         _UpdateModelList= NULL;
00213 
00214         // reset ptrs
00215         _ShapeBank = NULL;
00216         Root= NULL;
00217         RootCluster= NULL;
00218         SonsOfAncestorSkeletonModelGroup= NULL;
00219         CurrentCamera= NULL;
00220         _QuadGridClipManager= NULL;
00221         ClipTrav.setQuadGridClipManager(NULL);
00222 
00223         // reset the _LodCharacterManager
00224         if(_LodCharacterManager)
00225                 _LodCharacterManager->reset();
00226 
00227         // delete the coarseMeshManager
00228         if(_CoarseMeshManager)
00229         {
00230                 delete _CoarseMeshManager;
00231                 _CoarseMeshManager= NULL;
00232         }
00233 
00234         if(_GlobalInstanceGroup)
00235         {
00236                 delete _GlobalInstanceGroup;
00237                 _GlobalInstanceGroup = NULL;
00238         }
00239 
00240         // delete the play list
00241         _LMAnimsAuto.deleteAll();
00242 }

void NL3D::CScene::removeInstanceGroupForLightAnimation CInstanceGroup ig  ) 
 

Remove an IG for auto PointLight Factor animation. called by CInstanceGroup::removeFromScene().

Definition at line 918 of file scene.cpp.

References _AnimatedIgSet, ItAnimatedIgSet, and nlassert.

Referenced by NL3D::CInstanceGroup::removeFromScene().

00919 {
00920         nlassert( ig );
00921         ItAnimatedIgSet         itIg= _AnimatedIgSet.find(ig);
00922         if ( itIg != _AnimatedIgSet.end() )
00923                 _AnimatedIgSet.erase(itIg);
00924 }

void NL3D::CScene::render bool  doHrcPass = true  ) 
 

Render the scene, from the CurrentCamera view. This also update waiting instance that are loaded asynchronously (by calling updateWaitingInstances) NB: no Driver clear buffers (color or ZBuffer) are done.... This call t->traverse() function to registered render traversal following their order given.

Parameters:
doHrcPass set it to false to indicate that the CHrcTrav have not to be traversed. UseFull to optimize if you know that NONE of your models have moved (a good example is a shoot of the scene from different cameras).

Particle system handling (remove the resources of those which are too far, as their clusters may not have been parsed). Note that only a few of them are tested at each call

Definition at line 300 of file scene.cpp.

References _DeltaSystemTimeBetweenRender, _GlobalSystemTime, _NextRenderProfile, _NumRender, _ParticleSystemManager, AnimDetailTrav, NL3D::CClipTrav::Camera, NL3D::CTravCameraScene::CamPos, NLMISC::clamp(), ClipTrav, CurrentCamera, HrcTrav, LightTrav, LoadBalancingTrav, nlassert, NL3D::CParticleSystemManager::processAnimate(), NL3D::CParticleSystemManager::refreshModels(), NL3D::CTravCameraScene::setCamMatrix(), NL3D::CTravCameraScene::setFrustum(), NL3D::CClipTrav::setQuadGridClipManager(), NL3D::CRenderTrav::setViewport(), NLMISC::CTime::ticksToSecond(), NL3D::CRenderTrav::traverse(), NL3D::CLightTrav::traverse(), NL3D::CLoadBalancingTrav::traverse(), NL3D::CAnimDetailTrav::traverse(), NL3D::CClipTrav::traverse(), NL3D::CHrcTrav::traverse(), updateModels(), updateWaitingInstances(), and NL3D::CClipTrav::WorldFrustumPyramid.

Referenced by NL3D::CSceneUser::render().

00301 {
00302         double fNewGlobalSystemTime = NLMISC::CTime::ticksToSecond(NLMISC::CTime::getPerformanceTime());
00303         _DeltaSystemTimeBetweenRender= fNewGlobalSystemTime - _GlobalSystemTime;
00304         _GlobalSystemTime = fNewGlobalSystemTime;
00305         //
00306         ++ _NumRender;
00307         //
00308         nlassert(CurrentCamera);
00309 
00310         // update models.
00311         updateModels();
00312 
00313         // Use the camera to setup Clip / Render pass.
00314         float left, right, bottom, top, znear, zfar;
00315         CurrentCamera->getFrustum(left, right, bottom, top, znear, zfar);
00316 
00317         // setup basic camera.
00318         ClipTrav.setFrustum(left, right, bottom, top, znear, zfar, CurrentCamera->isPerspective());
00319 
00320         RenderTrav.setFrustum (left, right, bottom, top, znear, zfar, CurrentCamera->isPerspective());
00321         RenderTrav.setViewport (_Viewport);
00322 
00323         LoadBalancingTrav.setFrustum (left, right, bottom, top, znear, zfar, CurrentCamera->isPerspective());
00324 
00325 
00326         // Set Infos for cliptrav.
00327         ClipTrav.Camera = CurrentCamera;
00328         ClipTrav.setQuadGridClipManager (_QuadGridClipManager);
00329 
00330 
00331         // **** For all render traversals, traverse them (except the Hrc one), in ascending order.
00332         if( doHrcPass )
00333                 HrcTrav.traverse();     
00334 
00335         // Set Cam World Matrix for all trav that need it
00336         ClipTrav.setCamMatrix(CurrentCamera->getWorldMatrix());
00337         RenderTrav.setCamMatrix (CurrentCamera->getWorldMatrix());
00338         LoadBalancingTrav.setCamMatrix (CurrentCamera->getWorldMatrix());
00339 
00340         
00341         // clip
00342         ClipTrav.traverse();
00343         // animDetail
00344         AnimDetailTrav.traverse();
00345         // loadBalance
00346         LoadBalancingTrav.traverse();
00347         //
00348         _ParticleSystemManager.processAnimate(_EllapsedTime); // deals with permanently animated particle systems       
00349         // Light
00350         LightTrav.traverse();
00351         // render
00352         RenderTrav.traverse();
00353 
00354 
00355         // **** Misc.
00356 
00360         _ParticleSystemManager.refreshModels(ClipTrav.WorldFrustumPyramid, ClipTrav.CamPos);
00361         
00362         // Waiting Instance handling
00363         double deltaT = _DeltaSystemTimeBetweenRender;
00364         clamp (deltaT, 0.01, 0.1);
00365         updateWaitingInstances(deltaT);
00366 
00367         // Reset profiling
00368         _NextRenderProfile= false;
00369 
00370         /*
00371         uint64 total = PSStatsRegisterPSModelObserver +
00372                                   PSStatsRemovePSModelObserver + 
00373                                   PSStatsUpdateOpacityInfos +
00374                                   PSStatsUpdateLightingInfos +
00375                                   PSStatsGetAABBox +
00376                                   PSStatsReallocRsc +
00377                                   PSStatsReleasePSPointer +
00378                                   PSStatsRefreshRscDeletion +
00379                                   PSStatsReleaseRsc +
00380                                   PSStatsReleaseRscAndInvalidate +
00381                                   PSStatsGetNumTriangles +
00382                                   PSStatsCheckAgainstPyramid +
00383                                   PSStatsTraverseAnimDetail +
00384                                   PSStatsDoAnimate +
00385                                   PSStatsTraverseRender +
00386                                   PSStatsTraverseClip +
00387                                   PSStatsCheckDestroyCondition +
00388                                   PSStatsForceInstanciate +
00389                                   PSStatsDoAnimatePart1 +
00390                                   PSStatsDoAnimatePart2 +
00391                                   PSStatsDoAnimatePart3 +
00392                                   PSStatsTraverseAnimDetailPart1 +
00393                                   PSStatsTraverseAnimDetailPart2 +
00394                                   PSStatsTraverseAnimDetailPart3 +
00395                                   PSStatsTraverseAnimDetailPart4 +
00396                                   PSAnim1 +
00397                                   PSAnim2+
00398                                   PSAnim3+
00399                                   PSAnim4+
00400                                   PSAnim5+
00401                                   PSAnim6+
00402                                   PSAnim7+
00403                                   PSAnim8+
00404                                   PSAnim9+
00405                                   PSAnim10+
00406                                   PSAnim11;
00407         
00408 
00409          if (((double) total / (double) NLMISC::CSystemInfo::getProcessorFrequency()) > 0.01)
00410          {              
00411                   nlinfo("***** PS STATS ****");
00412                   #define PS_STATS(var) \
00413                   nlinfo("time for " #var " = %.2f", (float) (1000 * ((double) var / (double) CSystemInfo::getProcessorFrequency())));
00414 
00415                   PS_STATS(PSStatsRegisterPSModelObserver)
00416                   PS_STATS(PSStatsRemovePSModelObserver)
00417                   PS_STATS(PSStatsUpdateOpacityInfos)
00418                   PS_STATS(PSStatsUpdateLightingInfos)
00419                   PS_STATS(PSStatsGetAABBox)
00420                   PS_STATS(PSStatsReallocRsc)
00421                   PS_STATS(PSStatsReleasePSPointer)
00422                   PS_STATS(PSStatsRefreshRscDeletion)
00423                   PS_STATS(PSStatsReleaseRsc)
00424                   PS_STATS(PSStatsReleaseRscAndInvalidate)
00425                   PS_STATS(PSStatsGetNumTriangles)
00426                   PS_STATS(PSStatsCheckAgainstPyramid)
00427                   PS_STATS(PSStatsTraverseAnimDetail)
00428                   PS_STATS(PSStatsDoAnimate)
00429                   PS_STATS(PSStatsTraverseRender)
00430                   PS_STATS(PSStatsTraverseClip)
00431                   PS_STATS(PSStatsClipSystemInstanciated);
00432                   PS_STATS(PSStatsClipSystemNotInstanciated);
00433                   PS_STATS(PSStatsClipSystemCheckAgainstPyramid);
00434                   PS_STATS(PSStatsInsertInVisibleList);           
00435                   PS_STATS(PSStatsCheckDestroyCondition)
00436                   PS_STATS(PSStatsForceInstanciate)
00437                   PS_STATS(PSStatsDoAnimatePart1)
00438                   PS_STATS(PSStatsDoAnimatePart2)
00439                   PS_STATS(PSStatsDoAnimatePart3)
00440                   PS_STATS(PSStatsTraverseAnimDetailPart1)
00441                   PS_STATS(PSStatsTraverseAnimDetailPart2)
00442                   PS_STATS(PSStatsTraverseAnimDetailPart3)
00443                   PS_STATS(PSStatsTraverseAnimDetailPart4)
00444                   PS_STATS(PSAnim1)
00445                   PS_STATS(PSAnim2)
00446                   PS_STATS(PSAnim3)
00447                   PS_STATS(PSAnim4)
00448                   PS_STATS(PSAnim5)
00449                   PS_STATS(PSAnim6)
00450                   PS_STATS(PSAnim7)
00451                   PS_STATS(PSAnim8)
00452                   PS_STATS(PSAnim9)
00453                   PS_STATS(PSAnim10)
00454                   PS_STATS(PSAnim11)
00455                   PS_STATS(PSStatsZonePlane)
00456                   PS_STATS(PSStatsZoneSphere)
00457                   PS_STATS(PSStatsZoneDisc)
00458                   PS_STATS(PSStatsZoneRectangle)
00459                   PS_STATS(PSStatsZoneCylinder)
00460                   PS_STATS(PSMotion1)
00461                   PS_STATS(PSMotion2)
00462                   PS_STATS(PSMotion3)
00463                   PS_STATS(PSMotion4)             
00464                   PS_STATS(PSStatCollision)
00465                   PS_STATS(PSStatEmit)
00466                   PS_STATS(PSStatRender)
00467                   
00468 
00469                 nlinfo("num do animate = %d", (int) PSStatsNumDoAnimateCalls);
00470 
00471                 nlinfo("Max et = %.2f", PSMaxET);
00472                 nlinfo("Max ps nb pass = %d", (int) PSMaxNBPass);
00473 
00474                 PS_STATS(total)
00475                  
00476          }
00477 
00478          PSStatsRegisterPSModelObserver = 0;
00479          PSStatsRemovePSModelObserver = 0;
00480          PSStatsUpdateOpacityInfos = 0;
00481          PSStatsUpdateLightingInfos = 0;
00482          PSStatsGetAABBox = 0;
00483          PSStatsReallocRsc = 0;
00484          PSStatsReleasePSPointer = 0;
00485          PSStatsRefreshRscDeletion = 0;
00486          PSStatsReleaseRsc = 0;
00487          PSStatsReleaseRscAndInvalidate = 0;
00488          PSStatsGetNumTriangles = 0;
00489          PSStatsCheckAgainstPyramid = 0;
00490          PSStatsTraverseAnimDetail = 0;
00491          PSStatsDoAnimate = 0;
00492          PSStatsTraverseRender = 0;
00493          PSStatsTraverseClip = 0;
00494          PSStatsCheckDestroyCondition = 0;
00495          PSStatsForceInstanciate = 0;
00496          PSStatsClipSystemInstanciated = 0;
00497          PSStatsClipSystemNotInstanciated = 0;
00498          PSStatsClipSystemCheckAgainstPyramid = 0;
00499          PSStatsInsertInVisibleList = 0;
00500          PSStatsDoAnimatePart1 = 0;
00501          PSStatsDoAnimatePart2 = 0;
00502          PSStatsDoAnimatePart3 = 0;
00503          PSStatsTraverseAnimDetailPart1 = 0;
00504          PSStatsTraverseAnimDetailPart2 = 0;
00505          PSStatsTraverseAnimDetailPart3 = 0;
00506          PSStatsTraverseAnimDetailPart4 = 0;    
00507          PSStatsNumDoAnimateCalls = 0;
00508          PSAnim1 = 0;
00509          PSAnim2 = 0;
00510          PSAnim3 = 0;
00511          PSAnim4 = 0;
00512          PSAnim5 = 0;
00513          PSAnim6 = 0;
00514          PSAnim7 = 0;
00515          PSAnim8 = 0;
00516          PSAnim9 = 0;
00517          PSAnim10 = 0;
00518          PSAnim11 = 0;
00519          PSMaxET = 0.f;
00520          PSMaxNBPass = 0;
00521          PSStatsZonePlane = 0;
00522          PSStatsZoneSphere = 0;
00523          PSStatsZoneDisc = 0;
00524          PSStatsZoneRectangle = 0;
00525          PSStatsZoneCylinder = 0;
00526          PSMotion1 = 0;
00527          PSMotion2 = 0;
00528          PSMotion3 = 0;
00529          PSMotion4 = 0;  
00530          PSStatCollision = 0;
00531          PSStatEmit = 0;
00532          PSStatRender = 0;       
00533          */
00534 }

void NL3D::CScene::setAmbientGlobal NLMISC::CRGBA  ambient  ) 
 

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

Definition at line 844 of file scene.cpp.

References NL3D::CRenderTrav::AmbientGlobal.

Referenced by NL3D::CSceneUser::setAmbientGlobal().

00845 {
00846         RenderTrav.AmbientGlobal= ambient;
00847 }

void NL3D::CScene::setAsyncTextureManager CAsyncTextureManager mgr  )  [inline]
 

Set the async texture manager.

Definition at line 503 of file scene.h.

00503 {_AsyncTextureManager= mgr;}

void NL3D::CScene::setAutomaticAnimationSet CAnimationSet as  ) 
 

set the automatic animation set used by this scene. It is stored as a smart pointer

Definition at line 1112 of file scene.cpp.

References _AnimatedLight, _AnimatedLightNameToIndex, _AnimatedLightPtr, _AutomaticAnimationSet, _LightGroupColor, _LMAnimsAuto, NL3D::CChannelMixer::addChannel(), NL3D::CPlayListManager::addPlaylist(), count, NL3D::CPlayListManager::deleteAll(), NL3D::CAnimatedLightmap::getDefaultTrack(), NL3D::CAnimatedLightmap::getName(), NL3D::CAnimation::getTrackNames(), NL3D::CAnimatedLightmap::getValue(), NL3D::CAnimationPlaylist::setAnimation(), NL3D::CChannelMixer::setAnimationSet(), NL3D::CAnimatedLightmap::setName(), NL3D::CAnimationPlaylist::setWrapMode(), and uint.

Referenced by NL3D::CSceneUser::setAutomaticAnimationSet().

01113 { 
01114         // Backup the animation set
01115         _AutomaticAnimationSet = as; 
01116 
01117         // Delete all auto lightmap animations
01118         _LMAnimsAuto.deleteAll();
01119         _AnimatedLightNameToIndex.clear();
01120         _AnimatedLight.clear();
01121         _AnimatedLightPtr.clear();
01122         _LightGroupColor.clear();               
01123         
01124         // Register each animation as lightmap
01125         const uint count = _AutomaticAnimationSet->getNumAnimation();
01126         uint i;
01127         for (i=0; i<count; i++)
01128         {
01129                 // Pointer on the animation
01130                 CAnimation *pAnim = _AutomaticAnimationSet->getAnimation(i);
01131 
01132 /*              uint nAnimNb;
01133                 // Reset the automatic animation if no animation wanted
01134                 if( pAnim == NULL )
01135                 {
01136                         _AnimatedLight.clear();
01137                         _AnimatedLightPtr.clear();
01138                         _AnimatedLightNameToIndex.clear();
01139                         nAnimNb = _LightmapAnimations.getAnimationIdByName("Automatic");
01140                         if( nAnimNb != CAnimationSet::NotFound )
01141                         {
01142                                 CAnimation *anim = _LightmapAnimations.getAnimation( nAnimNb );
01143                                 delete anim;
01144                         }
01145                         _LightmapAnimations.reset(); 
01146                         _LMAnimsAuto.deleteAll();
01147                         return;
01148                 }
01149                 */
01150 
01151                 set<string> setTrackNames;
01152                 pAnim->getTrackNames( setTrackNames );
01153 
01154                 // nAnimNb = _LightmapAnimations.addAnimation( "Automatic", pAnim );
01155                 // _LightmapAnimations.build();
01156                 
01157                 set<string>::iterator itSel = setTrackNames.begin();
01158                 while ( itSel != setTrackNames.end() )
01159                 {
01160                         string ate = *itSel;
01161                         if( strncmp( itSel->c_str(), "LightmapController.", 19 ) == 0 )
01162                         {
01163                                 // The light name
01164                                 const char *lightName = strrchr ((*itSel).c_str (), '.')+1;
01165                                 
01166                                 // Light animation doesn't exist ?
01167                                 if (_AnimatedLightNameToIndex.find (lightName) == _AnimatedLightNameToIndex.end())
01168                                 {
01169                                         // Channel mixer for light anim
01170                                         CChannelMixer *cm = new CChannelMixer();
01171                                         cm->setAnimationSet( _AutomaticAnimationSet );
01172 
01173                                         // Add an automatic animation
01174                                         _AnimatedLight.push_back ( CAnimatedLightmap (_LightGroupColor.size ()) );
01175                                         _AnimatedLightPtr.push_back ( &_AnimatedLight.back () );
01176                                         _AnimatedLightNameToIndex.insert ( std::map<std::string, uint>::value_type (lightName, _AnimatedLightPtr.size ()-1 ) );
01177                                         CAnimatedLightmap &animLM = _AnimatedLight.back ();
01178                                         animLM.setName( *itSel );
01179                                         
01180                                         cm->addChannel( animLM.getName(), &animLM, animLM.getValue(CAnimatedLightmap::FactorValue),
01181                                                 animLM.getDefaultTrack(CAnimatedLightmap::FactorValue), CAnimatedLightmap::FactorValue, 
01182                                                 CAnimatedLightmap::OwnerBit, false);
01183                                         
01184                                         // Animated lightmap playlist
01185                                         CAnimationPlaylist *pl = new CAnimationPlaylist();
01186                                         pl->setAnimation( 0, i );
01187                                         pl->setWrapMode( 0, CAnimationPlaylist::Repeat );
01188                                         _LMAnimsAuto.addPlaylist(pl,cm);
01189                                 }
01190                         }
01191                         ++itSel;
01192                 }
01193         }
01194 }

void NL3D::CScene::setCam CCamera cam  )  [inline]
 

Set/Get the current camera/Viewport.

Definition at line 179 of file scene.h.

References CurrentCamera.

Referenced by NL3D::CSceneUser::setCam(), and NL3D::CSceneUser::~CSceneUser().

00179 {CurrentCamera= cam;}

void NL3D::CScene::setCoarseMeshLightingUpdate uint8  period  ) 
 

Each coarseMesh lighting will be updated every "period" frame. clamped to 1,255

Definition at line 928 of file scene.cpp.

References _CoarseMeshLightingUpdate, and uint8.

Referenced by NL3D::CSceneUser::setCoarseMeshLightingUpdate().

00929 {
00930         _CoarseMeshLightingUpdate= max((uint8)1, period);
00931 }

void NL3D::CScene::setDriver IDriver drv  ) 
 

Set the driver to render Traversal.

Definition at line 573 of file scene.cpp.

References NL3D::CRenderTrav::setDriver().

Referenced by NL3D::CSceneUser::CSceneUser(), and NL3D::CSceneUser::~CSceneUser().

00574 {
00575         RenderTrav.setDriver(drv);
00576 }

void NL3D::CScene::setFlareContext uint  context  )  [inline]
 

Definition at line 554 of file scene.h.

References _FlareContext, MaxNumFlareContexts, nlassert, and uint.

Referenced by NL3D::CSceneUser::setFlareContext().

00554 { nlassert(context < MaxNumFlareContexts); _FlareContext = context; }

void NL3D::CScene::setGlobalWindDirection const CVector gwd  ) 
 

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

Definition at line 946 of file scene.cpp.

References _GlobalWindDirection, NLMISC::CVector::normalize(), and NLMISC::CVector::z.

Referenced by NL3D::CSceneUser::setGlobalWindDirection().

00947 {
00948         _GlobalWindDirection= gwd;
00949         _GlobalWindDirection.z= 0;
00950         _GlobalWindDirection.normalize();
00951 }

void NL3D::CScene::setGlobalWindPower float  gwp  ) 
 

Weather mgt.

Definition at line 941 of file scene.cpp.

References _GlobalWindPower.

Referenced by NL3D::CSceneUser::setGlobalWindPower().

00942 {
00943         _GlobalWindPower= gwp;
00944 }

void NL3D::CScene::setGroupLoadMaxPolygon const std::string &  group,
uint  nFaces
 

Set the number of faces wanted for a LoadBlancingGroup. The Group is created if did not exist.

Definition at line 766 of file scene.cpp.

References LoadBalancingTrav, NL3D::CLoadBalancingTrav::setGroupNbFaceWanted(), and uint.

Referenced by NL3D::CSceneUser::setGroupLoadMaxPolygon().

00767 {
00768         nFaces= max(nFaces, (uint)1);
00769         LoadBalancingTrav.setGroupNbFaceWanted(group, nFaces);
00770 }

void NL3D::CScene::setLayersRenderingOrder bool  directOrder = true  ) 
 

Set the order or rendering for transparent objects. In real case, with direct order, we have:

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

Definition at line 798 of file scene.cpp.

References NL3D::CRenderTrav::setLayersRenderingOrder().

Referenced by NL3D::CSceneUser::setLayersRenderingOrder().

00799 {
00800         RenderTrav.setLayersRenderingOrder(directOrder);
00801 }

void NL3D::CScene::setLightGroupColor uint  lightmapGroup,
NLMISC::CRGBA  color
 

set the color of a light group.

Definition at line 1087 of file scene.cpp.

References _LightGroupColor, and uint.

Referenced by NL3D::CSceneUser::setLightGroupColor().

01088 {
01089         // If too small, resize with white
01090         if (lightmapGroup >= _LightGroupColor.size ())
01091         {
01092                 _LightGroupColor.resize (lightmapGroup+1, CRGBA::White);
01093         }
01094 
01095         // Set the color
01096         _LightGroupColor[lightmapGroup] = color;
01097 }

void NL3D::CScene::setLightTransitionThreshold float  lightTransitionThreshold  ) 
 

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

Definition at line 899 of file scene.cpp.

References NL3D::CLightTrav::LightingManager, LightTrav, and NL3D::CLightingManager::setLightTransitionThreshold().

Referenced by NL3D::CSceneUser::setLightTransitionThreshold().

00900 {
00901         LightTrav.LightingManager.setLightTransitionThreshold(lightTransitionThreshold);
00902 }

void NL3D::CScene::setLodCharacterManager CLodCharacterManager m  )  [inline]
 

set the LodCharacterManager

Definition at line 351 of file scene.h.

void NL3D::CScene::setMaxLightContribution uint  nlights  ) 
 

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

Definition at line 890 of file scene.cpp.

References NL3D::CLightTrav::LightingManager, LightTrav, NL3D::CLightingManager::setMaxLightContribution(), and uint.

Referenced by NL3D::CSceneUser::setMaxLightContribution().

00891 {
00892         LightTrav.LightingManager.setMaxLightContribution(nlights);
00893 }

void NL3D::CScene::setMaxSkeletonsInNotCLodForm uint  m  )  [inline]
 

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

Definition at line 328 of file scene.h.

References _MaxSkeletonsInNotCLodForm, and uint.

Referenced by NL3D::CSceneUser::setMaxSkeletonsInNotCLodForm().

void NL3D::CScene::setPolygonBalancingMode TPolygonBalancingMode  polBalMode  ) 
 

Set the PolygonBalancingMode.

Definition at line 785 of file scene.cpp.

References LoadBalancingTrav, NL3D::CLoadBalancingTrav::PolygonBalancingMode, and uint.

Referenced by NL3D::CSceneUser::setPolygonBalancingMode().

00786 {
00787         LoadBalancingTrav.PolygonBalancingMode= (CLoadBalancingGroup::TPolygonBalancingMode)(uint)polBalMode;
00788 }

void NL3D::CScene::setShadowMapBlurSize uint  bs  ) 
 

set the size of the blur (<=3 means number of fakeBlur).

Definition at line 1228 of file scene.cpp.

References _ShadowMapBlurSize, and uint.

Referenced by NL3D::CSceneUser::setShadowMapBlurSize().

01229 {
01230         _ShadowMapBlurSize= bs;
01231 }

void NL3D::CScene::setShadowMapDistFadeEnd float  dist  ) 
 

ShadowMap Distance Fade end (50 default).

Definition at line 1252 of file scene.cpp.

References _ShadowMapDistFadeEnd.

Referenced by NL3D::CSceneUser::setShadowMapDistFadeEnd().

01253 {
01254         _ShadowMapDistFadeEnd= max(0.f, dist);
01255 }

void NL3D::CScene::setShadowMapDistFadeStart float  dist  ) 
 

ShadowMap Distance Fade Start (40 default).

Definition at line 1247 of file scene.cpp.

References _ShadowMapDistFadeStart.

Referenced by NL3D::CSceneUser::setShadowMapDistFadeStart().

01248 {
01249         _ShadowMapDistFadeStart= max(0.f, dist);
01250 }

void NL3D::CScene::setShadowMapMaxCasterAround uint  num  ) 
 

ShadowMap max Caster Around (optimize memory).

Definition at line 1262 of file scene.cpp.

References _ShadowMapMaxCasterAround, num, and uint.

Referenced by NL3D::CSceneUser::setShadowMapMaxCasterAround().

01263 {
01264         _ShadowMapMaxCasterAround= num;
01265 }

void NL3D::CScene::setShadowMapMaxCasterInScreen uint  num  ) 
 

ShadowMap max Caster In Screen (optimize CPU/GPU).

Definition at line 1257 of file scene.cpp.

References _ShadowMapMaxCasterInScreen, num, and uint.

Referenced by NL3D::CSceneUser::setShadowMapMaxCasterInScreen().

01258 {
01259         _ShadowMapMaxCasterInScreen= num;
01260 }

void NL3D::CScene::setShadowMapMaxDepth float  depth  ) 
 

set the ShadowMap Extent

Definition at line 1222 of file scene.cpp.

References _ShadowMapMaxDepth, and depth.

Referenced by NL3D::CSceneUser::setShadowMapMaxDepth().

01223 {
01224         _ShadowMapMaxDepth= depth;
01225 }

void NL3D::CScene::setShadowMapTextureSize uint  size  ) 
 

must be a power of 2.

Definition at line 1214 of file scene.cpp.

References _ShadowMapTextureSize, NLMISC::raiseToNextPowerOf2(), size, and uint.

Referenced by NL3D::CSceneUser::setShadowMapTextureSize().

01215 {
01216         size= max(size, 2U);
01217         size= raiseToNextPowerOf2(size);
01218         _ShadowMapTextureSize= size;
01219 }

void NL3D::CScene::setShapeBank CShapeBank pShapeBank  ) 
 

Set the shape bank.

Definition at line 593 of file scene.cpp.

00594 {
00595         _ShapeBank = pShapeBank;
00596 }

void NL3D::CScene::setSunAmbient NLMISC::CRGBA  ambient  ) 
 

set the Ambient of the Sun used for the scene.

Definition at line 848 of file scene.cpp.

References NL3D::CRenderTrav::SunAmbient.

Referenced by NL3D::CSceneUser::setSunAmbient().

00849 {
00850         RenderTrav.SunAmbient= ambient;
00851 }

void NL3D::CScene::setSunDiffuse NLMISC::CRGBA  diffuse  ) 
 

set the Diffuse of the Sun used for the scene.

Definition at line 852 of file scene.cpp.

References NL3D::CRenderTrav::SunDiffuse.

Referenced by NL3D::CSceneUser::setSunDiffuse().

00853 {
00854         RenderTrav.SunDiffuse= diffuse;
00855 }

void NL3D::CScene::setSunDirection const NLMISC::CVector direction  ) 
 

set the Direction of the Sun used for the scene.

Definition at line 860 of file scene.cpp.

References NL3D::CRenderTrav::setSunDirection().

Referenced by NL3D::CSceneUser::setSunDirection().

00861 {
00862         RenderTrav.setSunDirection(direction);
00863 }

void NL3D::CScene::setSunSpecular NLMISC::CRGBA  specular  ) 
 

set the Specular of the Sun used for the scene.

Definition at line 856 of file scene.cpp.

References NL3D::CRenderTrav::SunSpecular.

Referenced by NL3D::CSceneUser::setSunSpecular().

00857 {
00858         RenderTrav.SunSpecular= specular;
00859 }

void NL3D::CScene::setViewport const class CViewport viewport  )  [inline]
 

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

Definition at line 181 of file scene.h.

Referenced by NL3D::CSceneUser::CSceneUser(), and NL3D::CSceneUser::setViewport().

00182         {
00183                 _Viewport=viewport;
00184         }

void NL3D::CScene::setWaterCallback IWaterSurfaceAddedCallback wcb  )  [inline]
 

Definition at line 593 of file scene.h.

References _WaterCallback.

Referenced by NL3D::CSceneUser::setWaterCallback().

00593 { _WaterCallback = wcb; }

void NL3D::CScene::updateModels  )  [private]
 

Update all models. All dirty models are cleaned.

Definition at line 1067 of file scene.cpp.

References NL3D::CTransform::_NextModelToUpdate, _UpdateModelList, and NL3D::CTransform::update().

Referenced by render().

01068 {
01069         // check all the models which must be checked.
01070         CTransform      *model= _UpdateModelList;
01071         CTransform      *next;
01072         while( model )
01073         {
01074                 // next to update. get next now, because model->update() may remove model from the list.
01075                 next= model->_NextModelToUpdate;
01076 
01077                 // update the model.
01078                 model->update();
01079 
01080                 // next.
01081                 model= next;
01082         }
01083 }

void NL3D::CScene::updateWaitingInstances double  systemTimeEllapsed  ) 
 

Update instances that are loaded asynchronously

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

Definition at line 537 of file scene.cpp.

References _WaitingInstances, NL3D::CShapeBank::addRef(), NL3D::IShape::createInstance(), NL3D::CShapeBank::isPresent(), NL3D::CShapeBank::processWaitingShapes(), NL3D::CShapeBank::setMaxBytesToUpload(), and uint32.

Referenced by render(), and NL3D::CSceneUser::updateWaitingInstances().

00538 {       
00539         // First set up max AGP upload
00540         double fMaxBytesToUp = 100 * 256 * 256 * systemTimeEllapsed;    
00541         _ShapeBank->setMaxBytesToUpload ((uint32)fMaxBytesToUp);
00542         // Parse all the waiting instance
00543         _ShapeBank->processWaitingShapes ();    // Process waiting shapes load shape, texture, and lightmaps
00544                                                                                         // and upload all maps to VRAM pieces by pieces
00545         TWaitingInstancesMMap::iterator wimmIt = _WaitingInstances.begin();
00546         while( wimmIt != _WaitingInstances.end() )
00547         {
00548                 CShapeBank::TShapeState st = _ShapeBank->isPresent (wimmIt->first);
00549                 if (st == CShapeBank::AsyncLoad_Error)
00550                 {
00551                         // Delete the waiting instance - Nobody can be informed of that...
00552                         TWaitingInstancesMMap::iterator itDel= wimmIt;
00553                         ++wimmIt;
00554                         _WaitingInstances.erase(itDel);
00555                 }
00556                 else if (st == CShapeBank::Present)
00557                 {
00558                         // Then create a reference to the shape
00559                         *(wimmIt->second) = _ShapeBank->addRef(wimmIt->first)->createInstance (*this);
00560                         // Delete the waiting instance
00561                         TWaitingInstancesMMap::iterator itDel= wimmIt;
00562                         ++wimmIt;
00563                         _WaitingInstances.erase(itDel);
00564                 }
00565                 else // st == CShapeBank::NotPresent or loading
00566                 {
00567                         ++wimmIt;
00568                 }
00569         }
00570 }


Friends And Related Function Documentation

friend class CClipTrav [friend]
 

Definition at line 735 of file scene.h.

friend class CTransform [friend]
 

Definition at line 734 of file scene.h.


Field Documentation

TAnimatedIgSet NL3D::CScene::_AnimatedIgSet [private]
 

Definition at line 653 of file scene.h.

Referenced by addInstanceGroupForLightAnimation(), animate(), and removeInstanceGroupForLightAnimation().

std::list<CAnimatedLightmap> NL3D::CScene::_AnimatedLight [private]
 

Definition at line 642 of file scene.h.

Referenced by setAutomaticAnimationSet().

std::map<std::string, uint> NL3D::CScene::_AnimatedLightNameToIndex [private]
 

Definition at line 641 of file scene.h.

Referenced by getAnimatedLightNameToIndex(), and setAutomaticAnimationSet().

std::vector<CAnimatedLightmap*> NL3D::CScene::_AnimatedLightPtr [private]
 

Definition at line 643 of file scene.h.

Referenced by animate(), getAnimatedLightFactor(), and setAutomaticAnimationSet().

CAsyncTextureManager* NL3D::CScene::_AsyncTextureManager [private]
 

Definition at line 703 of file scene.h.

NLMISC::CSmartPtr<CAnimationSet> NL3D::CScene::_AutomaticAnimationSet [private]
 

Definition at line 699 of file scene.h.

Referenced by createInstance(), getAutomaticAnimationSet(), and setAutomaticAnimationSet().

uint8 NL3D::CScene::_CoarseMeshLightingUpdate [private]
 

set setCoarseMeshLightingUpdate

Definition at line 683 of file scene.h.

Referenced by CScene(), getCoarseMeshLightingUpdate(), and setCoarseMeshLightingUpdate().

CCoarseMeshManager* NL3D::CScene::_CoarseMeshManager [private]
 

Definition at line 668 of file scene.h.

Referenced by CScene(), getCoarseMeshManager(), and release().

TGlobalAnimationTime NL3D::CScene::_CurrentTime [private]
 

Definition at line 603 of file scene.h.

double NL3D::CScene::_DeltaSystemTimeBetweenRender [private]
 

Definition at line 616 of file scene.h.

Referenced by getEllapsedSystemTime(), and render().

TAnimationTime NL3D::CScene::_EllapsedTime [private]
 

Definition at line 613 of file scene.h.

uint32 NL3D::CScene::_FilterRenderFlags [private]
 

Definition at line 712 of file scene.h.

Referenced by CScene(), enableElementRender(), and getFilterRenderFlags().

bool NL3D::CScene::_FirstAnimateCall [private]
 

Definition at line 610 of file scene.h.

Referenced by animate(), and CScene().

uint NL3D::CScene::_FlareContext [private]
 

Definition at line 746 of file scene.h.

Referenced by CScene(), getFlareContext(), and setFlareContext().

CInstanceGroup* NL3D::CScene::_GlobalInstanceGroup [private]
 

Definition at line 662 of file scene.h.

Referenced by getGlobalInstanceGroup(), initDefaultRoots(), and release().

double NL3D::CScene::_GlobalSystemTime [private]
 

Definition at line 617 of file scene.h.

Referenced by getCurrentSystemTime(), and render().

CVector NL3D::CScene::_GlobalWindDirection [private]
 

Definition at line 694 of file scene.h.

Referenced by CScene(), getGlobalWindDirection(), and setGlobalWindDirection().

float NL3D::CScene::_GlobalWindPower [private]
 

Definition at line 693 of file scene.h.

Referenced by CScene(), getGlobalWindPower(), and setGlobalWindPower().

TGlobalAnimationTime NL3D::CScene::_InitTime [private]
 

Definition at line 607 of file scene.h.

Referenced by animate().

std::vector<NLMISC::CRGBA> NL3D::CScene::_LightGroupColor [private]
 

Definition at line 648 of file scene.h.

Referenced by getLightmapGroupColor(), getNumLightGroup(), setAutomaticAnimationSet(), and setLightGroupColor().

bool NL3D::CScene::_LightingSystemEnabled [private]
 

Definition at line 680 of file scene.h.

Referenced by CScene(), enableLightingSystem(), and isLightingSystemEnabled().

CPlayListManager NL3D::CScene::_LMAnimsAuto [private]
 

Definition at line 644 of file scene.h.

Referenced by animate(), release(), and setAutomaticAnimationSet().

CLodCharacterManager* NL3D::CScene::_LodCharacterManager [private]
 

Definition at line 670 of file scene.h.

uint NL3D::CScene::_MaxSkeletonsInNotCLodForm [private]
 

Definition at line 709 of file scene.h.

Referenced by CScene(), getMaxSkeletonsInNotCLodForm(), and setMaxSkeletonsInNotCLodForm().

std::set<CTransform*> NL3D::CScene::_Models [private]
 

Definition at line 737 of file scene.h.

Referenced by createModel(), deleteModel(), and release().

bool NL3D::CScene::_NextRenderProfile [private]
 

Definition at line 715 of file scene.h.

Referenced by CScene(), isNextRenderProfile(), profileNextRender(), and render().

uint64 NL3D::CScene::_NumRender [private]
 

Definition at line 618 of file scene.h.

Referenced by CScene(), getNumRender(), and render().

CParticleSystemManager NL3D::CScene::_ParticleSystemManager [private]
 

Definition at line 687 of file scene.h.

Referenced by getParticleSystemManager(), and render().

CQuadGridClipManager* NL3D::CScene::_QuadGridClipManager [private]
 

Definition at line 675 of file scene.h.

TGlobalAnimationTime NL3D::CScene::_RealTime [private]
 

Definition at line 606 of file scene.h.

Referenced by animate(), and CScene().

set< CScene::CModelEntry > NL3D::CScene::_RegModels [static, private]
 

Definition at line 982 of file scene.cpp.

Referenced by createModel(), and registerModel().

uint NL3D::CScene::_ShadowMapBlurSize [private]
 

Definition at line 751 of file scene.h.

Referenced by CScene(), getShadowMapBlurSize(), and setShadowMapBlurSize().

float NL3D::CScene::_ShadowMapDistFadeEnd [private]
 

Definition at line 753 of file scene.h.

Referenced by CScene(), getShadowMapDistFadeEnd(), and setShadowMapDistFadeEnd().

float NL3D::CScene::_ShadowMapDistFadeStart [private]
 

Definition at line 752 of file scene.h.

Referenced by CScene(), getShadowMapDistFadeStart(), and setShadowMapDistFadeStart().

uint NL3D::CScene::_ShadowMapMaxCasterAround [private]
 

Definition at line 755 of file scene.h.

Referenced by CScene(), getShadowMapMaxCasterAround(), and setShadowMapMaxCasterAround().

uint NL3D::CScene::_ShadowMapMaxCasterInScreen [private]
 

Definition at line 754 of file scene.h.

Referenced by CScene(), getShadowMapMaxCasterInScreen(), and setShadowMapMaxCasterInScreen().

float NL3D::CScene::_ShadowMapMaxDepth [private]
 

Definition at line 750 of file scene.h.

Referenced by CScene(), getShadowMapMaxDepth(), and setShadowMapMaxDepth().

uint NL3D::CScene::_ShadowMapTextureSize [private]
 

Definition at line 749 of file scene.h.

Referenced by CScene(), getShadowMapTextureSize(), and setShadowMapTextureSize().

CShapeBank* NL3D::CScene::_ShapeBank [private]
 

Definition at line 657 of file scene.h.

TSkeletonModelList NL3D::CScene::_SkeletonModelList [private]
 

Definition at line 707 of file scene.h.

Referenced by appendSkeletonModelToList(), eraseSkeletonModelToList(), getSkeletonModelListBegin(), and getSkeletonModelListEnd().

CTransform* NL3D::CScene::_UpdateModelList [private]
 

Definition at line 738 of file scene.h.

Referenced by CScene(), NL3D::CTransform::linkToUpdateList(), release(), NL3D::CTransform::unlinkFromUpdateList(), and updateModels().

CViewport NL3D::CScene::_Viewport [private]
 

Definition at line 600 of file scene.h.

TWaitingInstancesMMap NL3D::CScene::_WaitingInstances [private]
 

Definition at line 660 of file scene.h.

Referenced by createInstanceAsync(), and updateWaitingInstances().

IWaterSurfaceAddedCallback* NL3D::CScene::_WaterCallback [private]
 

Definition at line 717 of file scene.h.

Referenced by CScene(), getWaterCallback(), and setWaterCallback().

CAnimDetailTrav NL3D::CScene::AnimDetailTrav [private]
 

Definition at line 626 of file scene.h.

Referenced by createModel(), CScene(), getAnimDetailTrav(), and render().

UScene::CBenchResults NL3D::CScene::BenchRes
 

Definition at line 531 of file scene.h.

Referenced by NL3D::CSceneUser::getProfileResults(), profileNextRender(), NL3D::CMeshMRMSkinnedGeom::profileSceneRender(), NL3D::CMeshMRMGeom::profileSceneRender(), and NL3D::CMeshGeom::profileSceneRender().

CClipTrav NL3D::CScene::ClipTrav [private]
 

Definition at line 624 of file scene.h.

Referenced by createModel(), CScene(), getClipTrav(), initDefaultRoots(), release(), and render().

CRefPtr<CCamera> NL3D::CScene::CurrentCamera [private]
 

The camera / Viewport.

Definition at line 599 of file scene.h.

Referenced by getCam(), release(), render(), and setCam().

CHrcTrav NL3D::CScene::HrcTrav [private]
 

Definition at line 623 of file scene.h.

Referenced by CScene(), getHrcTrav(), and render().

CLightTrav NL3D::CScene::LightTrav [private]
 

Definition at line 625 of file scene.h.

Referenced by createModel(), CScene(), enableLightingSystem(), getLightTransitionThreshold(), getLightTrav(), getMaxLightContribution(), render(), setLightTransitionThreshold(), and setMaxLightContribution().

CLoadBalancingTrav NL3D::CScene::LoadBalancingTrav [private]
 

Definition at line 627 of file scene.h.

Referenced by createModel(), CScene(), getGroupLoadMaxPolygon(), getGroupNbFaceAsked(), getLoadBalancingTrav(), getNbFaceAsked(), getPolygonBalancingMode(), render(), setGroupLoadMaxPolygon(), and setPolygonBalancingMode().

CRenderTrav NL3D::CScene::RenderTrav [private]
 

Definition at line 628 of file scene.h.

CTransform* NL3D::CScene::Root [private]
 

Definition at line 632 of file scene.h.

Referenced by createModel(), CScene(), getRoot(), initDefaultRoots(), and release().

CCluster* NL3D::CScene::RootCluster [private]
 

Definition at line 634 of file scene.h.

CRootModel* NL3D::CScene::SonsOfAncestorSkeletonModelGroup [private]
 

Definition at line 636 of file scene.h.

Referenced by CScene(), initDefaultRoots(), release(), NL3D::CClipTrav::traverse(), and NL3D::CTransform::updateClipTravForAncestorSkeleton().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 07:39:54 2004 for NeL by doxygen 1.3.6