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

NL3D::CLightTrav Class Reference

The light traversal. More...

#include <light_trav.h>

Inheritance diagram for NL3D::CLightTrav:

NL3D::ITravScene NL3D::ITrav NLMISC::CRefCount List of all members.

Public Methods

 CLightTrav ()
 Constructor. More...

void setLightModelRoot (CRootModel *lightModelRoot)
 Must init it! More...

IObscreateDefaultObs () const
 This method must create a default observer for this traversal. More...

NLMISC::CClassId getClassId () const
 This function must return the Unique Ident for this traversal class. More...

sint getRenderOrder () const
 Return the order of the traversal. More...

void traverse ()
 Execute the traversal. More...

LightingList. Filled during clip traversal.
void clearLightedList ()
 Clear the list of lighted observers. More...

void addLightedObs (IBaseLightObs *o)
 Add an observer to the list of lighted observers. DOESN'T CHECK if already inserted. More...


Public Attributes

bool LightingSystemEnabled
CLightingManager LightingManager
 The lightingManager, where objects/lights are inserted, and modelContributions are computed. More...

FOR OBSERVERS ONLY. (Read only)
CRootModelLightModelRoot

Private Attributes

std::vector< IBaseLightObs * > _LightedList

Detailed Description

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

See also:
CScene IBaseLightObs
Author:
Lionel Berenguier , Nevrax France
Date:
2000

Definition at line 65 of file light_trav.h.


Constructor & Destructor Documentation

NL3D::CLightTrav::CLightTrav  
 

Constructor.

Definition at line 44 of file light_trav.cpp.

References _LightedList, LightingSystemEnabled, and LightModelRoot.


Member Function Documentation

void NL3D::CLightTrav::addLightedObs IBaseLightObs   o
 

Add an observer to the list of lighted observers. DOESN'T CHECK if already inserted.

Definition at line 73 of file light_trav.cpp.

References _LightedList.

void NL3D::CLightTrav::clearLightedList  
 

Clear the list of lighted observers.

Definition at line 68 of file light_trav.cpp.

References _LightedList.

IObs * NL3D::CLightTrav::createDefaultObs   const [virtual]
 

This method must create a default observer for this traversal.

Any model which doesn't provide (by registerObs() or by inheritance) an observer for this view will be linked with this default observer.

Implements NL3D::ITrav.

Definition at line 61 of file light_trav.cpp.

NLMISC::CClassId NL3D::CLightTrav::getClassId   const [inline, virtual]
 

This function must return the Unique Ident for this traversal class.

Implements NL3D::ITrav.

Definition at line 75 of file light_trav.h.

sint NL3D::CLightTrav::getRenderOrder   const [inline, virtual]
 

Return the order of the traversal.

This is usefull for CScene::render() method. It indicate when the traversal is called. Order for basic traversal are:

Implements NL3D::ITravScene.

Definition at line 76 of file light_trav.h.

void NL3D::CLightTrav::setLightModelRoot CRootModel   lightModelRoot
 

Must init it!

Definition at line 53 of file light_trav.cpp.

References LightModelRoot, and nlassert.

void NL3D::CLightTrav::traverse   [virtual]
 

Execute the traversal.

CScene::render() will call this method, to execute the traversal.

Implements NL3D::ITravScene.

Definition at line 80 of file light_trav.cpp.

References _LightedList, H_AUTO, LightingManager, LightingSystemEnabled, LightModelRoot, and nlassert.


Member Data Documentation

std::vector<IBaseLightObs*> NL3D::CLightTrav::_LightedList [private]
 

Definition at line 114 of file light_trav.h.

Referenced by addLightedObs, clearLightedList, CLightTrav, and traverse.

CLightingManager NL3D::CLightTrav::LightingManager
 

The lightingManager, where objects/lights are inserted, and modelContributions are computed.

Definition at line 95 of file light_trav.h.

Referenced by traverse.

bool NL3D::CLightTrav::LightingSystemEnabled
 

Definition at line 82 of file light_trav.h.

Referenced by CLightTrav, and traverse.

CRootModel* NL3D::CLightTrav::LightModelRoot
 

Definition at line 108 of file light_trav.h.

Referenced by CLightTrav, setLightModelRoot, and traverse.


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