Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_hanimsegment.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 GetCenterOfMass: TVector3;
28 procedure SetCenterOfMass(const Value: TVector3);
29 function GetCoord: TAbstractCoordinateNode;
30 procedure SetCoord(const Value: TAbstractCoordinateNode);
31 function GetDescription: String;
32 procedure SetDescription(const Value: String);
33 function GetMass: Single;
34 procedure SetMass(const Value: Single);
35 function GetNameField: String;
36 procedure SetNameField(const Value: String);
37 function GetRotation: TVector4;
38 procedure SetRotation(const Value: TVector4);
39 function GetScale: TVector3;
40 procedure SetScale(const Value: TVector3);
41 function GetTranslation: TVector3;
42 procedure SetTranslation(const Value: TVector3);
43 public
44 { Create node fields and events. }
45 procedure CreateNode; override;
46 class function ClassX3DType: String; override;
47
48 strict private FFdCenterOfMass: TSFVec3f;
49 { Internal wrapper for property @code(CenterOfMass). This wrapper API may change, we advise to access simpler @code(CenterOfMass) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
50 public property FdCenterOfMass: TSFVec3f read FFdCenterOfMass;
51 { }
52 property CenterOfMass: TVector3 read GetCenterOfMass write SetCenterOfMass;
53
54 strict private FFdCoord: TSFNode;
55 { Internal wrapper for property @code(Coord). This wrapper API may change, we advise to access simpler @code(Coord) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
56 public property FdCoord: TSFNode read FFdCoord;
57 { }
58 property Coord: TAbstractCoordinateNode read GetCoord write SetCoord;
59
60 strict private FFdDescription: TSFString;
61 { Internal wrapper for property @code(Description). This wrapper API may change, we advise to access simpler @code(Description) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
62 public property FdDescription: TSFString read FFdDescription;
63 { }
64 property Description: String read GetDescription write SetDescription;
65
66 strict private FFdDisplacers: TMFNode;
67 { Internal wrapper for property @code(Displacers). This wrapper API may change, we advise to access simpler @code(Displacers) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
68 public property FdDisplacers: TMFNode read FFdDisplacers;
69 { }
70 procedure SetDisplacers(const Value: array of THAnimDisplacerNode);
71
72 strict private FFdMass: TSFFloat;
73 { Internal wrapper for property @code(Mass). This wrapper API may change, we advise to access simpler @code(Mass) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
74 public property FdMass: TSFFloat read FFdMass;
75 { }
76 property Mass: Single read GetMass write SetMass;
77
78 strict private FFdMomentsOfInertia: TMFFloat;
79 { Internal wrapper for property @code(MomentsOfInertia). This wrapper API may change, we advise to access simpler @code(MomentsOfInertia) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
80 public property FdMomentsOfInertia: TMFFloat read FFdMomentsOfInertia;
81 { }
82 procedure SetMomentsOfInertia(const Value: array of Single); overload;
83 { }
84 procedure SetMomentsOfInertia(const Value: TSingleList); overload;
85
86 strict private FFdName: TSFString;
87 { Internal wrapper for property @code(NameField). This wrapper API may change, we advise to access simpler @code(NameField) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
88 public property FdName: TSFString read FFdName;
89 { }
90 property NameField: String read GetNameField write SetNameField;
91
92 strict private FFdRotation: TSFRotation;
93 { Internal wrapper for property @code(Rotation). This wrapper API may change, we advise to access simpler @code(Rotation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
94 public property FdRotation: TSFRotation read FFdRotation;
95 { }
96 property Rotation: TVector4 read GetRotation write SetRotation;
97
98 strict private FFdScale: TSFVec3f;
99 { Internal wrapper for property @code(Scale). This wrapper API may change, we advise to access simpler @code(Scale) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
100 public property FdScale: TSFVec3f read FFdScale;
101 { }
102 property Scale: TVector3 read GetScale write SetScale;
103
104 strict private FFdTranslation: TSFVec3f;
105 { Internal wrapper for property @code(Translation). This wrapper API may change, we advise to access simpler @code(Translation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
106 public property FdTranslation: TSFVec3f read FFdTranslation;
107 { }
108 property Translation: TVector3 read GetTranslation write SetTranslation;
109
110 {$endif read_interface}
111
112 {$ifdef read_implementation}
113
114 { THAnimSegmentNode ----------------------------------------------- }
115
116 function THAnimSegmentNode.GetCenterOfMass: TVector3;
117 begin
118 Result := FdCenterOfMass.Value;
119 end;
120
121 procedure THAnimSegmentNode.SetCenterOfMass(const Value: TVector3);
122 begin
123 FdCenterOfMass.Send(Value);
124 end;
125
126 function THAnimSegmentNode.GetCoord: TAbstractCoordinateNode;
127 begin
128 if FdCoord.Value is TAbstractCoordinateNode then
129 Result := TAbstractCoordinateNode(FdCoord.Value)
130 else
131 Result := nil;
132 end;
133
134 procedure THAnimSegmentNode.SetCoord(const Value: TAbstractCoordinateNode);
135 begin
136 FdCoord.Send(Value);
137 end;
138
139 function THAnimSegmentNode.GetDescription: String;
140 begin
141 Result := FdDescription.Value;
142 end;
143
144 procedure THAnimSegmentNode.SetDescription(const Value: String);
145 begin
146 FdDescription.Send(Value);
147 end;
148
149 procedure THAnimSegmentNode.SetDisplacers(const Value: array of THAnimDisplacerNode);
150 var
151 L: Integer;
152 A: array of TX3DNode;
153 begin
154 L := High(Value) + 1;
155 SetLength(A, L);
156 if L > 0 then
157 Move(Value[0], A[0], L * SizeOf(THAnimDisplacerNode));
158 FdDisplacers.Send(A);
159 end;
160
161 function THAnimSegmentNode.GetMass: Single;
162 begin
163 Result := FdMass.Value;
164 end;
165
166 procedure THAnimSegmentNode.SetMass(const Value: Single);
167 begin
168 FdMass.Send(Value);
169 end;
170
171 procedure THAnimSegmentNode.SetMomentsOfInertia(const Value: array of Single);
172 begin
173 FdMomentsOfInertia.Send(Value);
174 end;
175
176 procedure THAnimSegmentNode.SetMomentsOfInertia(const Value: TSingleList);
177 begin
178 FdMomentsOfInertia.Send(Value);
179 end;
180
181 function THAnimSegmentNode.GetNameField: String;
182 begin
183 Result := FdName.Value;
184 end;
185
186 procedure THAnimSegmentNode.SetNameField(const Value: String);
187 begin
188 FdName.Send(Value);
189 end;
190
191 function THAnimSegmentNode.GetRotation: TVector4;
192 begin
193 Result := FdRotation.Value;
194 end;
195
196 procedure THAnimSegmentNode.SetRotation(const Value: TVector4);
197 begin
198 FdRotation.Send(Value);
199 end;
200
201 function THAnimSegmentNode.GetScale: TVector3;
202 begin
203 Result := FdScale.Value;
204 end;
205
206 procedure THAnimSegmentNode.SetScale(const Value: TVector3);
207 begin
208 FdScale.Send(Value);
209 end;
210
211 function THAnimSegmentNode.GetTranslation: TVector3;
212 begin
213 Result := FdTranslation.Value;
214 end;
215
216 procedure THAnimSegmentNode.SetTranslation(const Value: TVector3);
217 begin
218 FdTranslation.Send(Value);
219 end;
220
221 class function THAnimSegmentNode.ClassX3DType: String;
222 begin
223 Result := 'HAnimSegment';
224 end;
225
226 procedure THAnimSegmentNode.CreateNode;
227 begin
228 inherited;
229
230 FFdCenterOfMass := TSFVec3f.Create(Self, True, 'centerOfMass', Vector3(0, 0, 0));
231 FdCenterOfMass.ChangeAlways := chVisibleNonGeometry;
232 AddField(FFdCenterOfMass);
233
234 FFdCoord := TSFNode.Create(Self, True, 'coord', [TAbstractCoordinateNode]);
235 FdCoord.ChangeAlways := chVisibleNonGeometry;
236 AddField(FFdCoord);
237
238 FFdDescription := TSFString.Create(Self, True, 'description', '');
239 FdDescription.ChangeAlways := chNone;
240 AddField(FFdDescription);
241
242 FFdDisplacers := TMFNode.Create(Self, True, 'displacers', [THAnimDisplacerNode]);
243 FdDisplacers.ChangeAlways := chVisibleNonGeometry;
244 AddField(FFdDisplacers);
245
246 FFdMass := TSFFloat.Create(Self, True, 'mass', 0);
247 FdMass.ChangeAlways := chVisibleNonGeometry;
248 FdMass.MustBeNonnegative := true;
249 AddField(FFdMass);
250
251 FFdMomentsOfInertia := TMFFloat.Create(Self, True, 'momentsOfInertia', [0, 0, 0, 0, 0, 0, 0, 0, 0]);
252 FdMomentsOfInertia.ChangeAlways := chVisibleNonGeometry;
253 AddField(FFdMomentsOfInertia);
254
255 FFdName := TSFString.Create(Self, True, 'name', '');
256 FdName.ChangeAlways := chVisibleNonGeometry;
257 AddField(FFdName);
258
259 FFdRotation := TSFRotation.Create(Self, True, 'rotation', Vector3(0, 0, 1), 0);
260 FdRotation.ChangeAlways := chTransform;
261 AddField(FFdRotation);
262
263 FFdScale := TSFVec3f.Create(Self, True, 'scale', Vector3(1, 1, 1));
264 FdScale.ChangeAlways := chTransform;
265 AddField(FFdScale);
266
267 FFdTranslation := TSFVec3f.Create(Self, True, 'translation', Vector3(0, 0, 0));
268 FdTranslation.ChangeAlways := chTransform;
269 AddField(FFdTranslation);
270 end;
271
272 {$endif read_implementation}