struct
ecs::Light
ECS fragment storing light visual data (type, color, intensity, bounds, etc.).
Public
Methods
staticGetRttiStatic
static RTTIType *GetRttiStatic()
ComputeBounds
void ComputeBounds(const Transform &transform)
Computes the world space bounding sphere for a light and updates the Bounds field.
ComputeLuminance
float ComputeLuminance() const
Returns the luminance of the light source.
This is the value that should be used in lighting equations.
ComputeAttenuationRange
void ComputeAttenuationRange(const Transform &transform)
Calculates maximum light range based on light intensity and updates AttRadius and Bounds.
Fields
CastsShadows
bool CastsShadows
Determines whether the light casts shadows.
AttRadius
float AttRadius
Radius at which light intensity falls off to zero.
SourceRadius
float SourceRadius
Radius of the light source.
If > 0 the light is an area light.
Intensity
float Intensity
Power of the light source.
SpotAngle
Degree SpotAngle
Total angle covered by a spot light.
SpotFalloffAngle
Degree SpotFalloffAngle
Spot light angle at which falloff starts.
Must be smaller than total angle.
AutoAttenuation
bool AutoAttenuation
Determines is attenuation radius is automatically determined.
Bounds
Sphere Bounds
Sphere that bounds the light area of influence.