Class TAbstractPunctualLightNode
Unit
Declaration
type TAbstractPunctualLightNode = class(TAbstractLightNode)
Description
Base class for all "punctual" light nodes (that have a position and/or direction).
Note that even the old VRML 1.0 light nodes inherit from this. Although they interpret some bits differently ("ambientIntensity" < 0 has special meaning). But most of the fields behave identically, they only have different default values.
Hierarchy
- TObject
- TPersistent
- TNonRefCountedInterfacedPersistent
- TX3DFileItem
- TX3DNode
- TAbstractNode
- TAbstractChildNode
- TAbstractLightNode
- TAbstractPunctualLightNode
Overview
Methods
![]() |
function GetProjectionLocationLocal: TVector3; virtual; |
![]() |
procedure SetProjectionLocationLocal(const Value: TVector3); virtual; |
![]() |
function GetProjectionDirectionLocal: TVector3; virtual; |
![]() |
procedure SetProjectionDirectionLocal(const Value: TVector3); virtual; |
![]() |
procedure CreateNode; override; |
![]() |
function ProjectionMatrix: TMatrix4; virtual; |
![]() |
function ModelviewMatrix: TMatrix4; virtual; |
![]() |
function ModelviewRotationMatrix: TMatrix4; virtual; |
![]() |
function GetProjectorMatrix: TMatrix4; |
![]() |
procedure GetView(out Pos, Dir, Side, Up: TVector3); |
![]() |
procedure Box3DDistances(const Box: TBox3D; out MinDistance, MaxDistance: Single); virtual; abstract; |
![]() |
function PositionAndDirection: TVector4; virtual; abstract; |
Properties
![]() |
property FdShadowVolumesMain: TSFBool read FFdShadowVolumesMain; |
![]() |
property FdShowProxyGeometry: TSFBool read FFdShowProxyGeometry; |
![]() |
property FdProjectionNear: TSFFloat read FFdProjectionNear; |
![]() |
property FdProjectionFar: TSFFloat read FFdProjectionFar; |
![]() |
property FdUp: TSFVec3f read FFdUp; |
![]() |
property FdDefaultShadowMap: TSFNode read FFdDefaultShadowMap; |
![]() |
property FdShadows: TSFBool read FFdShadows; |
![]() |
property ProjectionLocationLocal: TVector3
read GetProjectionLocationLocal
write SetProjectionLocationLocal; |
![]() |
property ProjectionDirectionLocal: TVector3
read GetProjectionDirectionLocal
write SetProjectionDirectionLocal; |
![]() |
property ProjectionSceneLocation: TVector3
read GetProjectionSceneLocation
write SetProjectionSceneLocation; |
![]() |
property ProjectionSceneDirection: TVector3
read GetProjectionSceneDirection
write SetProjectionSceneDirection; |
![]() |
property Shadows: Boolean read GetShadows write SetShadows; |
![]() |
property ShadowVolumesMain: Boolean read GetShadowVolumesMain write SetShadowVolumesMain; |
![]() |
property ProjectionNear: Single read GetProjectionNear write SetProjectionNear; |
![]() |
property ProjectionFar: Single read GetProjectionFar write SetProjectionFar; |
![]() |
property Up: TVector3 read GetUp write SetUp; |
![]() |
property DefaultShadowMap: TGeneratedShadowMapNode read GetDefaultShadowMap write SetDefaultShadowMap; |
Description
Methods
![]() |
function GetProjectionLocationLocal: TVector3; virtual; |
![]() |
procedure SetProjectionLocationLocal(const Value: TVector3); virtual; |
![]() |
function GetProjectionDirectionLocal: TVector3; virtual; |
![]() |
procedure SetProjectionDirectionLocal(const Value: TVector3); virtual; |
![]() |
procedure CreateNode; override; |
![]() |
function ProjectionMatrix: TMatrix4; virtual; |
|
Matrices for rendering shadow map from this light. Identity in this class, override for subclasses able to do shadow mapping. | |
![]() |
function ModelviewMatrix: TMatrix4; virtual; |
![]() |
function ModelviewRotationMatrix: TMatrix4; virtual; |
![]() |
function GetProjectorMatrix: TMatrix4; |
![]() |
procedure GetView(out Pos, Dir, Side, Up: TVector3); |
![]() |
procedure Box3DDistances(const Box: TBox3D; out MinDistance, MaxDistance: Single); virtual; abstract; |
|
Calculate distances between the given Box and this light source. This is intended to capture the depth distances where the box resides, useful for calculating e.g. depth ranges to capture in the shadow maps. Depending on light source type, various distance measures may be used, appropriate to light sources projection. Always MinDistance <= MaxDistance. They may be negative when we measure along the light's direction. Exceptions raised
| |
![]() |
function PositionAndDirection: TVector4; virtual; abstract; |
|
Position and direction expressed in homogeneous coordinates. For positional lights, the last component is always 1. For directional lights, the last component is always 0. Note that this is expressed in the local light node coordinate system. | |
Properties
![]() |
property FdShadowVolumesMain: TSFBool read FFdShadowVolumesMain; |
![]() |
property FdShowProxyGeometry: TSFBool read FFdShowProxyGeometry; |
|
showProxyGeometry field is an InstantReality extension, see [http://instant-reality.com/documentation/nodetype/Light/]. | |
![]() |
property FdProjectionNear: TSFFloat read FFdProjectionNear; |
|
projectionNear / projectionFar / up are Kambi extensions, see [https://castle-engine.io/x3d_extensions_shadow_maps.php#section_light_parameters] | |
![]() |
property FdProjectionFar: TSFFloat read FFdProjectionFar; |
![]() |
property FdUp: TSFVec3f read FFdUp; |
![]() |
property FdDefaultShadowMap: TSFNode read FFdDefaultShadowMap; |
![]() |
property FdShadows: TSFBool read FFdShadows; |
![]() |
property ProjectionLocationLocal: TVector3
read GetProjectionLocationLocal
write SetProjectionLocationLocal; |
|
Light location, direction and up vectors, for projection. Useful when you think of lights as cameras (for shadow maps). ProjectionDirectionLocal will always be exactly zero for a PointLight (that doesn't have a direction). The GetView returns vectors in global (scene) space. It guarantees that Direction, Side and Up are normalized and orthogonal to each other. | |
![]() |
property ProjectionDirectionLocal: TVector3
read GetProjectionDirectionLocal
write SetProjectionDirectionLocal; |
![]() |
property ProjectionSceneLocation: TVector3
read GetProjectionSceneLocation
write SetProjectionSceneLocation; |
![]() |
property ProjectionSceneDirection: TVector3
read GetProjectionSceneDirection
write SetProjectionSceneDirection; |
![]() |
property Shadows: Boolean read GetShadows write SetShadows; |
![]() |
property ShadowVolumesMain: Boolean read GetShadowVolumesMain write SetShadowVolumesMain; |
![]() |
property ProjectionNear: Single read GetProjectionNear write SetProjectionNear; |
![]() |
property ProjectionFar: Single read GetProjectionFar write SetProjectionFar; |
![]() |
property Up: TVector3 read GetUp write SetUp; |
![]() |
property DefaultShadowMap: TGeneratedShadowMapNode read GetDefaultShadowMap write SetDefaultShadowMap; |
Generated by PasDoc 0.16.0.

