Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_navigationinfo.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 GetHeadlight: Boolean;
28 procedure SetHeadlight(const Value: Boolean);
29 function GetSpeed: Single;
30 procedure SetSpeed(const Value: Single);
31 function GetTransitionTime: TFloatTime;
32 procedure SetTransitionTime(const Value: TFloatTime);
33 function GetVisibilityLimit: Single;
34 procedure SetVisibilityLimit(const Value: Single);
35 function GetBlendingSort: TShapeSort;
36 procedure SetBlendingSort(const Value: TShapeSort);
37 function GetTimeOriginAtLoad: Boolean;
38 procedure SetTimeOriginAtLoad(const Value: Boolean);
39 function GetHeadBobbing: Single;
40 procedure SetHeadBobbing(const Value: Single);
41 function GetHeadBobbingTime: Single;
42 procedure SetHeadBobbingTime(const Value: Single);
43 function GetHeadlightNode: TAbstractLightNode;
44 procedure SetHeadlightNode(const Value: TAbstractLightNode);
45 public
46 { Create node fields and events. }
47 procedure CreateNode; override;
48 class function ClassX3DType: String; override;
49
50 strict private FFdAvatarSize: TMFFloat;
51 { Internal wrapper for property @code(AvatarSize). This wrapper API may change, we advise to access simpler @code(AvatarSize) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
52 public property FdAvatarSize: TMFFloat read FFdAvatarSize;
53 { }
54 procedure SetAvatarSize(const Value: array of Single); overload;
55 { }
56 procedure SetAvatarSize(const Value: TSingleList); overload;
57
58 strict private FFdHeadlight: TSFBool;
59 { Internal wrapper for property @code(Headlight). This wrapper API may change, we advise to access simpler @code(Headlight) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
60 public property FdHeadlight: TSFBool read FFdHeadlight;
61 { Control the headlight. @deprecated Instead of this, control the headlight by placing light component (like TCastleDirectionalLight or TCastleSpotLight) as child of TCastleCamera. }
62 property Headlight: Boolean read GetHeadlight write SetHeadlight;
63
64 strict private FFdSpeed: TSFFloat;
65 { Internal wrapper for property @code(Speed). This wrapper API may change, we advise to access simpler @code(Speed) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
66 public property FdSpeed: TSFFloat read FFdSpeed;
67 { Movement speed. @deprecated Instead of this, control the move speed using @link(TCastleWalkNavigation.MoveSpeed). }
68 property Speed: Single read GetSpeed write SetSpeed;
69
70 strict private FFdTransitionTime: TSFTime;
71 { Internal wrapper for property @code(TransitionTime). This wrapper API may change, we advise to access simpler @code(TransitionTime) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
72 public property FdTransitionTime: TSFTime read FFdTransitionTime;
73 { }
74 property TransitionTime: TFloatTime read GetTransitionTime write SetTransitionTime;
75
76 strict private FFdTransitionType: TMFString;
77 { Internal wrapper for property @code(TransitionType). This wrapper API may change, we advise to access simpler @code(TransitionType) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
78 public property FdTransitionType: TMFString read FFdTransitionType;
79 { }
80 procedure SetTransitionType(const Value: array of string); overload;
81 { }
82 procedure SetTransitionType(const Value: TCastleStringList); overload;
83
84 strict private FFdType: TMFString;
85 { Internal wrapper for property @code(Type). This wrapper API may change, we advise to access simpler @code(Type) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
86 public property FdType: TMFString read FFdType;
87 { }
88 procedure SetType(const Value: array of string); overload;
89 { }
90 procedure SetType(const Value: TCastleStringList); overload;
91
92 strict private FFdVisibilityLimit: TSFFloat;
93 { Internal wrapper for property @code(VisibilityLimit). This wrapper API may change, we advise to access simpler @code(VisibilityLimit) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
94 public property FdVisibilityLimit: TSFFloat read FFdVisibilityLimit;
95 { }
96 property VisibilityLimit: Single read GetVisibilityLimit write SetVisibilityLimit;
97
98 strict private FEventTransitionComplete: TSFBoolEvent;
99 { }
100 public property EventTransitionComplete: TSFBoolEvent read FEventTransitionComplete;
101
102 strict private FFdBlendingSort: TSFStringEnum;
103 { Internal wrapper for property @code(BlendingSort). This wrapper API may change, we advise to access simpler @code(BlendingSort) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
104 public property FdBlendingSort: TSFStringEnum read FFdBlendingSort;
105 { Best blending sort for this scene. It may be honored by some model viewers, e.g. castle-model-viewer honors this to display currently loaded scene.
106
107 Note: In CGE applications, the blending sort is determined by @link(TCastleViewport.BlendingSort). It is up to each particular application if, and how, to honor this value on @className. In general, CGE applications may display multiple models (multiple TCastleScene) and there's not necessarily any scene that is "central" or "main", so most CGE applications will just ignore this, at least on most loaded models.
108
109 If an application wants to honor this property of @className, then set @link(TCastleViewport.BlendingSort) based on the bound navigation info node. For example like this:
110
111 @longCode(#
112 if (Scene.NavigationInfoStack.Top <> nil) and
113 (Scene.NavigationInfoStack.Top.BlendingSort <> sortAuto) then
114 MainViewport.BlendingSort :=
115 Scene.NavigationInfoStack.Top.BlendingSort;
116 #)
117
118 The value sortAuto (specified as string "AUTO" in X3D file)
119 says to not change @link(TCastleViewport.BlendingSort).
120 The @link(TCastleViewport.BlendingSort) may be, in turn, also sortAuto,
121 which means that we will detect whether to use sort2D or sort3D depending
122 on camera. }
123 property BlendingSort: TShapeSort read GetBlendingSort write SetBlendingSort;
124
125 strict private FFdTimeOriginAtLoad: TSFBool;
126 { Internal wrapper for property @code(TimeOriginAtLoad). This wrapper API may change, we advise to access simpler @code(TimeOriginAtLoad) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
127 public property FdTimeOriginAtLoad: TSFBool read FFdTimeOriginAtLoad;
128 { @deprecated When this is @true, world time @link(TCastleSceneCore.Time) equals 0 when the scene is loaded. Otherwise (when this is @false, by default) world time 0 means "January 1, 1970" and when the scene is loaded the world time is a big number (and should only be processed as Double, not Single floating-point value). See https://castle-engine.io/x3d_time_origin_considered_uncomfortable.php for discussion. }
129 property TimeOriginAtLoad: Boolean read GetTimeOriginAtLoad write SetTimeOriginAtLoad;
130
131 strict private FFdHeadBobbing: TSFFloat;
132 { Internal wrapper for property @code(HeadBobbing). This wrapper API may change, we advise to access simpler @code(HeadBobbing) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
133 public property FdHeadBobbing: TSFFloat read FFdHeadBobbing;
134 { Intensity of head bobbing. 0 means to not do head bobbing. Must be >= 0 and < 1, but sensible values are close to 0 (while any values < 1 are technically allowed, but they make the head bobbing effect crazily exaggerated). See https://castle-engine.io/x3d_implementation_navigation_extensions.php }
135 property HeadBobbing: Single read GetHeadBobbing write SetHeadBobbing;
136
137 strict private FFdHeadBobbingTime: TSFFloat;
138 { Internal wrapper for property @code(HeadBobbingTime). This wrapper API may change, we advise to access simpler @code(HeadBobbingTime) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
139 public property FdHeadBobbingTime: TSFFloat read FFdHeadBobbingTime;
140 { How much time passes to make full head bobbing sequence (camera swing up and then down back to original height). See https://castle-engine.io/x3d_implementation_navigation_extensions.php }
141 property HeadBobbingTime: Single read GetHeadBobbingTime write SetHeadBobbingTime;
142
143 strict private FFdHeadlightNode: TSFNode;
144 { Internal wrapper for property @code(HeadlightNode). This wrapper API may change, we advise to access simpler @code(HeadlightNode) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
145 public property FdHeadlightNode: TSFNode read FFdHeadlightNode;
146 { Headlight to shine, if @link(Headlight) is @true. See https://castle-engine.io/x3d_implementation_navigation_extensions.php }
147 property HeadlightNode: TAbstractLightNode read GetHeadlightNode write SetHeadlightNode;
148
149 {$endif read_interface}
150
151 {$ifdef read_implementation}
152
153 { TNavigationInfoNode ----------------------------------------------- }
154
155 procedure TNavigationInfoNode.SetAvatarSize(const Value: array of Single);
156 begin
157 FdAvatarSize.Send(Value);
158 end;
159
160 procedure TNavigationInfoNode.SetAvatarSize(const Value: TSingleList);
161 begin
162 FdAvatarSize.Send(Value);
163 end;
164
165 function TNavigationInfoNode.GetHeadlight: Boolean;
166 begin
167 Result := FdHeadlight.Value;
168 end;
169
170 procedure TNavigationInfoNode.SetHeadlight(const Value: Boolean);
171 begin
172 FdHeadlight.Send(Value);
173 end;
174
175 function TNavigationInfoNode.GetSpeed: Single;
176 begin
177 Result := FdSpeed.Value;
178 end;
179
180 procedure TNavigationInfoNode.SetSpeed(const Value: Single);
181 begin
182 FdSpeed.Send(Value);
183 end;
184
185 function TNavigationInfoNode.GetTransitionTime: TFloatTime;
186 begin
187 Result := FdTransitionTime.Value;
188 end;
189
190 procedure TNavigationInfoNode.SetTransitionTime(const Value: TFloatTime);
191 begin
192 FdTransitionTime.Send(Value);
193 end;
194
195 procedure TNavigationInfoNode.SetTransitionType(const Value: array of string);
196 begin
197 FdTransitionType.Send(Value);
198 end;
199
200 procedure TNavigationInfoNode.SetTransitionType(const Value: TCastleStringList);
201 begin
202 FdTransitionType.Send(Value);
203 end;
204
205 procedure TNavigationInfoNode.SetType(const Value: array of string);
206 begin
207 FdType.Send(Value);
208 end;
209
210 procedure TNavigationInfoNode.SetType(const Value: TCastleStringList);
211 begin
212 FdType.Send(Value);
213 end;
214
215 function TNavigationInfoNode.GetVisibilityLimit: Single;
216 begin
217 Result := FdVisibilityLimit.Value;
218 end;
219
220 procedure TNavigationInfoNode.SetVisibilityLimit(const Value: Single);
221 begin
222 FdVisibilityLimit.Send(Value);
223 end;
224
225 function TNavigationInfoNode.GetBlendingSort: TShapeSort;
226 begin
227 Result := TShapeSort(FdBlendingSort.EnumValue);
228 end;
229
230 procedure TNavigationInfoNode.SetBlendingSort(const Value: TShapeSort);
231 begin
232 FdBlendingSort.SendEnumValue(Ord(Value));
233 end;
234
235 function TNavigationInfoNode.GetTimeOriginAtLoad: Boolean;
236 begin
237 Result := FdTimeOriginAtLoad.Value;
238 end;
239
240 procedure TNavigationInfoNode.SetTimeOriginAtLoad(const Value: Boolean);
241 begin
242 FdTimeOriginAtLoad.Send(Value);
243 end;
244
245 function TNavigationInfoNode.GetHeadBobbing: Single;
246 begin
247 Result := FdHeadBobbing.Value;
248 end;
249
250 procedure TNavigationInfoNode.SetHeadBobbing(const Value: Single);
251 begin
252 FdHeadBobbing.Send(Value);
253 end;
254
255 function TNavigationInfoNode.GetHeadBobbingTime: Single;
256 begin
257 Result := FdHeadBobbingTime.Value;
258 end;
259
260 procedure TNavigationInfoNode.SetHeadBobbingTime(const Value: Single);
261 begin
262 FdHeadBobbingTime.Send(Value);
263 end;
264
265 function TNavigationInfoNode.GetHeadlightNode: TAbstractLightNode;
266 begin
267 if FdHeadlightNode.Value is TAbstractLightNode then
268 Result := TAbstractLightNode(FdHeadlightNode.Value)
269 else
270 Result := nil;
271 end;
272
273 procedure TNavigationInfoNode.SetHeadlightNode(const Value: TAbstractLightNode);
274 begin
275 FdHeadlightNode.Send(Value);
276 end;
277
278 class function TNavigationInfoNode.ClassX3DType: String;
279 begin
280 Result := 'NavigationInfo';
281 end;
282
283 procedure TNavigationInfoNode.CreateNode;
284 begin
285 inherited;
286
287 FFdAvatarSize := TMFFloat.Create(Self, True, 'avatarSize', [0.25, 1.6, 0.75]);
288 FdAvatarSize.ChangeAlways := chNavigationInfo;
289 AddField(FFdAvatarSize);
290
291 FFdHeadlight := TSFBool.Create(Self, True, 'headlight', true);
292 FdHeadlight.ChangeAlways := chHeadLightOn;
293 AddField(FFdHeadlight);
294
295 FFdSpeed := TSFFloat.Create(Self, True, 'speed', 1.0);
296 FdSpeed.ChangeAlways := chNavigationInfo;
297 FdSpeed.MustBeNonnegative := true;
298 AddField(FFdSpeed);
299
300 FFdTransitionTime := TSFTime.Create(Self, True, 'transitionTime', 1.0);
301 FdTransitionTime.ChangeAlways := chVisibleNonGeometry;
302 AddField(FFdTransitionTime);
303
304 FFdTransitionType := TMFString.Create(Self, True, 'transitionType', ['LINEAR']);
305 FdTransitionType.ChangeAlways := chVisibleNonGeometry;
306 AddField(FFdTransitionType);
307
308 FFdType := TMFString.Create(Self, True, 'type', ['EXAMINE', 'ANY']);
309 FdType.ChangeAlways := chNavigationInfo;
310 AddField(FFdType);
311
312 FFdVisibilityLimit := TSFFloat.Create(Self, True, 'visibilityLimit', 0.0);
313 FdVisibilityLimit.ChangeAlways := chVisibleNonGeometry;
314 FdVisibilityLimit.MustBeNonnegative := true;
315 AddField(FFdVisibilityLimit);
316
317 FEventTransitionComplete := TSFBoolEvent.Create(Self, 'transitionComplete', false);
318 AddEvent(FEventTransitionComplete);
319
320 FFdBlendingSort := TSFStringEnum.Create(Self, True, 'blendingSort', @ShapeSortNames, Ord(High(ShapeSortNames)) + 1, Ord(sortAuto));
321 FdBlendingSort.ChangeAlways := chRedisplay;
322 AddField(FFdBlendingSort);
323
324 FFdTimeOriginAtLoad := TSFBool.Create(Self, False, 'timeOriginAtLoad', false);
325 FdTimeOriginAtLoad.ChangeAlways := chVisibleNonGeometry;
326 AddField(FFdTimeOriginAtLoad);
327
328 FFdHeadBobbing := TSFFloat.Create(Self, True, 'headBobbing', TCastleWalkNavigation.DefaultHeadBobbing);
329 FdHeadBobbing.ChangeAlways := chNavigationInfo;
330 FdHeadBobbing.MustBeNonnegative := true;
331 AddField(FFdHeadBobbing);
332
333 FFdHeadBobbingTime := TSFFloat.Create(Self, True, 'headBobbingTime', TCastleWalkNavigation.DefaultHeadBobbingTime);
334 FdHeadBobbingTime.ChangeAlways := chNavigationInfo;
335 FdHeadBobbingTime.MustBeNonnegative := true;
336 AddField(FFdHeadBobbingTime);
337
338 FFdHeadlightNode := TSFNode.Create(Self, True, 'headlightNode', [TAbstractLightNode]);
339 FdHeadlightNode.ChangeAlways := chVisibleNonGeometry;
340 AddField(FFdHeadlightNode);
341 end;
342
343 {$endif read_implementation}