ILightingState Class Reference

Stores lighting parameters. More...

#include <light.h>

Inheritance diagram for ILightingState:

CLightingState

List of all members.

Public Types

enum  { MAX_LIGHTS = 8 }
 Symbolic constant for maximum number of lights available in a ILightingState object. More...

Public Member Functions

virtual ~ILightingState (void)
 Destructor.
virtual void setShowLights (bool enable)=0
 Writes the show-lights flag.
virtual void setLight (int index, const CLight &l)=0
 Sets the light source parameters of an indexed light.
virtual void setMaterial (const CMaterial &m)=0
 Sets the current material parameters.
virtual void setLightingEnabled (bool enable)=0
 Writes lighting-enables state bit.
virtual bool getLight (int index, CLight &l) const =0
 Get parameters of an indexed light source.
virtual void getMaterial (CMaterial &m) const =0
 Get the current material parameters.
virtual bool getLightingEnabled (void) const =0
 Reads the lighting-enabled state bit.


Detailed Description

Stores lighting parameters.

This interface is responsible for storing lighting specific state, like the lighting-enabled flag, light sources and the current material. It basically represents what is defined in the OpenGL specification.

The show-lights flag defines, wether the light sources should be drawn as spheres in the diffuse color of each light source.

The maximum amount of light sources available can be read from the symbolic constant MAX_LIGHTS defined in this interface.

This interface implicitly controls how lights and material are processed. See CLight for additional documentation about light state processing.


Member Enumeration Documentation

anonymous enum

Symbolic constant for maximum number of lights available in a ILightingState object.

The value 8 is the minimum value allowed for the implementation specific constant GL_MAX_LIGHTS.


Constructor & Destructor Documentation

virtual ILightingState::~ILightingState ( void   )  [inline, virtual]

Destructor.


Member Function Documentation

virtual void ILightingState::setShowLights ( bool  enable  )  [pure virtual]

Writes the show-lights flag.

Parameters:
enable The show-lights flag.

Implemented in CLightingState.

virtual void ILightingState::setLight ( int  index,
const CLight l 
) [pure virtual]

Sets the light source parameters of an indexed light.

Parameters:
index Light source index, must be in range [0,MAX_LIGHTS-1].
l Light source parameters.

Implemented in CLightingState.

virtual void ILightingState::setMaterial ( const CMaterial m  )  [pure virtual]

Sets the current material parameters.

Parameters:
m Material parameters.

Implemented in CLightingState.

virtual void ILightingState::setLightingEnabled ( bool  enable  )  [pure virtual]

Writes lighting-enables state bit.

This represents the GL_LIGHTING state bit of OpenGL. The initial state is false.

Parameters:
enable The lighting-enabled state bit.

Implemented in CLightingState.

virtual bool ILightingState::getLight ( int  index,
CLight l 
) const [pure virtual]

Get parameters of an indexed light source.

The call fails, if the light source index is out of range. In that case, results are undefined.

Parameters:
index Light source index, must be in range [0,MAX_LIGHTS-1].
l Buffer that is filled with ligh source parameters.
Returns:
Wether the call succeeded.

Implemented in CLightingState.

virtual void ILightingState::getMaterial ( CMaterial m  )  const [pure virtual]

Get the current material parameters.

Parameters:
m Buffer that is filled with material parameters.

Implemented in CLightingState.

virtual bool ILightingState::getLightingEnabled ( void   )  const [pure virtual]

Reads the lighting-enabled state bit.

Returns:
The lighting-enabled state bit.

Implemented in CLightingState.


The documentation for this class was generated from the following file:
Generated on Sun Mar 2 17:12:32 2008 for Shader Maker by  doxygen 1.5.4