#include <light.hpp>
Inheritance diagram for light:
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 | |
camera * | viewer |
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. |
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.
|
Currently lights aren't directional, so only keep a vector of position and orientation doesn't matter. vector3f *position; |
|
Distance at which the light is completely dim. maxFade = 0 means no linear scaling -> uniform at any difference |