|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CLightingManager Class ReferenceOwned by CLightingTrav.
More...
#include <lighting_manager.h>
List of all members.
Detailed Description
Owned by CLightingTrav.
This class compute modelContributions. It gets which dynamic light may influence a model, ask to ILogicInfo the contribution of staticLights then decides which light are best suitable to influence the model.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 60 of file lighting_manager.h.
Constructor & Destructor Documentation
NL3D::CLightingManager::CLightingManager |
( |
|
) |
|
|
|
Constructor.
Definition at line 63 of file lighting_manager.cpp.
References _LightQuadGrid, _LightQuadGridRadiusLimit, _LightTransitionThreshold, _NoAttLightRadius, _OutOfAttLightInfFactor, _StaticLightedModelQuadGrid, NL3D_DEFAULT_LIGHT_TRANSITION_THRESHOLD, NL3D_DEFAULT_NOATT_LIGHT_RADIUS, NL3D_DEFAULT_OUT_OF_ATT_LIGHT_INF_FACTOR, NL3D_LIGHT_QUAD_GRID_ELTSIZE, NL3D_LIGHT_QUAD_GRID_FACTOR, NL3D_LIGHT_QUAD_GRID_RADIUS_LIMIT, NL3D_LIGHT_QUAD_GRID_SIZE, NL3D_QUADGRID_LIGHT_NUM_LEVEL, and setMaxLightContribution. |
Member Function Documentation
void NL3D::CLightingManager::addDynamicLight |
( |
CPointLight * |
light |
) |
|
|
void NL3D::CLightingManager::clearDynamicLights |
( |
|
) |
|
|
const std::vector<CPointLight*>& NL3D::CLightingManager::getAllDynamicLightList |
( |
|
) |
const [inline] |
|
void NL3D::CLightingManager::getDynamicPointLightList |
( |
const CVector & |
worldPos, |
|
|
std::vector< CPointLightInfluence > & |
lightList |
|
) |
[private] |
|
float NL3D::CLightingManager::getLightTransitionThreshold |
( |
|
) |
const [inline] |
|
uint NL3D::CLightingManager::getMaxLightContribution |
( |
|
) |
const [inline] |
|
float NL3D::CLightingManager::getNoAttLightRadius |
( |
|
) |
const [inline] |
|
float NL3D::CLightingManager::getOutOfAttLightInfFactor |
( |
|
) |
const [inline] |
|
void NL3D::CLightingManager::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 121 of file lighting_manager.cpp.
References _LightTransitionThreshold, and NLMISC::clamp. |
void NL3D::CLightingManager::setMaxLightContribution |
( |
uint |
nlights |
) |
|
|
void NL3D::CLightingManager::setNoAttLightRadius |
( |
float |
noAttLightRadius |
) |
|
|
|
Advanced.
When a light has no attenuation, it's still inserted in a quadgrid with some radius and won't influence models beyond. You can setup this radius with this method. Default is 1000m. NB: nlassert(noAttLightRadius>0);
Definition at line 105 of file lighting_manager.cpp.
References _NoAttLightRadius, and nlassert. |
void NL3D::CLightingManager::setOutOfAttLightInfFactor |
( |
float |
outOfAttLightInfFactor |
) |
|
|
|
Advanced.
When a model is out of [AttBegin, AttEnd] of a light, the computed influence of the light used to choose "best lights" is not constant, and is a function of distance multiplied by a factor you can setup here. Default is 0.1f and is good for lights with att like (50, 100) (arbitrary).
Definition at line 113 of file lighting_manager.cpp.
References _OutOfAttLightInfFactor. |
Member Data Documentation
std::vector<CPointLight*> NL3D::CLightingManager::_DynamicLightList [private]
|
|
float NL3D::CLightingManager::_LightQuadGridRadiusLimit[NL3D_QUADGRID_LIGHT_NUM_LEVEL] [private]
|
|
float NL3D::CLightingManager::_LightTransitionThreshold [private]
|
|
uint NL3D::CLightingManager::_MaxLightContribution [private]
|
|
float NL3D::CLightingManager::_NoAttLightRadius [private]
|
|
float NL3D::CLightingManager::_OutOfAttLightInfFactor [private]
|
|
CQuadGrid<CTransform*> NL3D::CLightingManager::_StaticLightedModelQuadGrid[NL3D_QUADGRID_LIGHT_NUM_LEVEL] [private]
|
|
The documentation for this class was generated from the following files:
|
|