Class TAbstractPositionalLightNode
Unit
X3DNodes
Declaration
type TAbstractPositionalLightNode = class(TAbstractPunctualLightNode)
Description
Base class for all positional lights.
Hierarchy
Overview
Methods
Properties
Description
Methods
|
constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override; |
This item has no description. Showing description inherited from TX3DNode.Create.
Constructor. Initializes various properties:
Name, BaseUrl are initialized from given parameters.
The Fields, Events lists are filled in every descendant, to have all the fields/events defined by the specification.
DefaultContainerField, and other node-specific stuff, is filled in descendants. This is actually implemented in CreateNode, that is called at the end of this constructor.
|
|
function DistanceNeededForAttenuation: boolean; |
Calculate light intensity drop because of the distance to the light. This follows the equation 1/max( attenuation[0] + ... ) from the VRML/X3D specification, it is the same as OpenGL attenuation.
Since calculating the DistanceToLight for the Attenuation method may be time-consuming in some situations, you can check DistanceNeededForAttenuation first. When the DistanceNeededForAttenuation returns False , then the value of DistanceToLight parameter is ignored (you can pass anything).
The DistanceToLight should be a distance in the light source local coordinate system. TODO: although our renderers currently ignore this: ray-tracer uses global coord system, OpenGL (fixed-function and shader) renderer uses eye coord system (should be equal to global coord system for normal cameras).
|
|
function CalculateAttenuation(const DistanceToLight: Single): Single; overload; |
This item has no description. |
|
function HasAttenuation: boolean; |
Is attenuation relevant. When False , you know that Attenuation function always returns 1, so there's no point in using it at all.
|
|
function HasRadius: boolean; virtual; |
Should the "radius" field be taken into account.
|
|
function PositionAndDirection: TVector4; override; |
This item has no description. Showing description inherited from TAbstractPunctualLightNode.PositionAndDirection.
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.
|
|
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 FdAttenuation: TSFVec3f read FFdAttenuation; |
Internal wrapper for property Attenuation . This wrapper API may change, we advise to access simpler Attenuation instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart).
|
|
property Attenuation: TVector3 read GetAttenuation write SetAttenuation; |
This item has no description. |
|
property FdLocation: TSFVec3f read FFdLocation; |
Internal wrapper for property Location . This wrapper API may change, we advise to access simpler Location instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart).
|
|
property Location: TVector3 read GetLocation write SetLocation; |
This item has no description. |
|
property FdRadius: TSFFloat read FFdRadius; |
Internal wrapper for property Radius . This wrapper API may change, we advise to access simpler Radius instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart).
|
|
property Radius: Single read GetRadius write SetRadius; |
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.