Main Page   Class Hierarchy   Compound List   File List   Compound Members  

light Class Reference

Simple light point source. More...

#include <light.hpp>

Inheritance diagram for light:

movable List of all members.

Public Methods

 light ()
 ~light ()
 light (camera *viewer, int number, float maxFade=0, float minFade=0, float scale=1.0f)
void draw ()
void drawDim (vector3f distant)
void update ()
void getBoundingBox ()

Public Attributes

cameraviewer
float maxFade
 Distance at which the light is completely dim. More...

float minFade
 Minimum istance at which the light maximally bright.

float scale
 How to scale the brightness- >1.0 will be clamped, so bright lights will wash out.

GLfloat Ka [4]
GLfloat Kd [4]
GLfloat Ks [4]
int GL_LIGHTX
 From 0-7 (or how ever many lights can be handled at once).

bool verbose
 Stdout toggle.


Detailed Description

Simple light point source.

So far just hold the light color parameters and the location.

Orientation is also stored even though a rotated point source is indistuinguishable from the non-rotated.

There's also a visible .obj shell around the light in order to make placement possible (rather than guessing the lights position by looking at it's effect on normal objects).

There's no diminishment with distance, that would be interesting to implement and though I can think of at least one way to do it (objects would be individually lit with a distance scaling factor, and perhaps the distance to the light would also have the object be split up for lighting in order to show a differential across it's surface), I'm curious what the conventional way is.


Member Data Documentation

GLfloat light::Ka[4]
 

Currently lights aren't directional, so only keep a vector of position and orientation doesn't matter. vector3f *position;

float light::maxFade
 

Distance at which the light is completely dim.

maxFade = 0 means no linear scaling -> uniform at any difference


The documentation for this class was generated from the following files:
Generated on Sat May 10 10:09:36 2003 for volume-src-limited by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002