The light traversal. More...
#include <light_trav.h>
Inherits NL3D::CTraversal.
Public Member Functions | |
| CLightTrav (bool bSmallScene) | |
| Constructor. | |
| void | traverse () |
| ITrav/ITravScene Implementation. | |
LightingList. Filled during clip traversal. | |
| void | clearLightedList () |
| Clear the list of lighted models. | |
| void | addLightedModel (CTransform *m) |
| Add a model to the list of lighted models. DOESN'T CHECK if already inserted. | |
| void | reserveLightedList (uint numModels) |
LightingList. Add a PointLightModel to the list. | |
| void | addPointLightModel (CPointLightModel *pl) |
Public Attributes | |
| bool | LightingSystemEnabled |
| CLightingManager | LightingManager |
| The lightingManager, where objects/lights are inserted, and modelContributions are computed. | |
Private Attributes | |
| std::vector< CTransform * > | _LightedList |
| uint32 | _CurrentNumVisibleModels |
| CFastPtrList< CPointLightModel > | _DynamicLightList |
The light traversal.
The purpose of this traversal is to compute lighting on lightable objects.
Lightable objects can be CTransform only.
NB: see CScene for 3d conventions (orthonormal basis...)
Definition at line 58 of file light_trav.h.
| NL3D::CLightTrav::CLightTrav | ( | bool | bSmallScene | ) |
Constructor.
Definition at line 44 of file light_trav.cpp.
References _CurrentNumVisibleModels, _LightedList, and LightingSystemEnabled.
| void NL3D::CLightTrav::addLightedModel | ( | CTransform * | m | ) | [inline] |
Add a model to the list of lighted models. DOESN'T CHECK if already inserted.
Definition at line 75 of file light_trav.h.
References _CurrentNumVisibleModels, and _LightedList.
Referenced by NL3D::CClipTrav::clipShadowCasters(), NL3D::CParticleSystemModel::insertInVisibleList(), and NL3D::CTransform::traverseClip().
| void NL3D::CLightTrav::addPointLightModel | ( | CPointLightModel * | pl | ) |
Definition at line 60 of file light_trav.cpp.
References _DynamicLightList, NL3D::CPointLightModel::_PointLightNode, and NL3D::CFastPtrList< T >::insert().
Referenced by NL3D::CPointLightModel::initModel().
| void NL3D::CLightTrav::clearLightedList | ( | ) |
Clear the list of lighted models.
Definition at line 53 of file light_trav.cpp.
References _CurrentNumVisibleModels.
Referenced by NL3D::CClipTrav::traverse().
| void NL3D::CLightTrav::reserveLightedList | ( | uint | numModels | ) |
Definition at line 128 of file light_trav.cpp.
References _LightedList.
Referenced by NL3D::CScene::createModel().
| void NL3D::CLightTrav::traverse | ( | ) |
ITrav/ITravScene Implementation.
Definition at line 67 of file light_trav.cpp.
References _CurrentNumVisibleModels, _DynamicLightList, _LightedList, NL3D::CFastPtrList< T >::begin(), NLMISC::CRGBA::Black, NL3D::CLightingManager::clearDynamicLights(), NL3D::CScene::getDriver(), H_AUTO, NLMISC::CVector::K, LightingManager, LightingSystemEnabled, NL3D::CTraversal::Scene, NL3D::IDriver::setLightMapDynamicLight(), NL3D::CLight::setupDirectional(), and NL3D::CFastPtrList< T >::size().
Referenced by NL3D::CScene::renderPart().
Definition at line 103 of file light_trav.h.
Referenced by addLightedModel(), clearLightedList(), CLightTrav(), and traverse().
Definition at line 106 of file light_trav.h.
Referenced by addPointLightModel(), and traverse().
std::vector<CTransform*> NL3D::CLightTrav::_LightedList [private] |
Definition at line 102 of file light_trav.h.
Referenced by addLightedModel(), CLightTrav(), reserveLightedList(), and traverse().
The lightingManager, where objects/lights are inserted, and modelContributions are computed.
Definition at line 95 of file light_trav.h.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CScene::getLightTransitionThreshold(), NL3D::CScene::getMaxLightContribution(), NL3D::CScene::setLightTransitionThreshold(), NL3D::CScene::setMaxLightContribution(), traverse(), NL3D::CTransform::traverseLight(), NL3D::CPointLightModel::traverseLight(), NL3D::CTransform::unfreezeHRC(), NL3D::CTransform::update(), and NL3D::CTransform::~CTransform().
Definition at line 92 of file light_trav.h.
Referenced by CLightTrav(), NL3D::CScene::enableLightingSystem(), and traverse().
1.6.1