Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_inline.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 GetLoad: Boolean;
28 procedure SetLoad(const Value: Boolean);
29 function GetBBox: TBox3D;
30 procedure SetBBox(const Value: TBox3D);
31 public
32 { Create node fields and events. }
33 procedure CreateNode; override;
34 class function ClassX3DType: String; override;
35
36 strict private FFdLoad: TSFBool;
37 { Internal wrapper for property @code(Load). This wrapper API may change, we advise to access simpler @code(Load) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
38 public property FdLoad: TSFBool read FFdLoad;
39 { }
40 property Load: Boolean read GetLoad write SetLoad;
41
42 strict private FFdUrl: TMFString;
43 { Internal wrapper for property @code(Url). This wrapper API may change, we advise to access simpler @code(Url) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
44 public property FdUrl: TMFString read FFdUrl;
45 { }
46 procedure SetUrl(const Value: array of string); overload;
47 { }
48 procedure SetUrl(const Value: TCastleStringList); overload;
49
50 strict private FFdBboxCenter: TSFVec3f;
51 { Internal wrapper for property @code(BboxCenter). This wrapper API may change, we advise to access simpler @code(BboxCenter) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
52 public property FdBboxCenter: TSFVec3f read FFdBboxCenter;
53 { }
54 property BBox: TBox3D read GetBBox write SetBBox;
55
56 strict private FFdBboxSize: TSFVec3f;
57 { Internal wrapper for property @code(BboxSize). This wrapper API may change, we advise to access simpler @code(BboxSize) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
58 public property FdBboxSize: TSFVec3f read FFdBboxSize;
59
60 {$endif read_interface}
61
62 {$ifdef read_implementation}
63
64 { TInlineNode ----------------------------------------------- }
65
66 function TInlineNode.GetLoad: Boolean;
67 begin
68 Result := FdLoad.Value;
69 end;
70
71 procedure TInlineNode.SetLoad(const Value: Boolean);
72 begin
73 FdLoad.Send(Value);
74 end;
75
76 procedure TInlineNode.SetUrl(const Value: array of string);
77 begin
78 FdUrl.Send(Value);
79 end;
80
81 procedure TInlineNode.SetUrl(const Value: TCastleStringList);
82 begin
83 FdUrl.Send(Value);
84 end;
85
86 function TInlineNode.GetBBox: TBox3D;
87 begin
88 Result := TBox3D.FromCenterSize(FdBBoxCenter.Value, FdBBoxSize.Value);
89 end;
90
91 procedure TInlineNode.SetBBox(const Value: TBox3D);
92 var
93 ValueCenter, ValueSize: TVector3;
94 begin
95 Value.ToCenterSize(ValueCenter, ValueSize);
96 FdBBoxCenter.Send(ValueCenter);
97 FdBBoxSize.Send(ValueSize);
98 end;
99
100 class function TInlineNode.ClassX3DType: String;
101 begin
102 Result := 'Inline';
103 end;
104
105 procedure TInlineNode.CreateNode;
106 begin
107 inherited;
108
109 FFdLoad := TSFBool.Create(Self, True, 'load', true);
110 FdLoad.ChangeAlways := chVisibleNonGeometry;
111 AddField(FFdLoad);
112
113 FFdUrl := TMFString.Create(Self, True, 'url', []);
114 FdUrl.ChangeAlways := chVisibleNonGeometry;
115 AddField(FFdUrl);
116
117 FFdBboxCenter := TSFVec3f.Create(Self, False, 'bboxCenter', Vector3(0, 0, 0));
118 FdBboxCenter.ChangeAlways := chVisibleNonGeometry;
119 AddField(FFdBboxCenter);
120
121 FFdBboxSize := TSFVec3f.Create(Self, False, 'bboxSize', Vector3(-1, -1, -1));
122 FdBboxSize.ChangeAlways := chVisibleNonGeometry;
123 AddField(FFdBboxSize);
124 end;
125
126 {$endif read_implementation}