Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_localfog.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 GetColor: TCastleColorRGB;
28 procedure SetColor(const Value: TCastleColorRGB);
29 function GetEnabled: Boolean;
30 procedure SetEnabled(const Value: Boolean);
31 function GetFogType: TFogType;
32 procedure SetFogType(const Value: TFogType);
33 function GetVisibilityRange: Single;
34 procedure SetVisibilityRange(const Value: Single);
35 function GetVolumetric: Boolean;
36 procedure SetVolumetric(const Value: Boolean);
37 function GetVolumetricDirection: TVector3;
38 procedure SetVolumetricDirection(const Value: TVector3);
39 function GetVolumetricVisibilityStart: Single;
40 procedure SetVolumetricVisibilityStart(const Value: Single);
41 public
42 { Create node fields and events. }
43 procedure CreateNode; override;
44 class function ClassX3DType: String; override;
45
46 strict private FFdColor: TSFColor;
47 { 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). }
48 public property FdColor: TSFColor read FFdColor;
49 { }
50 property Color: TCastleColorRGB read GetColor write SetColor;
51
52 strict private FFdEnabled: TSFBool;
53 { Internal wrapper for property @code(Enabled). This wrapper API may change, we advise to access simpler @code(Enabled) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
54 public property FdEnabled: TSFBool read FFdEnabled;
55 { }
56 property Enabled: Boolean read GetEnabled write SetEnabled;
57
58 strict private FFdFogType: TSFStringEnum;
59 { Internal wrapper for property @code(FogType). This wrapper API may change, we advise to access simpler @code(FogType) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
60 public property FdFogType: TSFStringEnum read FFdFogType;
61 { }
62 property FogType: TFogType read GetFogType write SetFogType;
63
64 strict private FFdVisibilityRange: TSFFloat;
65 { Internal wrapper for property @code(VisibilityRange). This wrapper API may change, we advise to access simpler @code(VisibilityRange) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
66 public property FdVisibilityRange: TSFFloat read FFdVisibilityRange;
67 { }
68 property VisibilityRange: Single read GetVisibilityRange write SetVisibilityRange;
69
70 strict private FFdVolumetric: TSFBool;
71 { Internal wrapper for property @code(Volumetric). This wrapper API may change, we advise to access simpler @code(Volumetric) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
72 public property FdVolumetric: TSFBool read FFdVolumetric;
73 { Activate volumetric fog, see https://castle-engine.io/x3d_extensions.php }
74 property Volumetric: Boolean read GetVolumetric write SetVolumetric;
75
76 strict private FFdVolumetricDirection: TSFVec3f;
77 { Internal wrapper for property @code(VolumetricDirection). This wrapper API may change, we advise to access simpler @code(VolumetricDirection) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
78 public property FdVolumetricDirection: TSFVec3f read FFdVolumetricDirection;
79 { }
80 property VolumetricDirection: TVector3 read GetVolumetricDirection write SetVolumetricDirection;
81
82 strict private FFdVolumetricVisibilityStart: TSFFloat;
83 { Internal wrapper for property @code(VolumetricVisibilityStart). This wrapper API may change, we advise to access simpler @code(VolumetricVisibilityStart) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
84 public property FdVolumetricVisibilityStart: TSFFloat read FFdVolumetricVisibilityStart;
85 { }
86 property VolumetricVisibilityStart: Single read GetVolumetricVisibilityStart write SetVolumetricVisibilityStart;
87
88 {$endif read_interface}
89
90 {$ifdef read_implementation}
91
92 { TLocalFogNode ----------------------------------------------- }
93
94 function TLocalFogNode.GetColor: TCastleColorRGB;
95 begin
96 Result := FdColor.Value;
97 end;
98
99 procedure TLocalFogNode.SetColor(const Value: TCastleColorRGB);
100 begin
101 FdColor.Send(Value);
102 end;
103
104 function TLocalFogNode.GetEnabled: Boolean;
105 begin
106 Result := FdEnabled.Value;
107 end;
108
109 procedure TLocalFogNode.SetEnabled(const Value: Boolean);
110 begin
111 FdEnabled.Send(Value);
112 end;
113
114 function TLocalFogNode.GetFogType: TFogType;
115 begin
116 Result := TFogType(FdFogType.EnumValue);
117 end;
118
119 procedure TLocalFogNode.SetFogType(const Value: TFogType);
120 begin
121 FdFogType.SendEnumValue(Ord(Value));
122 end;
123
124 function TLocalFogNode.GetVisibilityRange: Single;
125 begin
126 Result := FdVisibilityRange.Value;
127 end;
128
129 procedure TLocalFogNode.SetVisibilityRange(const Value: Single);
130 begin
131 FdVisibilityRange.Send(Value);
132 end;
133
134 function TLocalFogNode.GetVolumetric: Boolean;
135 begin
136 Result := FdVolumetric.Value;
137 end;
138
139 procedure TLocalFogNode.SetVolumetric(const Value: Boolean);
140 begin
141 FdVolumetric.Send(Value);
142 end;
143
144 function TLocalFogNode.GetVolumetricDirection: TVector3;
145 begin
146 Result := FdVolumetricDirection.Value;
147 end;
148
149 procedure TLocalFogNode.SetVolumetricDirection(const Value: TVector3);
150 begin
151 FdVolumetricDirection.Send(Value);
152 end;
153
154 function TLocalFogNode.GetVolumetricVisibilityStart: Single;
155 begin
156 Result := FdVolumetricVisibilityStart.Value;
157 end;
158
159 procedure TLocalFogNode.SetVolumetricVisibilityStart(const Value: Single);
160 begin
161 FdVolumetricVisibilityStart.Send(Value);
162 end;
163
164 class function TLocalFogNode.ClassX3DType: String;
165 begin
166 Result := 'LocalFog';
167 end;
168
169 procedure TLocalFogNode.CreateNode;
170 begin
171 inherited;
172
173 FFdColor := TSFColor.Create(Self, True, 'color', Vector3(1, 1, 1));
174 FdColor.ChangeAlways := chVisibleNonGeometry;
175 AddField(FFdColor);
176
177 FFdEnabled := TSFBool.Create(Self, True, 'enabled', true);
178 FdEnabled.ChangeAlways := chVisibleNonGeometry;
179 AddField(FFdEnabled);
180
181 FFdFogType := TSFStringEnum.Create(Self, True, 'fogType', @FogTypeNames, Ord(High(FogTypeNames)) + 1, Ord(ftLinear));
182 FdFogType.ChangeAlways := chVisibleNonGeometry;
183 AddField(FFdFogType);
184
185 FFdVisibilityRange := TSFFloat.Create(Self, True, 'visibilityRange', 0);
186 FdVisibilityRange.ChangeAlways := chVisibleNonGeometry;
187 AddField(FFdVisibilityRange);
188
189 FFdVolumetric := TSFBool.Create(Self, True, 'volumetric', false);
190 FdVolumetric.ChangeAlways := chEverything;
191 AddField(FFdVolumetric);
192
193 FFdVolumetricDirection := TSFVec3f.Create(Self, True, 'volumetricDirection', Vector3(0, -1, 0));
194 FdVolumetricDirection.ChangeAlways := chEverything;
195 AddField(FFdVolumetricDirection);
196
197 FFdVolumetricVisibilityStart := TSFFloat.Create(Self, True, 'volumetricVisibilityStart', 0);
198 FdVolumetricVisibilityStart.ChangeAlways := chEverything;
199 AddField(FFdVolumetricVisibilityStart);
200 end;
201
202 {$endif read_implementation}