Class TSpotLightNode_1
Unit
Declaration
type TSpotLightNode_1 = class(TAbstractPositionalLightNode)
Description
This item has no description. Showing description inherited from TAbstractPositionalLightNode.
Base class for all positional lights.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DNode
- TAbstractNode
- TAbstractChildNode
- TAbstractLightNode
- TAbstractPunctualLightNode
- TAbstractPositionalLightNode
- TSpotLightNode_1
Overview
Methods
function GetProjectionLocationLocal: TVector3; override; |
|
procedure SetProjectionLocationLocal(const Value: TVector3); override; |
|
function GetProjectionDirectionLocal: TVector3; override; |
|
procedure SetProjectionDirectionLocal(const Value: TVector3); override; |
|
constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override; |
|
function SpotExponent: Single; |
|
function SpotCutoffDeg: Single; |
|
function SpotCosCutoff: Single; |
|
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 HasRadius: boolean; override; |
|
function Scope: TLightScope; override; |
|
procedure CreateNode; override; |
|
class function ClassX3DType: String; override; |
|
class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override; |
Properties
property FdDirection: TSFVec3f read FFdDirection; |
|
property Direction: TVector3 read GetDirection write SetDirection; |
|
property FdDropOffRate: TSFFloat read FFdDropOffRate; |
|
property DropOffRate: Single read GetDropOffRate write SetDropOffRate; |
|
property FdCutOffAngle: TSFFloat read FFdCutOffAngle; |
|
property CutOffAngle: Single read GetCutOffAngle write SetCutOffAngle; |
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. |
constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override; |
|
This item has no description. Showing description inherited from TX3DNode.Create. Constructor. Initializes various properties:
|
function SpotExponent: Single; |
|
Spot exponent (based on dropOffRate). Not normalized (i.e. is a real exponent, in VRML 1.0 expresses in [0..1] range to mean exponents [0..128]). Clamp to correct range. |
function SpotCutoffDeg: Single; |
|
Spot cutoff angle (based on cutOffAngle). Expressed in degrees, clamped to correct range (see TSpotLightNode.SpotCutoffDeg for reasons). (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. |
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 HasRadius: boolean; override; |
|
This item has no description. Showing description inherited from TAbstractPositionalLightNode.HasRadius. Should the "radius" field be taken into account. |
function Scope: TLightScope; override; |
|
This item has no description. Showing description inherited from TAbstractLightNode.Scope. Light scope. Default implementation returns lsGlobal or lsLocal, depending on "global" field value (this follows VRML/X3D >= 2.0 rules). |
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. |
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
|
Properties
property FdDirection: TSFVec3f read FFdDirection; |
|
Internal wrapper for property |
property Direction: TVector3 read GetDirection write SetDirection; |
|
This item has no description. |
property FdDropOffRate: TSFFloat read FFdDropOffRate; |
|
Internal wrapper for property |
property DropOffRate: Single read GetDropOffRate write SetDropOffRate; |
|
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. |
Generated by PasDoc 0.16.0-snapshot.