Colobot
Public Member Functions | Public Attributes | List of all members
Gfx::Light Struct Reference

Properties of light in 3D scene. More...

#include <light.h>

Public Member Functions

void LoadDefault ()
 Loads default values.
 

Public Attributes

LightType type = LIGHT_POINT
 Type of light source.
 
Color ambient = Color(0.4f, 0.4f, 0.4f)
 Color of ambient light.
 
Color diffuse = Color(0.8f, 0.8f, 0.8f)
 Color of diffuse light.
 
Color specular = Color(1.0f, 1.0f, 1.0f)
 Color of specular light.
 
Math::Vector position = Math::Vector(0.0f, 0.0f, 0.0f)
 Position in world space (for point & spot lights)
 
Math::Vector direction = Math::Vector(0.0f, 0.0f, 1.0f)
 Direction in world space (for directional & spot lights)
 
float attenuation0 = 1.0f
 Constant attenuation factor.
 
float attenuation1 = 0.0f
 Linear attenuation factor.
 
float attenuation2 = 0.0f
 Quadratic attenuation factor.
 
float spotAngle = Math::PI/2.0f
 Angle of spotlight cone (0-PI/2 radians)
 
float spotIntensity = 0.0f
 Intensity of spotlight (0 = uniform; 128 = most intense)
 

Detailed Description

Properties of light in 3D scene.

This structure was created as analog to DirectX's D3DLIGHT.


The documentation for this struct was generated from the following file: