66 void Init(
float value);
CLightManager(CEngine *engine)
Constructor.
Definition: lightman.cpp:75
Color GetLightColor(int lightRank)
Returns current light color.
Definition: lightman.cpp:342
float starting
Starting value.
Definition: lightman.h:47
bool SetLightIncludeType(int lightRank, EngineObjectType type)
Sets what objects are included in given dynamic light.
Definition: lightman.cpp:241
float m_time
Current time.
Definition: lightman.h:234
void DebugDumpLights()
Prints debug info.
Definition: lightman.cpp:95
int CreateLight(LightPriority priority=LIGHT_PRI_LOW)
Creates a new dynamic light and returns its index (lightRank)
Definition: lightman.cpp:156
Main graphics engine - CEngine class.
virtual ~CLightManager()
Destructor.
Definition: lightman.cpp:83
Object doesn't exist.
Definition: engine.h:174
void SetDevice(CDevice *device)
Sets the device to be used.
Definition: lightman.cpp:89
LightProgression colorBlue
Progression of blue diffuse color.
Definition: lightman.h:116
bool GetLight(int lightRank, Light &light)
Returns the light parameters for given dynamic light.
Definition: lightman.cpp:214
bool SetLightPos(int lightRank, const Math::Vector &pos)
Sets the position of dynamic light.
Definition: lightman.cpp:259
EngineObjectType
Class of graphics engine object.
Definition: engine.h:171
bool SetLightColor(int lightRank, const Color &color)
Sets the destination color for dynamic light's color progression.
Definition: lightman.cpp:331
LightPriority priority
Priority in assignment.
Definition: lightman.h:104
bool SetLightIntensitySpeed(int lightRank, float speed)
Sets the rate of change for dynamic light intensity.
Definition: lightman.cpp:293
EngineObjectType includeType
Type of objects included in lighting with this light; if ENG_OBJTYPE_NULL is used, it is ignored.
Definition: lightman.h:119
LightPriority
Priority in light assignment.
Definition: lightman.h:79
EngineObjectType excludeType
Type of objects excluded from lighting with this light; if ENG_OBJTYPE_NULL is used, it is ignored.
Definition: lightman.h:121
Light light
Configuration of the light.
Definition: lightman.h:107
Manager for dynamic lights in 3D scene.
Definition: lightman.h:146
float speed
Speed of progression.
Definition: lightman.h:55
Light struct and related enums.
bool SetLight(int lightRank, const Light &light)
Sets the light parameters for dynamic light.
Definition: lightman.cpp:200
Math::Vector GetLightPos(int lightRank)
Returns the position of dynamic light.
Definition: lightman.cpp:268
int rank
Rank (index)
Definition: lightman.h:96
high weight
Definition: lightman.h:82
Dynamic light in 3D scene.
Definition: lightman.h:93
std::vector< int > m_lightMap
Map of current light allocation: graphics light -> dynamic light.
Definition: lightman.h:238
void FlushLights()
Clears and disables all lights.
Definition: lightman.cpp:150
Properties of light in 3D scene.
Definition: light.h:54
float progress
Progress from start to end.
Definition: lightman.h:53
void AdaptLightColor(const Color &color, float factor)
Adjusts the color of all dynamic lights.
Definition: lightman.cpp:354
always highest weight (always picked)
Definition: lightman.h:81
void SetTarget(float value)
Sets the new end value (starting is set to current)
Definition: lightman.cpp:67
LightProgression colorGreen
Progression of green diffuse color.
Definition: lightman.h:114
Describes the progression of light parameters change.
Definition: lightman.h:44
bool SetLightPriority(int lightRank, LightPriority priority)
Changes the light priority.
Definition: lightman.cpp:232
void UpdateDeviceLights(EngineObjectType type)
Enables or disables dynamic lights affecting the given object type.
Definition: lightman.cpp:445
LightProgression colorRed
Progression of red diffuse color.
Definition: lightman.h:112
LightProgression intensity
Progression of intensity [0, 1].
Definition: lightman.h:110
Definition: lightman.h:215
std::vector< DynamicLight > m_dynLights
List of dynamic lights.
Definition: lightman.h:236
void UpdateLights()
Updates (recalculates) all dynamic lights.
Definition: lightman.cpp:413
void UpdateProgression(float rTime)
Updates progression of dynamic lights.
Definition: lightman.cpp:378
float GetLightIntensity(int lightRank)
Returns the current light intensity.
Definition: lightman.cpp:311
Namespace for (new) graphics code.
Definition: app.h:49
bool SetLightColorSpeed(int lightRank, float speed)
Sets the rate of change for dynamic light colors (RGB)
Definition: lightman.cpp:320
Vector struct and related functions.
The graphics engine.
Definition: engine.h:585
bool SetLightEnabled(int lightRank, bool enabled)
Enables/disables the given dynamic light.
Definition: lightman.cpp:223
bool used
Whether the light is used.
Definition: lightman.h:99
Math::Vector GetLightDir(int lightRank)
Returns the direction of dynamic light.
Definition: lightman.cpp:285
3D (3x1) vector
Definition: vector.h:53
bool DeleteLight(int lightRank)
Deletes and disables the given dynamic light.
Definition: lightman.cpp:191
bool SetLightIntensity(int lightRank, float value)
Sets the destination intensity for dynamic light's intensity progression.
Definition: lightman.cpp:302
void Update(float rTime)
Updates the progression.
Definition: lightman.cpp:48
RGBA color.
Definition: color.h:39
void Init(float value)
Initializes the progression.
Definition: lightman.cpp:39
float ending
Ending (destination) value.
Definition: lightman.h:49
bool SetLightDir(int lightRank, const Math::Vector &dir)
Sets the direction of dynamic light.
Definition: lightman.cpp:276
float current
Current value.
Definition: lightman.h:51
low weight
Definition: lightman.h:83
bool SetLightExcludeType(int lightRank, EngineObjectType type)
Sets what objects are excluded from given dynamic light.
Definition: lightman.cpp:250
bool enabled
Whether the light is turned on.
Definition: lightman.h:101
Abstract interface of graphics device.
Definition: device.h:323