CLight Class Reference

A collection of OpenGL light source parameters. More...

#include <light.h>

List of all members.

Public Member Functions

 CLight (void)
 Constructs a CLight object.
bool getEnabled (void) const
 Reads the enabled bit.
void setEnabled (bool en)
 Writes enabled state bit.
bool getLockedToCamera (void) const
 Reads lock-to-camera state bit.
void setLockedToCamera (bool locked)
 Writes lock-to-camera state bit.
bool getAutoRotate (void) const
 Reads auto-rotate state bit.
void setAutoRotate (bool enable)
 Writes auto-rotate state bit.
vec4_t getPosition (void) const
 Reads light position.
void setPosition (const vec4_t &v)
 Writes light position.
vec4_t getAmbient (void) const
 Reads ambient color.
void setAmbient (const vec4_t &v)
 Writes ambient color.
vec4_t getDiffuse (void) const
 Reads diffuse color.
void setDiffuse (const vec4_t &v)
 Writes diffuse color.
vec4_t getSpecular (void) const
 Reads specular color.
void setSpecular (const vec4_t &v)
 Writes specular color.


Detailed Description

A collection of OpenGL light source parameters.

This class allows storing the most important OpenGL light source parameters like position, colors and the enabled bit. It also supports some application specific state, like a flag wether the light is locked to a camera or not. In the first case, the light position is specified in eye coordinates, in the other case world coordinats. Another feature is a flag, wether a light should be auto-rotated around the origin. This takes only effect, if the light is not locked to the camera position. Auto-rotation can be used to test the behavoir of lighting shaders without manipulating many light positions by hand. The exact auto-rotate transformation is implementation specific.

The methods of this class are only used for reading/writing light source parameters and have no side effects. That's why they are less documented.


Constructor & Destructor Documentation

CLight::CLight ( void   )  [inline]

Constructs a CLight object.

It defaults all colors to back (0,0,0,0) and all state bits (enabled, locked-to-camera, auto-rotate) to False.


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