struct TLightData

template<bool IsRenderProxy>

Common data used by both main and render thread variants of Light.

Public

Methods

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

Type

Type of light that determines how are the rest of the parameters interpreted.

CastsShadows

bool CastsShadows

Determines whether the light casts shadows.

LightColor

Color LightColor

Color of the light.

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.

ShadowBias

float ShadowBias

See Light::SetShadowBias()