|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CScene Class ReferenceA CScene, which own a list of Render Traversals, and a render() method.
More...
#include <scene.h>
Inheritance diagram for NL3D::CScene:
List of all members.
Private |
typedef std::list< CSkeletonModel * > | TSkeletonModelList |
typedef TSkeletonModelList::iterator | ItSkeletonModelList |
ItSkeletonModelList | appendSkeletonModelToList (CSkeletonModel *skel) |
| Private. More...
|
void | eraseSkeletonModelToList (ItSkeletonModelList it) |
ItSkeletonModelList | getSkeletonModelListBegin () |
ItSkeletonModelList | getSkeletonModelListEnd () |
LoadBalancing mgt. |
enum | TPolygonBalancingMode { PolygonBalancingOff = 0,
PolygonBalancingOn,
PolygonBalancingClamp,
CountPolygonBalancing
} |
| The mode of polygon balancing. More...
|
float | getNbFaceAsked () const |
| Get the last face count asked from the instances before reduction. More...
|
void | setGroupLoadMaxPolygon (const std::string &group, uint nFaces) |
| Set the number of faces wanted for a LoadBlancingGroup. More...
|
uint | getGroupLoadMaxPolygon (const std::string &group) |
| Get the number of faces wanted for a LoadBlancingGroup. More...
|
float | getGroupNbFaceAsked (const std::string &group) const |
| Get the last face count asked from the instances before reduction. More...
|
void | setPolygonBalancingMode (TPolygonBalancingMode polBalMode) |
| Set the PolygonBalancingMode. More...
|
TPolygonBalancingMode | getPolygonBalancingMode () const |
| Get the PolygonBalancingMode. More...
|
void | setMaxSkeletonsInNotCLodForm (uint m) |
| LoadBalancing for CLod and Skeletons. More...
|
uint | getMaxSkeletonsInNotCLodForm () const |
Shape/Instances. |
typedef std::multimap< std::string,
CTransformShape ** > | TWaitingInstancesMMap |
CShapeBank * | _ShapeBank |
TWaitingInstancesMMap | _WaitingInstances |
CInstanceGroup * | _GlobalInstanceGroup |
Public Types |
Public Methods |
void | updateWaitingInstances (double systemTimeEllapsed) |
| Particle system handling (remove the resources of those which are too far, as their clusters may not have been parsed). More...
|
CInstanceGroup * | getGlobalInstanceGroup () |
TGlobalAnimationTime | getCurrentTime (void) const |
| get the current time of the scene, in second. It start from 0 (at the firt call of animate). More...
|
TAnimationTime | getEllapsedTime (void) const |
| get the ellapsed time (in second) between the last 2 calls of animate. More...
|
double | getCurrentSystemTime () const |
| 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(). More...
|
double | getEllapsedSystemTime () const |
| get the ellapsed time (in second) between the last 2 calls of render(). More...
|
uint64 | getNumRender () const |
| get the number of time render has been called. More...
|
CParticleSystemManager & | getParticleSystemManager () |
| Get a ref. to the particle system manager. You shouldn't call this (has methods for private processing). More...
|
void | setAutomaticAnimationSet (CAnimationSet *as) |
| set the automatic animation set used by this scene. It is stored as a smart pointer. More...
|
CAnimationSet * | getAutomaticAnimationSet () const |
| Get a reference to the set of automatic animations. More...
|
CAsyncTextureManager * | getAsyncTextureManager () const |
| Get the async texture manager. NULL if was not setuped. More...
|
void | setAsyncTextureManager (CAsyncTextureManager *mgr) |
| Set the async texture manager. More...
|
|
| CScene () |
| Constructor. More...
|
| ~CScene () |
| Destructor. release(). More...
|
void | initDefaultTravs () |
| Create / register the 5 basic traversals:CHrcTrav, CClipTrav, CLightTrav, CAnimDetailTrav, CLoadBalancingTrav, CRenderTravInit. More...
|
void | initDefaultRoots () |
| Create/setRoot the defaults models roots: a CTransform and a CLightGroup. More...
|
void | initGlobalnstanceGroup () |
| Create the world instance group (with only one cluster). More...
|
void | initCoarseMeshManager () |
| Create coarse meshes manager. More...
|
void | initQuadGridClipManager () |
| init QuadGridClipManager. More...
|
void | setDriver (IDriver *drv) |
| Set the driver to render Traversal. More...
|
IDriver * | getDriver () const |
| Get the driver of render Traversal. More...
|
void | addTrav (ITrav *v) |
| Add a ITrav or a ITravScene to the scene. More...
|
virtual void | release () |
| Release all relative to the scene (Models, traversals...)... More...
|
|
void | render (bool doHrcPass=true) |
| Render the scene, via the registered ITravScene, from the CurrentCamera view. More...
|
|
void | setCam (CCamera *cam) |
| Set/Get the current camera/Viewport. More...
|
CCamera * | getCam () |
void | setViewport (const class CViewport &viewport) |
CViewport | getViewport () |
|
void | setShapeBank (CShapeBank *pShapeBank) |
| Set the shape bank. More...
|
CShapeBank * | getShapeBank (void) |
| Get the shape bank. More...
|
const CShapeBank * | getShapeBank (void) const |
| Get the shape bank (const version). More...
|
virtual CTransformShape * | createInstance (const std::string &shapeName) |
| Create a model, instance of the shape "shapename". More...
|
void | createInstanceAsync (const std::string &shapeName, CTransformShape **pInstance) |
| Create an instance, if the shape is not present, load the shape asynchronously. More...
|
void | deleteInstance (CTransformShape *model) |
| Delete an instance via his pointer. More...
|
|
void | loadLightmapAutoAnim (const std::string &) |
void | setAutoAnim (CAnimation *pAnim) |
void | animate (TGlobalAnimationTime atTime) |
void | addInstanceGroupForLightAnimation (CInstanceGroup *ig) |
| Add an IG for auto PointLight Factor animation. called by CInstanceGroup::addToScene(). More...
|
void | removeInstanceGroupForLightAnimation (CInstanceGroup *ig) |
| Remove an IG for auto PointLight Factor animation. called by CInstanceGroup::removeFromScene(). More...
|
|
CCoarseMeshManager * | getStaticCoarseMeshManager () |
CCoarseMeshManager * | getDynamicCoarseMeshManager () |
void | setCoarseMeshLightingUpdate (uint8 period) |
| Each coarseMesh lighting will be updated every "period" frame. More...
|
uint8 | getCoarseMeshLightingUpdate () const |
| see setCoarseMeshLightingUpdate(). More...
|
CLodCharacterManager * | getLodCharacterManager () const |
| Get the LodCharacterManager. NULL if user did not set it. (done in DriverUser). More...
|
void | setLodCharacterManager (CLodCharacterManager *m) |
| set the LodCharacterManager. More...
|
|
void | setLayersRenderingOrder (bool directOrder=true) |
| Set the order or rendering for transparent objects. More...
|
bool | getLayersRenderingOrder () const |
|
void | enableLightingSystem (bool enable) |
| Enable Scene Lighting system. More...
|
bool | isLightingSystemEnabled () const |
| see enableLightingSystem. More...
|
void | setAmbientGlobal (NLMISC::CRGBA ambient) |
| set the global Ambient used for the scene. Default to (50, 50, 50). More...
|
void | setSunAmbient (NLMISC::CRGBA ambient) |
| set the Ambient of the Sun used for the scene. More...
|
void | setSunDiffuse (NLMISC::CRGBA diffuse) |
| set the Diffuse of the Sun used for the scene. More...
|
void | setSunSpecular (NLMISC::CRGBA specular) |
| set the Specular of the Sun used for the scene. More...
|
void | setSunDirection (const NLMISC::CVector &direction) |
| set the Direction of the Sun used for the scene. More...
|
NLMISC::CRGBA | getAmbientGlobal () const |
| get the global Ambient used for the scene. Default to (50, 50, 50). More...
|
NLMISC::CRGBA | getSunAmbient () const |
| get the Ambient of the Sun used for the scene. More...
|
NLMISC::CRGBA | getSunDiffuse () const |
| get the Diffuse of the Sun used for the scene. More...
|
NLMISC::CRGBA | getSunSpecular () const |
| get the Specular of the Sun used for the scene. More...
|
NLMISC::CVector | getSunDirection () const |
| get the Direction of the Sun used for the scene. More...
|
void | setMaxLightContribution (uint nlights) |
| setup the max number of point light that can influence a model. More...
|
uint | getMaxLightContribution () const |
| -
See also:
-
setMaxLightContribution().
More...
|
void | setLightTransitionThreshold (float lightTransitionThreshold) |
| Advanced. More...
|
float | getLightTransitionThreshold () const |
| -
See also:
-
getLightTransitionThreshold().
More...
|
|
void | setGlobalWindPower (float gwp) |
| Weather mgt. More...
|
float | getGlobalWindPower () const |
| get the current windPower. More...
|
void | setGlobalWindDirection (const CVector &gwd) |
| Set the current windDirection for all the scene. dir.z set to 0 and vector normalized. More...
|
const CVector & | getGlobalWindDirection () const |
| get the current windDirection. More...
|
|
CHrcTrav * | getHrcTrav () const |
CClipTrav * | getClipTrav () const |
CLightTrav * | getLightTrav () const |
CAnimDetailTrav * | getAnimDetailTrav () const |
CLoadBalancingTrav * | getLoadBalancingTrav () const |
CRenderTrav * | getRenderTrav () const |
CSkipModel * | getSkipModelRoot () const |
Static Public Methods |
|
void | registerBasics () |
| Register Basic models and observers. More...
|
Private Types |
typedef std::map< sint, ITravScene * > | TTravMap |
typedef std::set< CInstanceGroup * > | TAnimatedIgSet |
typedef TAnimatedIgSet::iterator | ItAnimatedIgSet |
Private Attributes |
TTravMap | RenderTraversals |
CRefPtr< CCamera > | CurrentCamera |
| The camera / Viewport. More...
|
CViewport | _Viewport |
TGlobalAnimationTime | _CurrentTime |
TGlobalAnimationTime | _RealTime |
bool | _FirstAnimateCall |
TAnimationTime | _EllapsedTime |
double | _DeltaSystemTimeBetweenRender |
double | _GlobalSystemTime |
uint64 | _NumRender |
CTransform * | Root |
CSkipModel * | SkipModelRoot |
CRootModel * | SonsOfAncestorSkeletonModelGroup |
CRootModel * | LightModelRoot |
CAnimationSet | _LightmapAnimations |
std::set< CAnimatedLightmap * > | _AnimatedLightmap |
CPlayListManager | _LMAnimsAuto |
TAnimatedIgSet | _AnimatedIgSet |
bool | _LightingSystemEnabled |
uint8 | _CoarseMeshLightingUpdate |
| set setCoarseMeshLightingUpdate. More...
|
NLMISC::CSmartPtr< CAnimationSet > | _AutomaticAnimationSet |
CAsyncTextureManager * | _AsyncTextureManager |
TSkeletonModelList | _SkeletonModelList |
uint | _MaxSkeletonsInNotCLodForm |
|
CHrcTrav * | HrcTrav |
CClipTrav * | ClipTrav |
CLightTrav * | LightTrav |
CAnimDetailTrav * | AnimDetailTrav |
CLoadBalancingTrav * | LoadBalancingTrav |
CRenderTrav * | RenderTrav |
|
CRefPtr< CCoarseMeshManager > | _StaticCoarseMeshManager |
CRefPtr< CCoarseMeshManager > | _DynamicCoarseMeshManager |
CLodCharacterManager * | _LodCharacterManager |
|
CQuadGridClipManager | _QuadGridClipManager |
|
CParticleSystemManager | _ParticleSystemManager |
|
float | _GlobalWindPower |
CVector | _GlobalWindDirection |
Detailed Description
A CScene, which own a list of Render Traversals, and a render() method.
USER RULES:
- Before creating any CScene, call the cool method CScene::registerBasics(), to register baisc models and observers.
- Create a CScene (NB: may be static
CScene scene;) . - call first initDefaultRoot() to create / register automatically the 5 basic traversals:
- add others user-specified traversals with addTrav().
- initRootModels() to create/setRoot the defaults models roots for the basic traversals:
- set your driver for this scene with setDriver().
- create any other model with createModel() (such as a camera).
- Specify a Camera (SmartPtr-ed !!)
- render().
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:\n The scene has an instance Managagement:
- IShape design the object that is instancied (a mesh as example).
- ITransformShape is the instance, which smart_point to a IShape.
- user can add shape manually in the scene CShapeBank with CShapeBank::add (), or remove them with CShapeBank::release ().
- user create instance of a shape with CScene::createInstance(string shapeName); This create/load auto the shape if needed (searching in CPath, shapename must be a valid file name), and then create the instance, with help of IShape::createInstance().
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 127 of file scene.h.
Member Typedef Documentation
typedef TAnimatedIgSet::iterator NL3D::CScene::ItAnimatedIgSet [private]
|
|
typedef TSkeletonModelList::iterator NL3D::CScene::ItSkeletonModelList
|
|
typedef std::set<CInstanceGroup*> NL3D::CScene::TAnimatedIgSet [private]
|
|
typedef std::multimap<std::string,CTransformShape**> NL3D::CScene::TWaitingInstancesMMap [private]
|
|
Member Enumeration Documentation
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 301 of file scene.h. |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 124 of file scene.cpp.
References _AsyncTextureManager, _CoarseMeshLightingUpdate, _CurrentTime, _DynamicCoarseMeshManager, _EllapsedTime, _FirstAnimateCall, _GlobalWindDirection, _GlobalWindPower, _LightingSystemEnabled, _LodCharacterManager, _MaxSkeletonsInNotCLodForm, _NumRender, _RealTime, _ShapeBank, _StaticCoarseMeshManager, AnimDetailTrav, ClipTrav, HrcTrav, LightModelRoot, LightTrav, LoadBalancingTrav, RenderTrav, Root, SkipModelRoot, and SonsOfAncestorSkeletonModelGroup. |
NL3D::CScene::~CScene |
( |
|
) |
|
|
Member Function Documentation
void NL3D::CScene::addInstanceGroupForLightAnimation |
( |
CInstanceGroup * |
ig |
) |
|
|
void NL3D::CScene::addTrav |
( |
ITrav * |
v |
) |
|
|
|
Add a ITrav or a ITravScene to the scene.
If not a ITravScene (tested with help of dynamic_cast) or if trav->getRenderOrder()==0, The traversal is not added to the "render traversal list", else it is. Such a traversal will be traverse() -ed in the order given. The getRenderOrder() is called only in the addTrav() method (so this is a static information).
Reimplemented from NL3D::CMOT.
Definition at line 353 of file scene.cpp.
References nlassert, RenderTraversals, and v.
Referenced by initDefaultTravs. |
virtual CTransformShape* NL3D::CScene::createInstance |
( |
const std::string & |
shapeName |
) |
[virtual] |
|
|
Create a model, instance of the shape "shapename".
If not present, try to load "shapename" via the CPath. If fails, return NULL. |
void NL3D::CScene::createInstanceAsync |
( |
const std::string & |
shapeName, |
|
|
CTransformShape ** |
pInstance |
|
) |
|
|
|
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. |
void NL3D::CScene::enableLightingSystem |
( |
bool |
enable |
) |
|
|
|
get the global Ambient used for the scene. Default to (50, 50, 50).
Definition at line 872 of file scene.cpp.
References RenderTrav. |
CAnimationSet* NL3D::CScene::getAutomaticAnimationSet |
( |
|
) |
const [inline] |
|
CCamera* NL3D::CScene::getCam |
( |
|
) |
[inline] |
|
CClipTrav* NL3D::CScene::getClipTrav |
( |
|
) |
const [inline] |
|
uint8 NL3D::CScene::getCoarseMeshLightingUpdate |
( |
|
) |
const [inline] |
|
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 263 of file scene.h.
References _GlobalSystemTime. |
IDriver * NL3D::CScene::getDriver |
( |
|
) |
const |
|
double NL3D::CScene::getEllapsedSystemTime |
( |
|
) |
const [inline] |
|
const CVector& NL3D::CScene::getGlobalWindDirection |
( |
|
) |
const [inline] |
|
float NL3D::CScene::getGlobalWindPower |
( |
|
) |
const [inline] |
|
uint NL3D::CScene::getGroupLoadMaxPolygon |
( |
const std::string & |
group |
) |
|
|
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 786 of file scene.cpp.
References LoadBalancingTrav, and nlassert. |
CHrcTrav* NL3D::CScene::getHrcTrav |
( |
|
) |
const [inline] |
|
bool NL3D::CScene::getLayersRenderingOrder |
( |
|
) |
const |
|
float NL3D::CScene::getLightTransitionThreshold |
( |
|
) |
const |
|
CLightTrav* NL3D::CScene::getLightTrav |
( |
|
) |
const [inline] |
|
|
Get the LodCharacterManager. NULL if user did not set it. (done in DriverUser).
Definition at line 337 of file scene.h.
References _LodCharacterManager. |
uint NL3D::CScene::getMaxLightContribution |
( |
|
) |
const |
|
uint NL3D::CScene::getMaxSkeletonsInNotCLodForm |
( |
|
) |
const [inline] |
|
float NL3D::CScene::getNbFaceAsked |
( |
|
) |
const |
|
uint64 NL3D::CScene::getNumRender |
( |
|
) |
const [inline] |
|
|
get the number of time render has been called.
Definition at line 269 of file scene.h.
References _NumRender. |
|
Get a ref. to the particle system manager. You shouldn't call this (has methods for private processing).
Definition at line 824 of file scene.cpp.
References _ParticleSystemManager. |
CRenderTrav* NL3D::CScene::getRenderTrav |
( |
|
) |
const [inline] |
|
const CShapeBank* NL3D::CScene::getShapeBank |
( |
void |
|
) |
const [inline] |
|
CShapeBank* NL3D::CScene::getShapeBank |
( |
void |
|
) |
[inline] |
|
CSkipModel* NL3D::CScene::getSkipModelRoot |
( |
|
) |
const [inline] |
|
|
get the Ambient of the Sun used for the scene.
Definition at line 876 of file scene.cpp.
References RenderTrav. |
|
get the Diffuse of the Sun used for the scene.
Definition at line 880 of file scene.cpp.
References RenderTrav. |
|
get the Direction of the Sun used for the scene.
Definition at line 888 of file scene.cpp.
References RenderTrav. |
|
get the Specular of the Sun used for the scene.
Definition at line 884 of file scene.cpp.
References RenderTrav. |
CViewport NL3D::CScene::getViewport |
( |
|
) |
[inline] |
|
void NL3D::CScene::initCoarseMeshManager |
( |
|
) |
|
|
void NL3D::CScene::initDefaultRoots |
( |
|
) |
|
|
|
Create/setRoot the defaults models roots: a CTransform and a CLightGroup.
Definition at line 262 of file scene.cpp.
References AnimDetailTrav, ClipTrav, NL3D::CMOT::createModel, HrcTrav, LightModelRoot, LightTrav, LoadBalancingTrav, RenderTrav, Root, NL3D::RootModelId, NL3D::SkipModelId, SkipModelRoot, SonsOfAncestorSkeletonModelGroup, and NL3D::TransformId. |
void NL3D::CScene::initDefaultTravs |
( |
|
) |
|
|
|
Create / register the 5 basic traversals:CHrcTrav, CClipTrav, CLightTrav, CAnimDetailTrav, CLoadBalancingTrav, CRenderTravInit.
Definition at line 241 of file scene.cpp.
References addTrav, AnimDetailTrav, ClipTrav, HrcTrav, LightTrav, LoadBalancingTrav, NL3D_MEM_MOT, and RenderTrav. |
void NL3D::CScene::initGlobalnstanceGroup |
( |
|
) |
|
|
void NL3D::CScene::initQuadGridClipManager |
( |
|
) |
|
|
bool NL3D::CScene::isLightingSystemEnabled |
( |
|
) |
const [inline] |
|
void NL3D::CScene::loadLightmapAutoAnim |
( |
const std::string & |
|
) |
|
|
void NL3D::CScene::registerBasics |
( |
|
) |
[static] |
|
|
Register Basic models and observers.
Definition at line 93 of file scene.cpp. |
void NL3D::CScene::release |
( |
|
) |
[virtual] |
|
|
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).
Reimplemented from NL3D::CMOT.
Definition at line 164 of file scene.cpp.
References _LodCharacterManager, _QuadGridClipManager, _ShapeBank, AnimDetailTrav, ClipTrav, CurrentCamera, NL3D::CMOT::getNumTrav, NL3D::CMOT::getTrav, HrcTrav, LightModelRoot, LightTrav, LoadBalancingTrav, RenderTrav, RenderTraversals, Root, SkipModelRoot, and SonsOfAncestorSkeletonModelGroup.
Referenced by ~CScene. |
void NL3D::CScene::removeInstanceGroupForLightAnimation |
( |
CInstanceGroup * |
ig |
) |
|
|
void NL3D::CScene::render |
( |
bool |
doHrcPass = true |
) |
|
|
|
Render the scene, via the registered ITravScene, 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). |
Definition at line 374 of file scene.cpp.
References _DeltaSystemTimeBetweenRender, _GlobalSystemTime, _NumRender, _ParticleSystemManager, _QuadGridClipManager, _Viewport, AnimDetailTrav, NLMISC::clamp, ClipTrav, CurrentCamera, NLMISC::CTime::getPerformanceTime, HrcTrav, NL3D::HrcTravId, LightTrav, LoadBalancingTrav, nlassert, RenderTrav, RenderTraversals, NLMISC::CTime::ticksToSecond, and updateWaitingInstances. |
|
set the global Ambient used for the scene. Default to (50, 50, 50).
Definition at line 849 of file scene.cpp.
References RenderTrav. |
void NL3D::CScene::setAutoAnim |
( |
CAnimation * |
pAnim |
) |
|
|
void NL3D::CScene::setAutomaticAnimationSet |
( |
CAnimationSet * |
as |
) |
[inline] |
|
void NL3D::CScene::setCam |
( |
CCamera * |
cam |
) |
[inline] |
|
void NL3D::CScene::setCoarseMeshLightingUpdate |
( |
uint8 |
period |
) |
|
|
void NL3D::CScene::setDriver |
( |
IDriver * |
drv |
) |
|
|
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 951 of file scene.cpp.
References _GlobalWindDirection. |
void NL3D::CScene::setGlobalWindPower |
( |
float |
gwp |
) |
|
|
void NL3D::CScene::setGroupLoadMaxPolygon |
( |
const std::string & |
group, |
|
|
uint |
nFaces |
|
) |
|
|
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 810 of file scene.cpp.
References nlassert, and RenderTrav. |
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 904 of file scene.cpp.
References LightTrav. |
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 895 of file scene.cpp.
References LightTrav. |
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 312 of file scene.h.
References _MaxSkeletonsInNotCLodForm. |
void NL3D::CScene::setShapeBank |
( |
CShapeBank * |
pShapeBank |
) |
|
|
|
set the Ambient of the Sun used for the scene.
Definition at line 853 of file scene.cpp.
References RenderTrav. |
|
set the Diffuse of the Sun used for the scene.
Definition at line 857 of file scene.cpp.
References RenderTrav. |
|
set the Direction of the Sun used for the scene.
Definition at line 865 of file scene.cpp.
References RenderTrav. |
|
set the Specular of the Sun used for the scene.
Definition at line 861 of file scene.cpp.
References RenderTrav. |
void NL3D::CScene::setViewport |
( |
const class CViewport & |
viewport |
) |
[inline] |
|
void NL3D::CScene::updateWaitingInstances |
( |
double |
systemTimeEllapsed |
) |
|
|
|
Particle system handling (remove the resources of those which are too far, as their clusters may not have been parsed).
-
Parameters:
-
systemTimeEllapsed |
: the time between 2 calls to updateWaitingInstances, in seconds |
Definition at line 448 of file scene.cpp.
References _ShapeBank, and _WaitingInstances.
Referenced by render. |
Member Data Documentation
uint8 NL3D::CScene::_CoarseMeshLightingUpdate [private]
|
|
double NL3D::CScene::_DeltaSystemTimeBetweenRender [private]
|
|
bool NL3D::CScene::_FirstAnimateCall [private]
|
|
double NL3D::CScene::_GlobalSystemTime [private]
|
|
CVector NL3D::CScene::_GlobalWindDirection [private]
|
|
float NL3D::CScene::_GlobalWindPower [private]
|
|
bool NL3D::CScene::_LightingSystemEnabled [private]
|
|
uint NL3D::CScene::_MaxSkeletonsInNotCLodForm [private]
|
|
uint64 NL3D::CScene::_NumRender [private]
|
|
CRefPtr<CCamera> NL3D::CScene::CurrentCamera [private]
|
|
CHrcTrav* NL3D::CScene::HrcTrav [private]
|
|
CRootModel* NL3D::CScene::LightModelRoot [private]
|
|
|
Definition at line 505 of file scene.h.
Referenced by CScene, enableLightingSystem, getLightTransitionThreshold, getLightTrav, getMaxLightContribution, initDefaultRoots, initDefaultTravs, release, render, setLightTransitionThreshold, and setMaxLightContribution. |
|
Definition at line 507 of file scene.h.
Referenced by CScene, getGroupLoadMaxPolygon, getGroupNbFaceAsked, getLoadBalancingTrav, getNbFaceAsked, getPolygonBalancingMode, initDefaultRoots, initDefaultTravs, release, render, setGroupLoadMaxPolygon, and setPolygonBalancingMode. |
|
Definition at line 508 of file scene.h.
Referenced by CScene, enableLightingSystem, getAmbientGlobal, getDriver, getLayersRenderingOrder, getRenderTrav, getSunAmbient, getSunDiffuse, getSunDirection, getSunSpecular, initDefaultRoots, initDefaultTravs, release, render, setAmbientGlobal, setDriver, setLayersRenderingOrder, setSunAmbient, setSunDiffuse, setSunDirection, and setSunSpecular. |
TTravMap NL3D::CScene::RenderTraversals [private]
|
|
CRootModel* NL3D::CScene::SonsOfAncestorSkeletonModelGroup [private]
|
|
The documentation for this class was generated from the following files:
|
|