Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_collisioncollection.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 GetBounce: Single;
28 procedure SetBounce(const Value: Single);
29 function GetEnabled: Boolean;
30 procedure SetEnabled(const Value: Boolean);
31 function GetFrictionCoefficients: TVector2;
32 procedure SetFrictionCoefficients(const Value: TVector2);
33 function GetMinBounceSpeed: Single;
34 procedure SetMinBounceSpeed(const Value: Single);
35 function GetSlipFactors: TVector2;
36 procedure SetSlipFactors(const Value: TVector2);
37 function GetSoftnessConstantForceMix: Single;
38 procedure SetSoftnessConstantForceMix(const Value: Single);
39 function GetSoftnessErrorCorrection: Single;
40 procedure SetSoftnessErrorCorrection(const Value: Single);
41 function GetSurfaceSpeed: TVector2;
42 procedure SetSurfaceSpeed(const Value: TVector2);
43 public
44 { Create node fields and events. }
45 procedure CreateNode; override;
46 class function ClassX3DType: String; override;
47
48 strict private FFdAppliedParameters: TMFString;
49 { 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). }
50 public property FdAppliedParameters: TMFString read FFdAppliedParameters;
51 { }
52 procedure SetAppliedParameters(const Value: array of string); overload;
53 { }
54 procedure SetAppliedParameters(const Value: TCastleStringList); overload;
55
56 strict private FFdBounce: TSFFloat;
57 { 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). }
58 public property FdBounce: TSFFloat read FFdBounce;
59 { }
60 property Bounce: Single read GetBounce write SetBounce;
61
62 strict private FFdCollidables: TMFNode;
63 { Internal wrapper for property @code(Collidables). This wrapper API may change, we advise to access simpler @code(Collidables) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
64 public property FdCollidables: TMFNode read FFdCollidables;
65 { }
66 procedure SetCollidables(const Value: array of TX3DNode);
67
68 strict private FFdEnabled: TSFBool;
69 { 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). }
70 public property FdEnabled: TSFBool read FFdEnabled;
71 { }
72 property Enabled: Boolean read GetEnabled write SetEnabled;
73
74 strict private FFdFrictionCoefficients: TSFVec2f;
75 { 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). }
76 public property FdFrictionCoefficients: TSFVec2f read FFdFrictionCoefficients;
77 { }
78 property FrictionCoefficients: TVector2 read GetFrictionCoefficients write SetFrictionCoefficients;
79
80 strict private FFdMinBounceSpeed: TSFFloat;
81 { 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). }
82 public property FdMinBounceSpeed: TSFFloat read FFdMinBounceSpeed;
83 { }
84 property MinBounceSpeed: Single read GetMinBounceSpeed write SetMinBounceSpeed;
85
86 strict private FFdSlipFactors: TSFVec2f;
87 { Internal wrapper for property @code(SlipFactors). This wrapper API may change, we advise to access simpler @code(SlipFactors) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
88 public property FdSlipFactors: TSFVec2f read FFdSlipFactors;
89 { }
90 property SlipFactors: TVector2 read GetSlipFactors write SetSlipFactors;
91
92 strict private FFdSoftnessConstantForceMix: TSFFloat;
93 { 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). }
94 public property FdSoftnessConstantForceMix: TSFFloat read FFdSoftnessConstantForceMix;
95 { }
96 property SoftnessConstantForceMix: Single read GetSoftnessConstantForceMix write SetSoftnessConstantForceMix;
97
98 strict private FFdSoftnessErrorCorrection: TSFFloat;
99 { 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). }
100 public property FdSoftnessErrorCorrection: TSFFloat read FFdSoftnessErrorCorrection;
101 { }
102 property SoftnessErrorCorrection: Single read GetSoftnessErrorCorrection write SetSoftnessErrorCorrection;
103
104 strict private FFdSurfaceSpeed: TSFVec2f;
105 { 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). }
106 public property FdSurfaceSpeed: TSFVec2f read FFdSurfaceSpeed;
107 { }
108 property SurfaceSpeed: TVector2 read GetSurfaceSpeed write SetSurfaceSpeed;
109
110 {$endif read_interface}
111
112 {$ifdef read_implementation}
113
114 { TCollisionCollectionNode ----------------------------------------------- }
115
116 procedure TCollisionCollectionNode.SetAppliedParameters(const Value: array of string);
117 begin
118 FdAppliedParameters.Send(Value);
119 end;
120
121 procedure TCollisionCollectionNode.SetAppliedParameters(const Value: TCastleStringList);
122 begin
123 FdAppliedParameters.Send(Value);
124 end;
125
126 function TCollisionCollectionNode.GetBounce: Single;
127 begin
128 Result := FdBounce.Value;
129 end;
130
131 procedure TCollisionCollectionNode.SetBounce(const Value: Single);
132 begin
133 FdBounce.Send(Value);
134 end;
135
136 procedure TCollisionCollectionNode.SetCollidables(const Value: array of TX3DNode);
137 var
138 L: Integer;
139 A: array of TX3DNode;
140 begin
141 L := High(Value) + 1;
142 SetLength(A, L);
143 if L > 0 then
144 Move(Value[0], A[0], L * SizeOf(TX3DNode));
145 FdCollidables.Send(A);
146 end;
147
148 function TCollisionCollectionNode.GetEnabled: Boolean;
149 begin
150 Result := FdEnabled.Value;
151 end;
152
153 procedure TCollisionCollectionNode.SetEnabled(const Value: Boolean);
154 begin
155 FdEnabled.Send(Value);
156 end;
157
158 function TCollisionCollectionNode.GetFrictionCoefficients: TVector2;
159 begin
160 Result := FdFrictionCoefficients.Value;
161 end;
162
163 procedure TCollisionCollectionNode.SetFrictionCoefficients(const Value: TVector2);
164 begin
165 FdFrictionCoefficients.Send(Value);
166 end;
167
168 function TCollisionCollectionNode.GetMinBounceSpeed: Single;
169 begin
170 Result := FdMinBounceSpeed.Value;
171 end;
172
173 procedure TCollisionCollectionNode.SetMinBounceSpeed(const Value: Single);
174 begin
175 FdMinBounceSpeed.Send(Value);
176 end;
177
178 function TCollisionCollectionNode.GetSlipFactors: TVector2;
179 begin
180 Result := FdSlipFactors.Value;
181 end;
182
183 procedure TCollisionCollectionNode.SetSlipFactors(const Value: TVector2);
184 begin
185 FdSlipFactors.Send(Value);
186 end;
187
188 function TCollisionCollectionNode.GetSoftnessConstantForceMix: Single;
189 begin
190 Result := FdSoftnessConstantForceMix.Value;
191 end;
192
193 procedure TCollisionCollectionNode.SetSoftnessConstantForceMix(const Value: Single);
194 begin
195 FdSoftnessConstantForceMix.Send(Value);
196 end;
197
198 function TCollisionCollectionNode.GetSoftnessErrorCorrection: Single;
199 begin
200 Result := FdSoftnessErrorCorrection.Value;
201 end;
202
203 procedure TCollisionCollectionNode.SetSoftnessErrorCorrection(const Value: Single);
204 begin
205 FdSoftnessErrorCorrection.Send(Value);
206 end;
207
208 function TCollisionCollectionNode.GetSurfaceSpeed: TVector2;
209 begin
210 Result := FdSurfaceSpeed.Value;
211 end;
212
213 procedure TCollisionCollectionNode.SetSurfaceSpeed(const Value: TVector2);
214 begin
215 FdSurfaceSpeed.Send(Value);
216 end;
217
218 class function TCollisionCollectionNode.ClassX3DType: String;
219 begin
220 Result := 'CollisionCollection';
221 end;
222
223 procedure TCollisionCollectionNode.CreateNode;
224 begin
225 inherited;
226
227 FFdAppliedParameters := TMFString.Create(Self, True, 'appliedParameters', ['BOUNCE']);
228 FdAppliedParameters.ChangeAlways := chVisibleNonGeometry;
229 AddField(FFdAppliedParameters);
230
231 FFdBounce := TSFFloat.Create(Self, True, 'bounce', 0);
232 FdBounce.ChangeAlways := chVisibleNonGeometry;
233 FdBounce.MustBeNonnegative := true;
234 AddField(FFdBounce);
235
236 FFdCollidables := TMFNode.Create(Self, True, 'collidables', [TAbstractNBodyCollisionSpaceNode, TAbstractNBodyCollidableNode]);
237 FdCollidables.ChangeAlways := chVisibleNonGeometry;
238 AddField(FFdCollidables);
239
240 FFdEnabled := TSFBool.Create(Self, True, 'enabled', true);
241 FdEnabled.ChangeAlways := chVisibleNonGeometry;
242 AddField(FFdEnabled);
243
244 FFdFrictionCoefficients := TSFVec2f.Create(Self, True, 'frictionCoefficients', Vector2(0, 0));
245 FdFrictionCoefficients.ChangeAlways := chVisibleNonGeometry;
246 AddField(FFdFrictionCoefficients);
247
248 FFdMinBounceSpeed := TSFFloat.Create(Self, True, 'minBounceSpeed', 0.1);
249 FdMinBounceSpeed.ChangeAlways := chVisibleNonGeometry;
250 FdMinBounceSpeed.MustBeNonnegative := true;
251 AddField(FFdMinBounceSpeed);
252
253 FFdSlipFactors := TSFVec2f.Create(Self, True, 'slipFactors', Vector2(0, 0));
254 FdSlipFactors.ChangeAlways := chVisibleNonGeometry;
255 AddField(FFdSlipFactors);
256
257 FFdSoftnessConstantForceMix := TSFFloat.Create(Self, True, 'softnessConstantForceMix', 0.0001);
258 FdSoftnessConstantForceMix.ChangeAlways := chVisibleNonGeometry;
259 FdSoftnessConstantForceMix.MustBeNonnegative := true;
260 AddField(FFdSoftnessConstantForceMix);
261
262 FFdSoftnessErrorCorrection := TSFFloat.Create(Self, True, 'softnessErrorCorrection', 0.8);
263 FdSoftnessErrorCorrection.ChangeAlways := chVisibleNonGeometry;
264 FdSoftnessErrorCorrection.MustBeNonnegative := true;
265 AddField(FFdSoftnessErrorCorrection);
266
267 FFdSurfaceSpeed := TSFVec2f.Create(Self, True, 'surfaceSpeed', Vector2(0, 0));
268 FdSurfaceSpeed.ChangeAlways := chVisibleNonGeometry;
269 AddField(FFdSurfaceSpeed);
270 end;
271
272 {$endif read_implementation}