Class TCastleDirectionalLight

Unit

Declaration

type TCastleDirectionalLight = class(TCastlePunctualLight)

Description

Directional light shines along a direction in 3D space, simulating a light source far away (like a sun). The direction is -Z (in local coordinates), simply rotate this transformation to change the lighting direction. The position of this transformation doesn't matter for lighting calculation (though it is useful to display the light gizmo at design-time).

See X3D DirectionalLight specification for various details.

Hierarchy

Overview

Fields

Public nested const DefaultIntensity = 1.0;

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Public property Color: TCastleColorRGB read FColor write SetColor;
Published property Intensity: Single read FIntensity write SetIntensity default DefaultIntensity;
Published property ColorPersistent: TCastleColorRGBPersistent read FColorPersistent ;

Description

Fields

Public nested const DefaultIntensity = 1.0;

This item has no description.

Methods

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function PropertySections(const PropertyName: String): TPropertySections; override;

This item has no description. Showing description inherited from TCastleComponent.PropertySections.

Section where to show property in the editor.

Properties

Public property Color: TCastleColorRGB read FColor write SetColor;

Light color shining over surface. By default white.

Published property Intensity: Single read FIntensity write SetIntensity default DefaultIntensity;

Intensity, multiplied by color. Can be anything >= 0. Intuitively, how bright is the light.

Note that the physical interpretation of what the intensity means for a directional light is a bit different than for TCastlePointLight and TCastleSpotLight. Directional light doesn't have a position, consequently it doesn't have attenuation. Following glTF lights specification, the directional light's intensity physical unit is illuminance in lux (lm/m2).

For the above reason, different values of intensity are "reasonable" for directional light than for point and spot lights. By default directional light intensity is 1.0, unlike point and spot lights which have intensity 100.0 by default.

Published property ColorPersistent: TCastleColorRGBPersistent read FColorPersistent ;

Color that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Color directly.

See also
Color
Light color shining over surface.

Generated by PasDoc 0.16.0-snapshot.