Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_x3dlightnode.inc

raw
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 GetAmbientIntensity: Single;
28 procedure SetAmbientIntensity(const Value: Single);
29 function GetColor: TCastleColorRGB;
30 procedure SetColor(const Value: TCastleColorRGB);
31 function GetGlobal: Boolean;
32 procedure SetGlobal(const Value: Boolean);
33 function GetIntensity: Single;
34 procedure SetIntensity(const Value: Single);
35 function GetIsOn: Boolean;
36 procedure SetIsOn(const Value: Boolean);
37 function GetShadowVolumes: Boolean;
38 procedure SetShadowVolumes(const Value: Boolean);
39 public
40 { Create node fields and events. }
41 procedure CreateNode; override;
42 class function ClassX3DType: String; override;
43
44 strict private FFdAmbientIntensity: TSFFloat;
45 { Internal wrapper for property @code(AmbientIntensity). This wrapper API may change, we advise to access simpler @code(AmbientIntensity) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
46 public property FdAmbientIntensity: TSFFloat read FFdAmbientIntensity;
47 { }
48 property AmbientIntensity: Single read GetAmbientIntensity write SetAmbientIntensity;
49
50 strict private FFdColor: TSFColor;
51 { Internal wrapper for property @code(Color). This wrapper API may change, we advise to access simpler @code(Color) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
52 public property FdColor: TSFColor read FFdColor;
53 { }
54 property Color: TCastleColorRGB read GetColor write SetColor;
55
56 strict private FFdGlobal: TSFBool;
57 { Internal wrapper for property @code(Global). This wrapper API may change, we advise to access simpler @code(Global) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
58 public property FdGlobal: TSFBool read FFdGlobal;
59 { }
60 property Global: Boolean read GetGlobal write SetGlobal;
61
62 strict private FFdIntensity: TSFFloat;
63 { Internal wrapper for property @code(Intensity). This wrapper API may change, we advise to access simpler @code(Intensity) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
64 public property FdIntensity: TSFFloat read FFdIntensity;
65 { }
66 property Intensity: Single read GetIntensity write SetIntensity;
67
68 strict private FFdOn: TSFBool;
69 { Internal wrapper for property @code(IsOn). This wrapper API may change, we advise to access simpler @code(IsOn) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
70 public property FdOn: TSFBool read FFdOn;
71 { }
72 property IsOn: Boolean read GetIsOn write SetIsOn;
73
74 strict private FFdEffects: TMFNode;
75 { Internal wrapper for property @code(Effects). This wrapper API may change, we advise to access simpler @code(Effects) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
76 public property FdEffects: TMFNode read FFdEffects;
77 { }
78 procedure SetEffects(const Value: array of TEffectNode);
79
80 strict private FFdShadowVolumes: TSFBool;
81 { Internal wrapper for property @code(ShadowVolumes). This wrapper API may change, we advise to access simpler @code(ShadowVolumes) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
82 public property FdShadowVolumes: TSFBool read FFdShadowVolumes;
83 { }
84 property ShadowVolumes: Boolean read GetShadowVolumes write SetShadowVolumes;
85
86 {$endif read_interface}
87
88 {$ifdef read_implementation}
89
90 { TAbstractLightNode ----------------------------------------------- }
91
92 function TAbstractLightNode.GetAmbientIntensity: Single;
93 begin
94 Result := FdAmbientIntensity.Value;
95 end;
96
97 procedure TAbstractLightNode.SetAmbientIntensity(const Value: Single);
98 begin
99 FdAmbientIntensity.Send(Value);
100 end;
101
102 function TAbstractLightNode.GetColor: TCastleColorRGB;
103 begin
104 Result := FdColor.Value;
105 end;
106
107 procedure TAbstractLightNode.SetColor(const Value: TCastleColorRGB);
108 begin
109 FdColor.Send(Value);
110 end;
111
112 function TAbstractLightNode.GetGlobal: Boolean;
113 begin
114 Result := FdGlobal.Value;
115 end;
116
117 procedure TAbstractLightNode.SetGlobal(const Value: Boolean);
118 begin
119 FdGlobal.Send(Value);
120 end;
121
122 function TAbstractLightNode.GetIntensity: Single;
123 begin
124 Result := FdIntensity.Value;
125 end;
126
127 procedure TAbstractLightNode.SetIntensity(const Value: Single);
128 begin
129 FdIntensity.Send(Value);
130 end;
131
132 function TAbstractLightNode.GetIsOn: Boolean;
133 begin
134 Result := FdOn.Value;
135 end;
136
137 procedure TAbstractLightNode.SetIsOn(const Value: Boolean);
138 begin
139 FdOn.Send(Value);
140 end;
141
142 procedure TAbstractLightNode.SetEffects(const Value: array of TEffectNode);
143 var
144 L: Integer;
145 A: array of TX3DNode;
146 begin
147 L := High(Value) + 1;
148 SetLength(A, L);
149 if L > 0 then
150 Move(Value[0], A[0], L * SizeOf(TEffectNode));
151 FdEffects.Send(A);
152 end;
153
154 function TAbstractLightNode.GetShadowVolumes: Boolean;
155 begin
156 Result := FdShadowVolumes.Value;
157 end;
158
159 procedure TAbstractLightNode.SetShadowVolumes(const Value: Boolean);
160 begin
161 FdShadowVolumes.Send(Value);
162 end;
163
164 class function TAbstractLightNode.ClassX3DType: String;
165 begin
166 Result := 'X3DLightNode';
167 end;
168
169 procedure TAbstractLightNode.CreateNode;
170 begin
171 inherited;
172
173 FFdAmbientIntensity := TSFFloat.Create(Self, True, 'ambientIntensity', 0);
174 FdAmbientIntensity.ChangeAlways := chVisibleNonGeometry;
175 FdAmbientIntensity.MustBeNonnegative := true;
176 AddField(FFdAmbientIntensity);
177
178 FFdColor := TSFColor.Create(Self, True, 'color', Vector3(1, 1, 1));
179 FdColor.ChangeAlways := chVisibleNonGeometry;
180 AddField(FFdColor);
181
182 FFdGlobal := TSFBool.Create(Self, True, 'global', false);
183 FdGlobal.ChangeAlways := chEverything;
184 AddField(FFdGlobal);
185
186 FFdIntensity := TSFFloat.Create(Self, True, 'intensity', 1);
187 FdIntensity.ChangeAlways := chVisibleNonGeometry;
188 FdIntensity.MustBeNonnegative := true;
189 AddField(FFdIntensity);
190
191 FFdOn := TSFBool.Create(Self, True, 'on', true);
192 FdOn.ChangeAlways := chVisibleNonGeometry;
193 AddField(FFdOn);
194
195 FFdEffects := TMFNode.Create(Self, False, 'effects', [TEffectNode]);
196 FdEffects.ChangeAlways := chEverything;
197 AddField(FFdEffects);
198
199 FFdShadowVolumes := TSFBool.Create(Self, True, 'shadowVolumes', false);
200 FdShadowVolumes.ChangeAlways := chLightForShadowVolumes;
201 AddField(FFdShadowVolumes);
202 end;
203
204 {$endif read_implementation}