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
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleTransform
- TCastleAbstractLight
- TCastlePunctualLight
- TCastleDirectionalLight
Overview
Fields
nested const DefaultIntensity = 1.0; |
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
property Color: TCastleColorRGB read FColor write SetColor; |
|
property Intensity: Single read FIntensity write SetIntensity default DefaultIntensity; |
|
property ColorPersistent: TCastleColorRGBPersistent read FColorPersistent ; |
Description
Fields
nested const DefaultIntensity = 1.0; |
|
This item has no description. |
Methods
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
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
property Color: TCastleColorRGB read FColor write SetColor; |
|
Light color shining over surface. By default white. |
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. |
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
|
Generated by PasDoc 0.16.0-snapshot.