Class TSpotLightNode
Unit
Declaration
type TSpotLightNode = class(TAbstractPositionalLightNode)
Description
Light source that emits light from a specific point along a specific direction constrained within a cone.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DNode
- TAbstractNode
- TAbstractChildNode
- TAbstractLightNode
- TAbstractPunctualLightNode
- TAbstractPositionalLightNode
- TSpotLightNode
Overview
Methods
function GetProjectionLocationLocal: TVector3; override; |
|
procedure SetProjectionLocationLocal(const Value: TVector3); override; |
|
function GetProjectionDirectionLocal: TVector3; override; |
|
procedure SetProjectionDirectionLocal(const Value: TVector3); override; |
|
class function ForVRMLVersion(const Version: TX3DVersion): boolean; override; |
|
procedure UpdateLightInstance(var LightInstance: TLightInstance); override; |
|
function ProjectionMatrix: TMatrix4; override; |
|
function ModelviewMatrix: TMatrix4; override; |
|
function ModelviewRotationMatrix: TMatrix4; override; |
|
procedure Box3DDistances(const Box: TBox3D; out MinDistance, MaxDistance: Single); override; |
|
function SpotCutoffDeg: Single; |
|
function SpotCosCutoff: Single; |
|
function SpotExponentApproximate: Single; |
|
function EffectiveProjectionAngle: Single; |
|
procedure CreateNode; override; |
|
class function ClassX3DType: String; override; |
Properties
property FdBeamWidth: TSFFloat read FFdBeamWidth; |
|
property BeamWidth: Single read GetBeamWidth write SetBeamWidth; |
|
property FdCutOffAngle: TSFFloat read FFdCutOffAngle; |
|
property CutOffAngle: Single read GetCutOffAngle write SetCutOffAngle; |
|
property FdDirection: TSFVec3f read FFdDirection; |
|
property Direction: TVector3 read GetDirection write SetDirection; |
|
property FdProjectionAngle: TSFFloat read FFdProjectionAngle; |
|
property ProjectionAngle: Single read GetProjectionAngle write SetProjectionAngle; |
Description
Methods
function GetProjectionLocationLocal: TVector3; override; |
|
This item has no description. |
procedure SetProjectionLocationLocal(const Value: TVector3); override; |
|
This item has no description. |
function GetProjectionDirectionLocal: TVector3; override; |
|
This item has no description. |
procedure SetProjectionDirectionLocal(const Value: TVector3); override; |
|
This item has no description. |
class function ForVRMLVersion(const Version: TX3DVersion): boolean; override; |
|
This item has no description. Showing description inherited from TX3DNode.ForVRMLVersion. Some nodes are present only in specific VRML/X3D version. This functions decides it. For example some nodes can only work in VRML < 2.0, some others only in VRML >= 2.0. There are even some pairs of nodes: for example TConeNode_1 works with VRML < 2.0, TConeNode works with VRML >= 2.0. NodesManager will use this. Default implementation of this function returns always In practice I only use this function when various VRML/X3D versions specify the same node name but
|
procedure UpdateLightInstance(var LightInstance: TLightInstance); override; |
|
This item has no description. Showing description inherited from TAbstractLightNode.UpdateLightInstance. Update TLightInstance record when lighting location/direction (and other properties precalculated on TLightInstance) change. Assumes that LightInstance.Node = Self. |
function ProjectionMatrix: TMatrix4; override; |
|
This item has no description. Showing description inherited from TAbstractPunctualLightNode.ProjectionMatrix. Matrices for rendering shadow map from this light. Identity in this class, override for subclasses able to do shadow mapping. |
function ModelviewMatrix: TMatrix4; override; |
|
This item has no description. |
function ModelviewRotationMatrix: TMatrix4; override; |
|
This item has no description. |
procedure Box3DDistances(const Box: TBox3D; out MinDistance, MaxDistance: Single); override; |
|
This item has no description. Showing description inherited from TAbstractPunctualLightNode.Box3DDistances. 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. |
function SpotCutoffDeg: Single; |
|
Spot cutoff angle (based on cutOffAngle). Expressed in degrees, clamped to correct range (since user can input any value in VRML, and also conversion radians -> degrees could accidentally raise value slightly > 90, so cutOffAngle = 1.5708 is in degrees 90.0002104591, which would cause OpenGL fixed-function error). |
function SpotCosCutoff: Single; |
|
This item has no description. |
function SpotExponentApproximate: Single; |
|
Approximate spot exponent that could be used to render this spot light. Do not use this, unless you really have to. X3D spot light should have a linear fallback, from beamWidth to cutOffAngle, and there is no sensible way to approximate it by an exponent. Use this only if you have to render spot light with exponent, e.g. for OpenGL fixed-function pipeline. |
function EffectiveProjectionAngle: Single; |
|
Projection angle, from ProjectionAngle or 2 * CutOffAngle. See https://castle-engine.io/x3d_extensions_shadow_maps.php . |
procedure CreateNode; override; |
|
Create node fields and events. |
class function ClassX3DType: String; override; |
|
This item has no description. Showing description inherited from TX3DNode.ClassX3DType. Node type name in VRML/X3D, for this class. Normal VRML/X3D node classes should override this to return something non-empty, and then X3DType automatically will return the same value. Empty for classes that don't have a hardcoded VRML/X3D node name, like a special TX3DUnknownNode. Such special classes should override then X3DType to return actual non-empty name there. You usually should call X3DType. The only use of this method is that it works on classes (it's "class function"), without needing at actual instance. |
Properties
property FdBeamWidth: TSFFloat read FFdBeamWidth; |
|
Internal wrapper for property |
property BeamWidth: Single read GetBeamWidth write SetBeamWidth; |
|
This item has no description. |
property FdCutOffAngle: TSFFloat read FFdCutOffAngle; |
|
Internal wrapper for property |
property CutOffAngle: Single read GetCutOffAngle write SetCutOffAngle; |
|
This item has no description. |
property FdDirection: TSFVec3f read FFdDirection; |
|
Internal wrapper for property |
property Direction: TVector3 read GetDirection write SetDirection; |
|
This item has no description. |
property FdProjectionAngle: TSFFloat read FFdProjectionAngle; |
|
Internal wrapper for property |
property ProjectionAngle: Single read GetProjectionAngle write SetProjectionAngle; |
|
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.