Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_x3dpunctuallightnode.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 GetShadows: Boolean;
28 procedure SetShadows(const Value: Boolean);
29 function GetShadowVolumesMain: Boolean;
30 procedure SetShadowVolumesMain(const Value: Boolean);
31 function GetShowProxyGeometry: Boolean;
32 procedure SetShowProxyGeometry(const Value: Boolean);
33 function GetProjectionNear: Single;
34 procedure SetProjectionNear(const Value: Single);
35 function GetProjectionFar: Single;
36 procedure SetProjectionFar(const Value: Single);
37 function GetUp: TVector3;
38 procedure SetUp(const Value: TVector3);
39 function GetDefaultShadowMap: TGeneratedShadowMapNode;
40 procedure SetDefaultShadowMap(const Value: TGeneratedShadowMapNode);
41 public
42 { Create node fields and events. }
43 procedure CreateNode; override;
44 class function ClassX3DType: String; override;
45
46 strict private FFdShadows: TSFBool;
47 { Internal wrapper for property @code(Shadows). This wrapper API may change, we advise to access simpler @code(Shadows) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdShadows: TSFBool read FFdShadows;
49 { }
50 property Shadows: Boolean read GetShadows write SetShadows;
51
52 strict private FFdShadowVolumesMain: TSFBool;
53 { Internal wrapper for property @code(ShadowVolumesMain). This wrapper API may change, we advise to access simpler @code(ShadowVolumesMain) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
54 public property FdShadowVolumesMain: TSFBool read FFdShadowVolumesMain;
55 { Does this light determine shadows (when using shadow volumes). Ignored if not @link(ShadowVolumes). }
56 property ShadowVolumesMain: Boolean read GetShadowVolumesMain write SetShadowVolumesMain;
57
58 strict private FFdShowProxyGeometry: TSFBool;
59 { Internal wrapper for property @code(ShowProxyGeometry). This wrapper API may change, we advise to access simpler @code(ShowProxyGeometry) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
60 public property FdShowProxyGeometry: TSFBool read FFdShowProxyGeometry;
61 { InstantReality extension, see [http://instant-reality.com/documentation/nodetype/Light/]. }
62 property ShowProxyGeometry: Boolean read GetShowProxyGeometry write SetShowProxyGeometry;
63
64 strict private FFdProjectionNear: TSFFloat;
65 { Internal wrapper for property @code(ProjectionNear). This wrapper API may change, we advise to access simpler @code(ProjectionNear) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
66 public property FdProjectionNear: TSFFloat read FFdProjectionNear;
67 { Projection near, for shadow maps. See https://castle-engine.io/x3d_extensions_shadow_maps.php }
68 property ProjectionNear: Single read GetProjectionNear write SetProjectionNear;
69
70 strict private FFdProjectionFar: TSFFloat;
71 { Internal wrapper for property @code(ProjectionFar). This wrapper API may change, we advise to access simpler @code(ProjectionFar) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
72 public property FdProjectionFar: TSFFloat read FFdProjectionFar;
73 { Projection far, for shadow maps. See https://castle-engine.io/x3d_extensions_shadow_maps.php }
74 property ProjectionFar: Single read GetProjectionFar write SetProjectionFar;
75
76 strict private FFdUp: TSFVec3f;
77 { Internal wrapper for property @code(Up). This wrapper API may change, we advise to access simpler @code(Up) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
78 public property FdUp: TSFVec3f read FFdUp;
79 { View up vector, for shadow maps. See https://castle-engine.io/x3d_extensions_shadow_maps.php }
80 property Up: TVector3 read GetUp write SetUp;
81
82 strict private FFdDefaultShadowMap: TSFNode;
83 { Internal wrapper for property @code(DefaultShadowMap). This wrapper API may change, we advise to access simpler @code(DefaultShadowMap) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
84 public property FdDefaultShadowMap: TSFNode read FFdDefaultShadowMap;
85 { Shadow map used by this light source. See https://castle-engine.io/x3d_extensions_shadow_maps.php }
86 property DefaultShadowMap: TGeneratedShadowMapNode read GetDefaultShadowMap write SetDefaultShadowMap;
87
88 {$endif read_interface}
89
90 {$ifdef read_implementation}
91
92 { TAbstractPunctualLightNode ----------------------------------------------- }
93
94 function TAbstractPunctualLightNode.GetShadows: Boolean;
95 begin
96 Result := FdShadows.Value;
97 end;
98
99 procedure TAbstractPunctualLightNode.SetShadows(const Value: Boolean);
100 begin
101 FdShadows.Send(Value);
102 end;
103
104 function TAbstractPunctualLightNode.GetShadowVolumesMain: Boolean;
105 begin
106 Result := FdShadowVolumesMain.Value;
107 end;
108
109 procedure TAbstractPunctualLightNode.SetShadowVolumesMain(const Value: Boolean);
110 begin
111 FdShadowVolumesMain.Send(Value);
112 end;
113
114 function TAbstractPunctualLightNode.GetShowProxyGeometry: Boolean;
115 begin
116 Result := FdShowProxyGeometry.Value;
117 end;
118
119 procedure TAbstractPunctualLightNode.SetShowProxyGeometry(const Value: Boolean);
120 begin
121 FdShowProxyGeometry.Send(Value);
122 end;
123
124 function TAbstractPunctualLightNode.GetProjectionNear: Single;
125 begin
126 Result := FdProjectionNear.Value;
127 end;
128
129 procedure TAbstractPunctualLightNode.SetProjectionNear(const Value: Single);
130 begin
131 FdProjectionNear.Send(Value);
132 end;
133
134 function TAbstractPunctualLightNode.GetProjectionFar: Single;
135 begin
136 Result := FdProjectionFar.Value;
137 end;
138
139 procedure TAbstractPunctualLightNode.SetProjectionFar(const Value: Single);
140 begin
141 FdProjectionFar.Send(Value);
142 end;
143
144 function TAbstractPunctualLightNode.GetUp: TVector3;
145 begin
146 Result := FdUp.Value;
147 end;
148
149 procedure TAbstractPunctualLightNode.SetUp(const Value: TVector3);
150 begin
151 FdUp.Send(Value);
152 end;
153
154 function TAbstractPunctualLightNode.GetDefaultShadowMap: TGeneratedShadowMapNode;
155 begin
156 if FdDefaultShadowMap.Value is TGeneratedShadowMapNode then
157 Result := TGeneratedShadowMapNode(FdDefaultShadowMap.Value)
158 else
159 Result := nil;
160 end;
161
162 procedure TAbstractPunctualLightNode.SetDefaultShadowMap(const Value: TGeneratedShadowMapNode);
163 begin
164 FdDefaultShadowMap.Send(Value);
165 end;
166
167 class function TAbstractPunctualLightNode.ClassX3DType: String;
168 begin
169 Result := 'X3DPunctualLightNode';
170 end;
171
172 procedure TAbstractPunctualLightNode.CreateNode;
173 begin
174 inherited;
175
176 FFdShadows := TSFBool.Create(Self, False, 'shadows', false);
177 FdShadows.ChangeAlways := chShadowMaps;
178 AddField(FFdShadows);
179
180 FFdShadowVolumesMain := TSFBool.Create(Self, True, 'shadowVolumesMain', false);
181 FdShadowVolumesMain.ChangeAlways := chLightForShadowVolumes;
182 AddField(FFdShadowVolumesMain);
183
184 FFdShowProxyGeometry := TSFBool.Create(Self, True, 'showProxyGeometry', false);
185 FdShowProxyGeometry.ChangeAlways := chVisibleNonGeometry;
186 AddField(FFdShowProxyGeometry);
187
188 FFdProjectionNear := TSFFloat.Create(Self, True, 'projectionNear', 0);
189 FdProjectionNear.ChangeAlways := chVisibleGeometry;
190 AddField(FFdProjectionNear);
191
192 FFdProjectionFar := TSFFloat.Create(Self, True, 'projectionFar', 0);
193 FdProjectionFar.ChangeAlways := chVisibleGeometry;
194 AddField(FFdProjectionFar);
195
196 FFdUp := TSFVec3f.Create(Self, True, 'up', Vector3(0, 0, 0));
197 FdUp.ChangeAlways := chVisibleGeometry;
198 AddField(FFdUp);
199
200 FFdDefaultShadowMap := TSFNode.Create(Self, False, 'defaultShadowMap', [TGeneratedShadowMapNode]);
201 FdDefaultShadowMap.ChangeAlways := chEverything;
202 AddField(FFdDefaultShadowMap);
203 end;
204
205 {$endif read_implementation}