| 1 |
{ -*- buffer-read-only: t -*- |
| 2 |
|
| 3 |
Copyright 2015-2024 Michalis Kamburelis. |
| 4 |
|
| 5 |
This file is part of "Castle Game Engine". |
| 6 |
|
| 7 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 8 |
included in this distribution, for details about the copyright. |
| 9 |
|
| 10 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 |
|
| 14 |
---------------------------------------------------------------------------- |
| 15 |
} |
| 16 |
|
| 17 |
{ Automatically generated node properties. |
| 18 |
|
| 19 |
Do not edit this file manually! |
| 20 |
To add new properties: |
| 21 |
- add them to the text files in tools/internal/x3d-nodes-to-pascal/nodes-specification/ , |
| 22 |
- and regenerate include files by running x3d-nodes-to-pascal } |
| 23 |
|
| 24 |
{$ifdef read_interface} |
| 25 |
|
| 26 |
strict private |
| 27 |
function GetAttenuation: TVector3; |
| 28 |
procedure SetAttenuation(const Value: TVector3); |
| 29 |
function GetLocation: TVector3; |
| 30 |
procedure SetLocation(const Value: TVector3); |
| 31 |
function GetRadius: Single; |
| 32 |
procedure SetRadius(const Value: Single); |
| 33 |
public |
| 34 |
{ Create node fields and events. } |
| 35 |
procedure CreateNode; override; |
| 36 |
class function ClassX3DType: String; override; |
| 37 |
|
| 38 |
strict private FFdAttenuation: TSFVec3f; |
| 39 |
{ Internal wrapper for property @code(Attenuation). This wrapper API may change, we advise to access simpler @code(Attenuation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 40 |
public property FdAttenuation: TSFVec3f read FFdAttenuation; |
| 41 |
{ } |
| 42 |
property Attenuation: TVector3 read GetAttenuation write SetAttenuation; |
| 43 |
|
| 44 |
strict private FFdLocation: TSFVec3f; |
| 45 |
{ Internal wrapper for property @code(Location). This wrapper API may change, we advise to access simpler @code(Location) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 46 |
public property FdLocation: TSFVec3f read FFdLocation; |
| 47 |
{ } |
| 48 |
property Location: TVector3 read GetLocation write SetLocation; |
| 49 |
|
| 50 |
strict private FFdRadius: TSFFloat; |
| 51 |
{ Internal wrapper for property @code(Radius). This wrapper API may change, we advise to access simpler @code(Radius) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 52 |
public property FdRadius: TSFFloat read FFdRadius; |
| 53 |
{ } |
| 54 |
property Radius: Single read GetRadius write SetRadius; |
| 55 |
|
| 56 |
{$endif read_interface} |
| 57 |
|
| 58 |
{$ifdef read_implementation} |
| 59 |
|
| 60 |
{ TAbstractPositionalLightNode ----------------------------------------------- } |
| 61 |
|
| 62 |
function TAbstractPositionalLightNode.GetAttenuation: TVector3; |
| 63 |
begin |
| 64 |
Result := FdAttenuation.Value; |
| 65 |
end; |
| 66 |
|
| 67 |
procedure TAbstractPositionalLightNode.SetAttenuation(const Value: TVector3); |
| 68 |
begin |
| 69 |
FdAttenuation.Send(Value); |
| 70 |
end; |
| 71 |
|
| 72 |
function TAbstractPositionalLightNode.GetLocation: TVector3; |
| 73 |
begin |
| 74 |
Result := FdLocation.Value; |
| 75 |
end; |
| 76 |
|
| 77 |
procedure TAbstractPositionalLightNode.SetLocation(const Value: TVector3); |
| 78 |
begin |
| 79 |
FdLocation.Send(Value); |
| 80 |
end; |
| 81 |
|
| 82 |
function TAbstractPositionalLightNode.GetRadius: Single; |
| 83 |
begin |
| 84 |
Result := FdRadius.Value; |
| 85 |
end; |
| 86 |
|
| 87 |
procedure TAbstractPositionalLightNode.SetRadius(const Value: Single); |
| 88 |
begin |
| 89 |
FdRadius.Send(Value); |
| 90 |
end; |
| 91 |
|
| 92 |
class function TAbstractPositionalLightNode.ClassX3DType: String; |
| 93 |
begin |
| 94 |
Result := 'X3DPositionalLightNode'; |
| 95 |
end; |
| 96 |
|
| 97 |
procedure TAbstractPositionalLightNode.CreateNode; |
| 98 |
begin |
| 99 |
inherited; |
| 100 |
|
| 101 |
FFdAttenuation := TSFVec3f.Create(Self, True, 'attenuation', Vector3(1, 0, 0)); |
| 102 |
FdAttenuation.ChangeAlways := chVisibleNonGeometry; |
| 103 |
AddField(FFdAttenuation); |
| 104 |
|
| 105 |
FFdLocation := TSFVec3f.Create(Self, True, 'location', Vector3(0, 0, 0)); |
| 106 |
FdLocation.ChangeAlways := chLightLocationDirection; |
| 107 |
AddField(FFdLocation); |
| 108 |
|
| 109 |
FFdRadius := TSFFloat.Create(Self, True, 'radius', 100); |
| 110 |
FdRadius.ChangeAlways := chLightInstanceProperty; |
| 111 |
AddField(FFdRadius); |
| 112 |
end; |
| 113 |
|
| 114 |
{$endif read_implementation} |