#include <lightenvironment.h>
Classes | |
| struct | InputLightStruct |
| struct | OutputLightStruct |
Public Types | |
| enum | { MAX_LIGHTS = 4 } |
Public Member Functions | |
| LightEnvironmentClass (void) | |
| ~LightEnvironmentClass (void) | |
| void | Reset (const Vector3 &object_center, const Vector3 &scene_ambient) |
| void | Add_Light (const LightClass &light) |
| void | Pre_Render_Update (const Matrix3D &camera_tm) |
| void | Add_Fill_Light (void) |
| void | Calculate_Fill_Light (void) |
| void | Set_Fill_Intensity (float intensity) |
| const Vector3 & | Get_Equivalent_Ambient (void) const |
| void | Set_Output_Ambient (Vector3 &oa) |
| int | Get_Light_Count (void) const |
| const Vector3 & | Get_Light_Direction (int i) const |
| const Vector3 & | Get_Light_Diffuse (int i) const |
| bool | isPointLight (int i) const |
| float | getPointIrad (int i) const |
| float | getPointOrad (int i) const |
| const Vector3 & | getPointDiffuse (int i) const |
| const Vector3 & | getPointAmbient (int i) const |
| const Vector3 & | getPointCenter (int i) const |
| bool | operator== (const LightEnvironmentClass &that) const |
Static Public Member Functions | |
| static void | Set_Lighting_LOD_Cutoff (float inten) |
| static float | Get_Lighting_LOD_Cutoff (void) |
| static int | Get_Max_Lights () |
Protected Attributes | |
| int | LightCount |
| Vector3 | ObjectCenter |
| InputLightStruct | InputLights [MAX_LIGHTS] |
| Vector3 | OutputAmbient |
| OutputLightStruct | OutputLights [MAX_LIGHTS] |
| InputLightStruct | FillLight |
| float | FillIntensity |
LightEnvironmentClass This class represents an approximation of the local lighting for a given point. The idea is to collect all of the point light sources affecting an object at any given time and create temporary directional light sources representing them. Any distance or directional attenuation will be precalculated into the overall intensity of the light and a vector from the light source to the center of the bounding sphere of the model will be used as the directional component. In addition, the engine will provide the ambient component which will be determined by a combination of the ambient setting for the level and sampling the light maps in the area.
Notes:
Definition at line 73 of file lightenvironment.h.
| anonymous enum |
| Enumerator | |
|---|---|
| MAX_LIGHTS | |
Definition at line 122 of file lightenvironment.h.
| LightEnvironmentClass::LightEnvironmentClass | ( | void | ) |
Definition at line 222 of file lightenvironment.cpp.
| LightEnvironmentClass::~LightEnvironmentClass | ( | void | ) |
Definition at line 232 of file lightenvironment.cpp.
| void LightEnvironmentClass::Add_Fill_Light | ( | void | ) |
Definition at line 343 of file lightenvironment.cpp.
| void LightEnvironmentClass::Add_Light | ( | const LightClass & | light | ) |
Definition at line 245 of file lightenvironment.cpp.
| void LightEnvironmentClass::Calculate_Fill_Light | ( | void | ) |
Definition at line 379 of file lightenvironment.cpp.
|
inline |
Definition at line 101 of file lightenvironment.h.
|
inline |
Definition at line 103 of file lightenvironment.h.
|
inline |
Definition at line 105 of file lightenvironment.h.
|
inline |
Definition at line 104 of file lightenvironment.h.
|
static |
Definition at line 331 of file lightenvironment.cpp.
|
inlinestatic |
Definition at line 121 of file lightenvironment.h.
|
inline |
Definition at line 111 of file lightenvironment.h.
|
inline |
Definition at line 112 of file lightenvironment.h.
|
inline |
Definition at line 110 of file lightenvironment.h.
|
inline |
Definition at line 108 of file lightenvironment.h.
|
inline |
Definition at line 109 of file lightenvironment.h.
|
inline |
Definition at line 107 of file lightenvironment.h.
|
inline |
Definition at line 124 of file lightenvironment.h.
| void LightEnvironmentClass::Pre_Render_Update | ( | const Matrix3D & | camera_tm | ) |
Definition at line 305 of file lightenvironment.cpp.
Definition at line 237 of file lightenvironment.cpp.
|
inline |
Definition at line 96 of file lightenvironment.h.
|
static |
Definition at line 325 of file lightenvironment.cpp.
|
inline |
Definition at line 102 of file lightenvironment.h.
|
protected |
Definition at line 179 of file lightenvironment.h.
|
protected |
Definition at line 178 of file lightenvironment.h.
|
protected |
Definition at line 173 of file lightenvironment.h.
|
protected |
Definition at line 171 of file lightenvironment.h.
|
protected |
Definition at line 172 of file lightenvironment.h.
|
protected |
Definition at line 175 of file lightenvironment.h.
|
protected |
Definition at line 176 of file lightenvironment.h.