Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_contact.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 GetBody1: TRigidBodyNode;
28 procedure SetBody1(const Value: TRigidBodyNode);
29 function GetBody2: TRigidBodyNode;
30 procedure SetBody2(const Value: TRigidBodyNode);
31 function GetBounce: Single;
32 procedure SetBounce(const Value: Single);
33 function GetContactNormal: TVector3;
34 procedure SetContactNormal(const Value: TVector3);
35 function GetDepth: Single;
36 procedure SetDepth(const Value: Single);
37 function GetFrictionCoefficients: TVector2;
38 procedure SetFrictionCoefficients(const Value: TVector2);
39 function GetFrictionDirection: TVector3;
40 procedure SetFrictionDirection(const Value: TVector3);
41 function GetGeometry1: TAbstractNBodyCollidableNode;
42 procedure SetGeometry1(const Value: TAbstractNBodyCollidableNode);
43 function GetGeometry2: TAbstractNBodyCollidableNode;
44 procedure SetGeometry2(const Value: TAbstractNBodyCollidableNode);
45 function GetMinbounceSpeed: Single;
46 procedure SetMinbounceSpeed(const Value: Single);
47 function GetPosition: TVector3;
48 procedure SetPosition(const Value: TVector3);
49 function GetSlipCoefficients: TVector2;
50 procedure SetSlipCoefficients(const Value: TVector2);
51 function GetSoftnessConstantForceMix: Single;
52 procedure SetSoftnessConstantForceMix(const Value: Single);
53 function GetSoftnessErrorCorrection: Single;
54 procedure SetSoftnessErrorCorrection(const Value: Single);
55 function GetSurfaceSpeed: TVector2;
56 procedure SetSurfaceSpeed(const Value: TVector2);
57 public
58 { Create node fields and events. }
59 procedure CreateNode; override;
60 class function ClassX3DType: String; override;
61
62 strict private FFdAppliedParameters: TMFString;
63 { Internal wrapper for property @code(AppliedParameters). This wrapper API may change, we advise to access simpler @code(AppliedParameters) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
64 public property FdAppliedParameters: TMFString read FFdAppliedParameters;
65 { }
66 procedure SetAppliedParameters(const Value: array of string); overload;
67 { }
68 procedure SetAppliedParameters(const Value: TCastleStringList); overload;
69
70 strict private FFdBody1: TSFNode;
71 { Internal wrapper for property @code(Body1). This wrapper API may change, we advise to access simpler @code(Body1) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
72 public property FdBody1: TSFNode read FFdBody1;
73 { }
74 property Body1: TRigidBodyNode read GetBody1 write SetBody1;
75
76 strict private FFdBody2: TSFNode;
77 { Internal wrapper for property @code(Body2). This wrapper API may change, we advise to access simpler @code(Body2) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
78 public property FdBody2: TSFNode read FFdBody2;
79 { }
80 property Body2: TRigidBodyNode read GetBody2 write SetBody2;
81
82 strict private FFdBounce: TSFFloat;
83 { Internal wrapper for property @code(Bounce). This wrapper API may change, we advise to access simpler @code(Bounce) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
84 public property FdBounce: TSFFloat read FFdBounce;
85 { }
86 property Bounce: Single read GetBounce write SetBounce;
87
88 strict private FFdContactNormal: TSFVec3f;
89 { Internal wrapper for property @code(ContactNormal). This wrapper API may change, we advise to access simpler @code(ContactNormal) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
90 public property FdContactNormal: TSFVec3f read FFdContactNormal;
91 { }
92 property ContactNormal: TVector3 read GetContactNormal write SetContactNormal;
93
94 strict private FFdDepth: TSFFloat;
95 { Internal wrapper for property @code(Depth). This wrapper API may change, we advise to access simpler @code(Depth) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
96 public property FdDepth: TSFFloat read FFdDepth;
97 { }
98 property Depth: Single read GetDepth write SetDepth;
99
100 strict private FFdFrictionCoefficients: TSFVec2f;
101 { Internal wrapper for property @code(FrictionCoefficients). This wrapper API may change, we advise to access simpler @code(FrictionCoefficients) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
102 public property FdFrictionCoefficients: TSFVec2f read FFdFrictionCoefficients;
103 { }
104 property FrictionCoefficients: TVector2 read GetFrictionCoefficients write SetFrictionCoefficients;
105
106 strict private FFdFrictionDirection: TSFVec3f;
107 { Internal wrapper for property @code(FrictionDirection). This wrapper API may change, we advise to access simpler @code(FrictionDirection) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
108 public property FdFrictionDirection: TSFVec3f read FFdFrictionDirection;
109 { }
110 property FrictionDirection: TVector3 read GetFrictionDirection write SetFrictionDirection;
111
112 strict private FFdGeometry1: TSFNode;
113 { Internal wrapper for property @code(Geometry1). This wrapper API may change, we advise to access simpler @code(Geometry1) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
114 public property FdGeometry1: TSFNode read FFdGeometry1;
115 { }
116 property Geometry1: TAbstractNBodyCollidableNode read GetGeometry1 write SetGeometry1;
117
118 strict private FFdGeometry2: TSFNode;
119 { Internal wrapper for property @code(Geometry2). This wrapper API may change, we advise to access simpler @code(Geometry2) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
120 public property FdGeometry2: TSFNode read FFdGeometry2;
121 { }
122 property Geometry2: TAbstractNBodyCollidableNode read GetGeometry2 write SetGeometry2;
123
124 strict private FFdMinbounceSpeed: TSFFloat;
125 { Internal wrapper for property @code(MinbounceSpeed). This wrapper API may change, we advise to access simpler @code(MinbounceSpeed) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
126 public property FdMinbounceSpeed: TSFFloat read FFdMinbounceSpeed;
127 { }
128 property MinbounceSpeed: Single read GetMinbounceSpeed write SetMinbounceSpeed;
129
130 strict private FFdPosition: TSFVec3f;
131 { Internal wrapper for property @code(Position). This wrapper API may change, we advise to access simpler @code(Position) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
132 public property FdPosition: TSFVec3f read FFdPosition;
133 { }
134 property Position: TVector3 read GetPosition write SetPosition;
135
136 strict private FFdSlipCoefficients: TSFVec2f;
137 { Internal wrapper for property @code(SlipCoefficients). This wrapper API may change, we advise to access simpler @code(SlipCoefficients) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
138 public property FdSlipCoefficients: TSFVec2f read FFdSlipCoefficients;
139 { }
140 property SlipCoefficients: TVector2 read GetSlipCoefficients write SetSlipCoefficients;
141
142 strict private FFdSoftnessConstantForceMix: TSFFloat;
143 { Internal wrapper for property @code(SoftnessConstantForceMix). This wrapper API may change, we advise to access simpler @code(SoftnessConstantForceMix) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
144 public property FdSoftnessConstantForceMix: TSFFloat read FFdSoftnessConstantForceMix;
145 { }
146 property SoftnessConstantForceMix: Single read GetSoftnessConstantForceMix write SetSoftnessConstantForceMix;
147
148 strict private FFdSoftnessErrorCorrection: TSFFloat;
149 { Internal wrapper for property @code(SoftnessErrorCorrection). This wrapper API may change, we advise to access simpler @code(SoftnessErrorCorrection) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
150 public property FdSoftnessErrorCorrection: TSFFloat read FFdSoftnessErrorCorrection;
151 { }
152 property SoftnessErrorCorrection: Single read GetSoftnessErrorCorrection write SetSoftnessErrorCorrection;
153
154 strict private FFdSurfaceSpeed: TSFVec2f;
155 { Internal wrapper for property @code(SurfaceSpeed). This wrapper API may change, we advise to access simpler @code(SurfaceSpeed) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
156 public property FdSurfaceSpeed: TSFVec2f read FFdSurfaceSpeed;
157 { }
158 property SurfaceSpeed: TVector2 read GetSurfaceSpeed write SetSurfaceSpeed;
159
160 {$endif read_interface}
161
162 {$ifdef read_implementation}
163
164 { TContactNode ----------------------------------------------- }
165
166 procedure TContactNode.SetAppliedParameters(const Value: array of string);
167 begin
168 FdAppliedParameters.Send(Value);
169 end;
170
171 procedure TContactNode.SetAppliedParameters(const Value: TCastleStringList);
172 begin
173 FdAppliedParameters.Send(Value);
174 end;
175
176 function TContactNode.GetBody1: TRigidBodyNode;
177 begin
178 if FdBody1.Value is TRigidBodyNode then
179 Result := TRigidBodyNode(FdBody1.Value)
180 else
181 Result := nil;
182 end;
183
184 procedure TContactNode.SetBody1(const Value: TRigidBodyNode);
185 begin
186 FdBody1.Send(Value);
187 end;
188
189 function TContactNode.GetBody2: TRigidBodyNode;
190 begin
191 if FdBody2.Value is TRigidBodyNode then
192 Result := TRigidBodyNode(FdBody2.Value)
193 else
194 Result := nil;
195 end;
196
197 procedure TContactNode.SetBody2(const Value: TRigidBodyNode);
198 begin
199 FdBody2.Send(Value);
200 end;
201
202 function TContactNode.GetBounce: Single;
203 begin
204 Result := FdBounce.Value;
205 end;
206
207 procedure TContactNode.SetBounce(const Value: Single);
208 begin
209 FdBounce.Send(Value);
210 end;
211
212 function TContactNode.GetContactNormal: TVector3;
213 begin
214 Result := FdContactNormal.Value;
215 end;
216
217 procedure TContactNode.SetContactNormal(const Value: TVector3);
218 begin
219 FdContactNormal.Send(Value);
220 end;
221
222 function TContactNode.GetDepth: Single;
223 begin
224 Result := FdDepth.Value;
225 end;
226
227 procedure TContactNode.SetDepth(const Value: Single);
228 begin
229 FdDepth.Send(Value);
230 end;
231
232 function TContactNode.GetFrictionCoefficients: TVector2;
233 begin
234 Result := FdFrictionCoefficients.Value;
235 end;
236
237 procedure TContactNode.SetFrictionCoefficients(const Value: TVector2);
238 begin
239 FdFrictionCoefficients.Send(Value);
240 end;
241
242 function TContactNode.GetFrictionDirection: TVector3;
243 begin
244 Result := FdFrictionDirection.Value;
245 end;
246
247 procedure TContactNode.SetFrictionDirection(const Value: TVector3);
248 begin
249 FdFrictionDirection.Send(Value);
250 end;
251
252 function TContactNode.GetGeometry1: TAbstractNBodyCollidableNode;
253 begin
254 if FdGeometry1.Value is TAbstractNBodyCollidableNode then
255 Result := TAbstractNBodyCollidableNode(FdGeometry1.Value)
256 else
257 Result := nil;
258 end;
259
260 procedure TContactNode.SetGeometry1(const Value: TAbstractNBodyCollidableNode);
261 begin
262 FdGeometry1.Send(Value);
263 end;
264
265 function TContactNode.GetGeometry2: TAbstractNBodyCollidableNode;
266 begin
267 if FdGeometry2.Value is TAbstractNBodyCollidableNode then
268 Result := TAbstractNBodyCollidableNode(FdGeometry2.Value)
269 else
270 Result := nil;
271 end;
272
273 procedure TContactNode.SetGeometry2(const Value: TAbstractNBodyCollidableNode);
274 begin
275 FdGeometry2.Send(Value);
276 end;
277
278 function TContactNode.GetMinbounceSpeed: Single;
279 begin
280 Result := FdMinbounceSpeed.Value;
281 end;
282
283 procedure TContactNode.SetMinbounceSpeed(const Value: Single);
284 begin
285 FdMinbounceSpeed.Send(Value);
286 end;
287
288 function TContactNode.GetPosition: TVector3;
289 begin
290 Result := FdPosition.Value;
291 end;
292
293 procedure TContactNode.SetPosition(const Value: TVector3);
294 begin
295 FdPosition.Send(Value);
296 end;
297
298 function TContactNode.GetSlipCoefficients: TVector2;
299 begin
300 Result := FdSlipCoefficients.Value;
301 end;
302
303 procedure TContactNode.SetSlipCoefficients(const Value: TVector2);
304 begin
305 FdSlipCoefficients.Send(Value);
306 end;
307
308 function TContactNode.GetSoftnessConstantForceMix: Single;
309 begin
310 Result := FdSoftnessConstantForceMix.Value;
311 end;
312
313 procedure TContactNode.SetSoftnessConstantForceMix(const Value: Single);
314 begin
315 FdSoftnessConstantForceMix.Send(Value);
316 end;
317
318 function TContactNode.GetSoftnessErrorCorrection: Single;
319 begin
320 Result := FdSoftnessErrorCorrection.Value;
321 end;
322
323 procedure TContactNode.SetSoftnessErrorCorrection(const Value: Single);
324 begin
325 FdSoftnessErrorCorrection.Send(Value);
326 end;
327
328 function TContactNode.GetSurfaceSpeed: TVector2;
329 begin
330 Result := FdSurfaceSpeed.Value;
331 end;
332
333 procedure TContactNode.SetSurfaceSpeed(const Value: TVector2);
334 begin
335 FdSurfaceSpeed.Send(Value);
336 end;
337
338 class function TContactNode.ClassX3DType: String;
339 begin
340 Result := 'Contact';
341 end;
342
343 procedure TContactNode.CreateNode;
344 begin
345 inherited;
346
347 FFdAppliedParameters := TMFString.Create(Self, True, 'appliedParameters', ['BOUNCE']);
348 FdAppliedParameters.ChangeAlways := chVisibleNonGeometry;
349 AddField(FFdAppliedParameters);
350
351 FFdBody1 := TSFNode.Create(Self, True, 'body1', [TRigidBodyNode]);
352 FdBody1.ChangeAlways := chVisibleNonGeometry;
353 AddField(FFdBody1);
354
355 FFdBody2 := TSFNode.Create(Self, True, 'body2', [TRigidBodyNode]);
356 FdBody2.ChangeAlways := chVisibleNonGeometry;
357 AddField(FFdBody2);
358
359 FFdBounce := TSFFloat.Create(Self, True, 'bounce', 0);
360 FdBounce.ChangeAlways := chVisibleNonGeometry;
361 FdBounce.MustBeNonnegative := true;
362 AddField(FFdBounce);
363
364 FFdContactNormal := TSFVec3f.Create(Self, True, 'contactNormal', Vector3(0, 1, 0));
365 FdContactNormal.ChangeAlways := chVisibleNonGeometry;
366 AddField(FFdContactNormal);
367
368 FFdDepth := TSFFloat.Create(Self, True, 'depth', 0);
369 FdDepth.ChangeAlways := chVisibleNonGeometry;
370 AddField(FFdDepth);
371
372 FFdFrictionCoefficients := TSFVec2f.Create(Self, True, 'frictionCoefficients', Vector2(0, 0));
373 FdFrictionCoefficients.ChangeAlways := chVisibleNonGeometry;
374 AddField(FFdFrictionCoefficients);
375
376 FFdFrictionDirection := TSFVec3f.Create(Self, True, 'frictionDirection', Vector3(0, 1, 0));
377 FdFrictionDirection.ChangeAlways := chVisibleNonGeometry;
378 AddField(FFdFrictionDirection);
379
380 FFdGeometry1 := TSFNode.Create(Self, True, 'geometry1', [TAbstractNBodyCollidableNode]);
381 FdGeometry1.ChangeAlways := chVisibleNonGeometry;
382 AddField(FFdGeometry1);
383
384 FFdGeometry2 := TSFNode.Create(Self, True, 'geometry2', [TAbstractNBodyCollidableNode]);
385 FdGeometry2.ChangeAlways := chVisibleNonGeometry;
386 AddField(FFdGeometry2);
387
388 FFdMinbounceSpeed := TSFFloat.Create(Self, True, 'minbounceSpeed', 0);
389 FdMinbounceSpeed.ChangeAlways := chVisibleNonGeometry;
390 FdMinbounceSpeed.MustBeNonnegative := true;
391 AddField(FFdMinbounceSpeed);
392
393 FFdPosition := TSFVec3f.Create(Self, True, 'position', Vector3(0, 0, 0));
394 FdPosition.ChangeAlways := chVisibleNonGeometry;
395 AddField(FFdPosition);
396
397 FFdSlipCoefficients := TSFVec2f.Create(Self, True, 'slipCoefficients', Vector2(0, 0));
398 FdSlipCoefficients.ChangeAlways := chVisibleNonGeometry;
399 AddField(FFdSlipCoefficients);
400
401 FFdSoftnessConstantForceMix := TSFFloat.Create(Self, True, 'softnessConstantForceMix', 0.0001);
402 FdSoftnessConstantForceMix.ChangeAlways := chVisibleNonGeometry;
403 FdSoftnessConstantForceMix.MustBeNonnegative := true;
404 AddField(FFdSoftnessConstantForceMix);
405
406 FFdSoftnessErrorCorrection := TSFFloat.Create(Self, True, 'softnessErrorCorrection', 0.8);
407 FdSoftnessErrorCorrection.ChangeAlways := chVisibleNonGeometry;
408 FdSoftnessErrorCorrection.MustBeNonnegative := true;
409 AddField(FFdSoftnessErrorCorrection);
410
411 FFdSurfaceSpeed := TSFVec2f.Create(Self, True, 'surfaceSpeed', Vector2(0, 0));
412 FdSurfaceSpeed.ChangeAlways := chVisibleNonGeometry;
413 AddField(FFdSurfaceSpeed);
414
415 DefaultContainerField := 'children';
416 end;
417
418 {$endif read_implementation}