#include <vegetable_light_ex.h>
Nevrax France
Definition at line 48 of file vegetable_light_ex.h.
Public Types | |
enum | { MaxNumLight = 2 } |
Must not change (hardcoded). More... | |
Public Member Functions | |
void | computeCurrentColors () |
Fill Color array according to PointLight[] and PointLightFactor[]. | |
CVegetableLightEx () | |
Data Fields | |
NLMISC::CRGBA | Color [MaxNumLight] |
Current Color of the light. | |
CVector | Direction [MaxNumLight] |
Direction of the light. the direction to the instance should be precomputed. | |
uint | NumLights |
Number Of light currently really enabled. | |
CPointLightNamed * | PointLight [MaxNumLight] |
PointLights. Used at CVegetableManager::updateLighting() to get current colors of pointLights. | |
uint | PointLightFactor [MaxNumLight] |
Factor to be multiplied by color of the light. Actually it is the attenuation factor. |
|
Must not change (hardcoded).
Definition at line 53 of file vegetable_light_ex.h.
00053 {MaxNumLight= 2}; |
|
Definition at line 68 of file vegetable_light_ex.h. References NumLights.
00069 { 00070 NumLights= 0; 00071 } |
|
Fill Color array according to PointLight[] and PointLightFactor[].
Definition at line 37 of file vegetable_light_ex.cpp. References NL3D::CPointLightNamed::getUnAnimatedDiffuse(), NLMISC::CRGBA::modulateFromui(), NumLights, PointLightFactor, and uint. Referenced by NL3D::CPatch::generateTileVegetable(), and NL3D::CVegetableManager::updateLightingIGPart().
00038 { 00039 for(uint i=0;i<NumLights;i++) 00040 { 00041 // get the light. 00042 CPointLightNamed *pl= PointLight[i]; 00043 // get the attenuation 00044 uint att= PointLightFactor[i]; 00045 // modulate the color with it. Use the Unanimated one!! 00046 Color[i].modulateFromui(pl->getUnAnimatedDiffuse(), att); 00047 } 00048 } |
|
Current Color of the light.
Definition at line 65 of file vegetable_light_ex.h. Referenced by NL3D::CVegetableManager::addInstance(), and NL3D::CVegetableManager::updateInstanceLighting(). |
|
Direction of the light. the direction to the instance should be precomputed.
Definition at line 60 of file vegetable_light_ex.h. Referenced by NL3D::computeVegetVertexLighting(), NL3D::computeVegetVertexLightingForceBestSided(), and NL3D::CPatch::generateTileVegetable(). |
|
Number Of light currently really enabled.
Definition at line 56 of file vegetable_light_ex.h. Referenced by NL3D::CVegetableManager::addInstance(), computeCurrentColors(), NL3D::computeVegetVertexLighting(), NL3D::computeVegetVertexLightingForceBestSided(), CVegetableLightEx(), NL3D::CPatch::generateTileVegetable(), and NL3D::CVegetableManager::updateInstanceLighting(). |
|
PointLights. Used at CVegetableManager::updateLighting() to get current colors of pointLights.
Definition at line 58 of file vegetable_light_ex.h. Referenced by NL3D::CPatch::generateTileVegetable(). |
|
Factor to be multiplied by color of the light. Actually it is the attenuation factor.
Definition at line 62 of file vegetable_light_ex.h. Referenced by computeCurrentColors(), and NL3D::CPatch::generateTileVegetable(). |