| 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 GetAngularDampingFactor: Single; |
| 28 |
procedure SetAngularDampingFactor(const Value: Single); |
| 29 |
function GetAngularVelocity: TVector3; |
| 30 |
procedure SetAngularVelocity(const Value: TVector3); |
| 31 |
function GetAutoDamp: Boolean; |
| 32 |
procedure SetAutoDamp(const Value: Boolean); |
| 33 |
function GetAutoDisable: Boolean; |
| 34 |
procedure SetAutoDisable(const Value: Boolean); |
| 35 |
function GetCenterOfMass: TVector3; |
| 36 |
procedure SetCenterOfMass(const Value: TVector3); |
| 37 |
function GetDisableAngularSpeed: Single; |
| 38 |
procedure SetDisableAngularSpeed(const Value: Single); |
| 39 |
function GetDisableLinearSpeed: Single; |
| 40 |
procedure SetDisableLinearSpeed(const Value: Single); |
| 41 |
function GetDisableTime: Single; |
| 42 |
procedure SetDisableTime(const Value: Single); |
| 43 |
function GetEnabled: Boolean; |
| 44 |
procedure SetEnabled(const Value: Boolean); |
| 45 |
function GetFiniteRotationAxis: TVector3; |
| 46 |
procedure SetFiniteRotationAxis(const Value: TVector3); |
| 47 |
function GetFixed: Boolean; |
| 48 |
procedure SetFixed(const Value: Boolean); |
| 49 |
function GetInertia: TMatrix3; |
| 50 |
procedure SetInertia(const Value: TMatrix3); |
| 51 |
function GetLinearDampingFactor: Single; |
| 52 |
procedure SetLinearDampingFactor(const Value: Single); |
| 53 |
function GetLinearVelocity: TVector3; |
| 54 |
procedure SetLinearVelocity(const Value: TVector3); |
| 55 |
function GetMass: Single; |
| 56 |
procedure SetMass(const Value: Single); |
| 57 |
function GetMassDensityModel: TX3DNode; |
| 58 |
procedure SetMassDensityModel(const Value: TX3DNode); |
| 59 |
function GetOrientation: TVector4; |
| 60 |
procedure SetOrientation(const Value: TVector4); |
| 61 |
function GetPosition: TVector3; |
| 62 |
procedure SetPosition(const Value: TVector3); |
| 63 |
function GetUseFiniteRotation: Boolean; |
| 64 |
procedure SetUseFiniteRotation(const Value: Boolean); |
| 65 |
function GetUseGlobalGravity: Boolean; |
| 66 |
procedure SetUseGlobalGravity(const Value: Boolean); |
| 67 |
public |
| 68 |
{ Create node fields and events. } |
| 69 |
procedure CreateNode; override; |
| 70 |
class function ClassX3DType: String; override; |
| 71 |
|
| 72 |
strict private FFdAngularDampingFactor: TSFFloat; |
| 73 |
{ Internal wrapper for property @code(AngularDampingFactor). This wrapper API may change, we advise to access simpler @code(AngularDampingFactor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 74 |
public property FdAngularDampingFactor: TSFFloat read FFdAngularDampingFactor; |
| 75 |
{ } |
| 76 |
property AngularDampingFactor: Single read GetAngularDampingFactor write SetAngularDampingFactor; |
| 77 |
|
| 78 |
strict private FFdAngularVelocity: TSFVec3f; |
| 79 |
{ Internal wrapper for property @code(AngularVelocity). This wrapper API may change, we advise to access simpler @code(AngularVelocity) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 80 |
public property FdAngularVelocity: TSFVec3f read FFdAngularVelocity; |
| 81 |
{ } |
| 82 |
property AngularVelocity: TVector3 read GetAngularVelocity write SetAngularVelocity; |
| 83 |
|
| 84 |
strict private FFdAutoDamp: TSFBool; |
| 85 |
{ Internal wrapper for property @code(AutoDamp). This wrapper API may change, we advise to access simpler @code(AutoDamp) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 86 |
public property FdAutoDamp: TSFBool read FFdAutoDamp; |
| 87 |
{ } |
| 88 |
property AutoDamp: Boolean read GetAutoDamp write SetAutoDamp; |
| 89 |
|
| 90 |
strict private FFdAutoDisable: TSFBool; |
| 91 |
{ Internal wrapper for property @code(AutoDisable). This wrapper API may change, we advise to access simpler @code(AutoDisable) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 92 |
public property FdAutoDisable: TSFBool read FFdAutoDisable; |
| 93 |
{ } |
| 94 |
property AutoDisable: Boolean read GetAutoDisable write SetAutoDisable; |
| 95 |
|
| 96 |
strict private FFdCenterOfMass: TSFVec3f; |
| 97 |
{ 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). } |
| 98 |
public property FdCenterOfMass: TSFVec3f read FFdCenterOfMass; |
| 99 |
{ } |
| 100 |
property CenterOfMass: TVector3 read GetCenterOfMass write SetCenterOfMass; |
| 101 |
|
| 102 |
strict private FFdDisableAngularSpeed: TSFFloat; |
| 103 |
{ Internal wrapper for property @code(DisableAngularSpeed). This wrapper API may change, we advise to access simpler @code(DisableAngularSpeed) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 104 |
public property FdDisableAngularSpeed: TSFFloat read FFdDisableAngularSpeed; |
| 105 |
{ } |
| 106 |
property DisableAngularSpeed: Single read GetDisableAngularSpeed write SetDisableAngularSpeed; |
| 107 |
|
| 108 |
strict private FFdDisableLinearSpeed: TSFFloat; |
| 109 |
{ Internal wrapper for property @code(DisableLinearSpeed). This wrapper API may change, we advise to access simpler @code(DisableLinearSpeed) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 110 |
public property FdDisableLinearSpeed: TSFFloat read FFdDisableLinearSpeed; |
| 111 |
{ } |
| 112 |
property DisableLinearSpeed: Single read GetDisableLinearSpeed write SetDisableLinearSpeed; |
| 113 |
|
| 114 |
strict private FFdDisableTime: TSFFloat; |
| 115 |
{ Internal wrapper for property @code(DisableTime). This wrapper API may change, we advise to access simpler @code(DisableTime) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 116 |
public property FdDisableTime: TSFFloat read FFdDisableTime; |
| 117 |
{ } |
| 118 |
property DisableTime: Single read GetDisableTime write SetDisableTime; |
| 119 |
|
| 120 |
strict private FFdEnabled: TSFBool; |
| 121 |
{ 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). } |
| 122 |
public property FdEnabled: TSFBool read FFdEnabled; |
| 123 |
{ } |
| 124 |
property Enabled: Boolean read GetEnabled write SetEnabled; |
| 125 |
|
| 126 |
strict private FFdFiniteRotationAxis: TSFVec3f; |
| 127 |
{ Internal wrapper for property @code(FiniteRotationAxis). This wrapper API may change, we advise to access simpler @code(FiniteRotationAxis) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 128 |
public property FdFiniteRotationAxis: TSFVec3f read FFdFiniteRotationAxis; |
| 129 |
{ } |
| 130 |
property FiniteRotationAxis: TVector3 read GetFiniteRotationAxis write SetFiniteRotationAxis; |
| 131 |
|
| 132 |
strict private FFdFixed: TSFBool; |
| 133 |
{ Internal wrapper for property @code(Fixed). This wrapper API may change, we advise to access simpler @code(Fixed) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 134 |
public property FdFixed: TSFBool read FFdFixed; |
| 135 |
{ } |
| 136 |
property Fixed: Boolean read GetFixed write SetFixed; |
| 137 |
|
| 138 |
strict private FFdForces: TMFVec3f; |
| 139 |
{ Internal wrapper for property @code(Forces). This wrapper API may change, we advise to access simpler @code(Forces) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 140 |
public property FdForces: TMFVec3f read FFdForces; |
| 141 |
{ } |
| 142 |
procedure SetForces(const Value: array of TVector3); overload; |
| 143 |
{ } |
| 144 |
procedure SetForces(const Value: TVector3List); overload; |
| 145 |
|
| 146 |
strict private FFdGeometry: TMFNode; |
| 147 |
{ Internal wrapper for property @code(Geometry). This wrapper API may change, we advise to access simpler @code(Geometry) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 148 |
public property FdGeometry: TMFNode read FFdGeometry; |
| 149 |
{ } |
| 150 |
procedure SetGeometry(const Value: array of TAbstractNBodyCollidableNode); |
| 151 |
|
| 152 |
strict private FFdInertia: TSFMatrix3f; |
| 153 |
{ Internal wrapper for property @code(Inertia). This wrapper API may change, we advise to access simpler @code(Inertia) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 154 |
public property FdInertia: TSFMatrix3f read FFdInertia; |
| 155 |
{ } |
| 156 |
property Inertia: TMatrix3 read GetInertia write SetInertia; |
| 157 |
|
| 158 |
strict private FFdLinearDampingFactor: TSFFloat; |
| 159 |
{ Internal wrapper for property @code(LinearDampingFactor). This wrapper API may change, we advise to access simpler @code(LinearDampingFactor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 160 |
public property FdLinearDampingFactor: TSFFloat read FFdLinearDampingFactor; |
| 161 |
{ } |
| 162 |
property LinearDampingFactor: Single read GetLinearDampingFactor write SetLinearDampingFactor; |
| 163 |
|
| 164 |
strict private FFdLinearVelocity: TSFVec3f; |
| 165 |
{ Internal wrapper for property @code(LinearVelocity). This wrapper API may change, we advise to access simpler @code(LinearVelocity) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 166 |
public property FdLinearVelocity: TSFVec3f read FFdLinearVelocity; |
| 167 |
{ } |
| 168 |
property LinearVelocity: TVector3 read GetLinearVelocity write SetLinearVelocity; |
| 169 |
|
| 170 |
strict private FFdMass: TSFFloat; |
| 171 |
{ 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). } |
| 172 |
public property FdMass: TSFFloat read FFdMass; |
| 173 |
{ } |
| 174 |
property Mass: Single read GetMass write SetMass; |
| 175 |
|
| 176 |
strict private FFdMassDensityModel: TSFNode; |
| 177 |
{ Internal wrapper for property @code(MassDensityModel). This wrapper API may change, we advise to access simpler @code(MassDensityModel) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 178 |
public property FdMassDensityModel: TSFNode read FFdMassDensityModel; |
| 179 |
{ } |
| 180 |
property MassDensityModel: TX3DNode read GetMassDensityModel write SetMassDensityModel; |
| 181 |
|
| 182 |
strict private FFdOrientation: TSFRotation; |
| 183 |
{ Internal wrapper for property @code(Orientation). This wrapper API may change, we advise to access simpler @code(Orientation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 184 |
public property FdOrientation: TSFRotation read FFdOrientation; |
| 185 |
{ } |
| 186 |
property Orientation: TVector4 read GetOrientation write SetOrientation; |
| 187 |
|
| 188 |
strict private FFdPosition: TSFVec3f; |
| 189 |
{ 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). } |
| 190 |
public property FdPosition: TSFVec3f read FFdPosition; |
| 191 |
{ } |
| 192 |
property Position: TVector3 read GetPosition write SetPosition; |
| 193 |
|
| 194 |
strict private FFdTorques: TMFVec3f; |
| 195 |
{ Internal wrapper for property @code(Torques). This wrapper API may change, we advise to access simpler @code(Torques) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 196 |
public property FdTorques: TMFVec3f read FFdTorques; |
| 197 |
{ } |
| 198 |
procedure SetTorques(const Value: array of TVector3); overload; |
| 199 |
{ } |
| 200 |
procedure SetTorques(const Value: TVector3List); overload; |
| 201 |
|
| 202 |
strict private FFdUseFiniteRotation: TSFBool; |
| 203 |
{ Internal wrapper for property @code(UseFiniteRotation). This wrapper API may change, we advise to access simpler @code(UseFiniteRotation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 204 |
public property FdUseFiniteRotation: TSFBool read FFdUseFiniteRotation; |
| 205 |
{ } |
| 206 |
property UseFiniteRotation: Boolean read GetUseFiniteRotation write SetUseFiniteRotation; |
| 207 |
|
| 208 |
strict private FFdUseGlobalGravity: TSFBool; |
| 209 |
{ Internal wrapper for property @code(UseGlobalGravity). This wrapper API may change, we advise to access simpler @code(UseGlobalGravity) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 210 |
public property FdUseGlobalGravity: TSFBool read FFdUseGlobalGravity; |
| 211 |
{ } |
| 212 |
property UseGlobalGravity: Boolean read GetUseGlobalGravity write SetUseGlobalGravity; |
| 213 |
|
| 214 |
{$endif read_interface} |
| 215 |
|
| 216 |
{$ifdef read_implementation} |
| 217 |
|
| 218 |
{ TRigidBodyNode ----------------------------------------------- } |
| 219 |
|
| 220 |
function TRigidBodyNode.GetAngularDampingFactor: Single; |
| 221 |
begin |
| 222 |
Result := FdAngularDampingFactor.Value; |
| 223 |
end; |
| 224 |
|
| 225 |
procedure TRigidBodyNode.SetAngularDampingFactor(const Value: Single); |
| 226 |
begin |
| 227 |
FdAngularDampingFactor.Send(Value); |
| 228 |
end; |
| 229 |
|
| 230 |
function TRigidBodyNode.GetAngularVelocity: TVector3; |
| 231 |
begin |
| 232 |
Result := FdAngularVelocity.Value; |
| 233 |
end; |
| 234 |
|
| 235 |
procedure TRigidBodyNode.SetAngularVelocity(const Value: TVector3); |
| 236 |
begin |
| 237 |
FdAngularVelocity.Send(Value); |
| 238 |
end; |
| 239 |
|
| 240 |
function TRigidBodyNode.GetAutoDamp: Boolean; |
| 241 |
begin |
| 242 |
Result := FdAutoDamp.Value; |
| 243 |
end; |
| 244 |
|
| 245 |
procedure TRigidBodyNode.SetAutoDamp(const Value: Boolean); |
| 246 |
begin |
| 247 |
FdAutoDamp.Send(Value); |
| 248 |
end; |
| 249 |
|
| 250 |
function TRigidBodyNode.GetAutoDisable: Boolean; |
| 251 |
begin |
| 252 |
Result := FdAutoDisable.Value; |
| 253 |
end; |
| 254 |
|
| 255 |
procedure TRigidBodyNode.SetAutoDisable(const Value: Boolean); |
| 256 |
begin |
| 257 |
FdAutoDisable.Send(Value); |
| 258 |
end; |
| 259 |
|
| 260 |
function TRigidBodyNode.GetCenterOfMass: TVector3; |
| 261 |
begin |
| 262 |
Result := FdCenterOfMass.Value; |
| 263 |
end; |
| 264 |
|
| 265 |
procedure TRigidBodyNode.SetCenterOfMass(const Value: TVector3); |
| 266 |
begin |
| 267 |
FdCenterOfMass.Send(Value); |
| 268 |
end; |
| 269 |
|
| 270 |
function TRigidBodyNode.GetDisableAngularSpeed: Single; |
| 271 |
begin |
| 272 |
Result := FdDisableAngularSpeed.Value; |
| 273 |
end; |
| 274 |
|
| 275 |
procedure TRigidBodyNode.SetDisableAngularSpeed(const Value: Single); |
| 276 |
begin |
| 277 |
FdDisableAngularSpeed.Send(Value); |
| 278 |
end; |
| 279 |
|
| 280 |
function TRigidBodyNode.GetDisableLinearSpeed: Single; |
| 281 |
begin |
| 282 |
Result := FdDisableLinearSpeed.Value; |
| 283 |
end; |
| 284 |
|
| 285 |
procedure TRigidBodyNode.SetDisableLinearSpeed(const Value: Single); |
| 286 |
begin |
| 287 |
FdDisableLinearSpeed.Send(Value); |
| 288 |
end; |
| 289 |
|
| 290 |
function TRigidBodyNode.GetDisableTime: Single; |
| 291 |
begin |
| 292 |
Result := FdDisableTime.Value; |
| 293 |
end; |
| 294 |
|
| 295 |
procedure TRigidBodyNode.SetDisableTime(const Value: Single); |
| 296 |
begin |
| 297 |
FdDisableTime.Send(Value); |
| 298 |
end; |
| 299 |
|
| 300 |
function TRigidBodyNode.GetEnabled: Boolean; |
| 301 |
begin |
| 302 |
Result := FdEnabled.Value; |
| 303 |
end; |
| 304 |
|
| 305 |
procedure TRigidBodyNode.SetEnabled(const Value: Boolean); |
| 306 |
begin |
| 307 |
FdEnabled.Send(Value); |
| 308 |
end; |
| 309 |
|
| 310 |
function TRigidBodyNode.GetFiniteRotationAxis: TVector3; |
| 311 |
begin |
| 312 |
Result := FdFiniteRotationAxis.Value; |
| 313 |
end; |
| 314 |
|
| 315 |
procedure TRigidBodyNode.SetFiniteRotationAxis(const Value: TVector3); |
| 316 |
begin |
| 317 |
FdFiniteRotationAxis.Send(Value); |
| 318 |
end; |
| 319 |
|
| 320 |
function TRigidBodyNode.GetFixed: Boolean; |
| 321 |
begin |
| 322 |
Result := FdFixed.Value; |
| 323 |
end; |
| 324 |
|
| 325 |
procedure TRigidBodyNode.SetFixed(const Value: Boolean); |
| 326 |
begin |
| 327 |
FdFixed.Send(Value); |
| 328 |
end; |
| 329 |
|
| 330 |
procedure TRigidBodyNode.SetForces(const Value: array of TVector3); |
| 331 |
begin |
| 332 |
FdForces.Send(Value); |
| 333 |
end; |
| 334 |
|
| 335 |
procedure TRigidBodyNode.SetForces(const Value: TVector3List); |
| 336 |
begin |
| 337 |
FdForces.Send(Value); |
| 338 |
end; |
| 339 |
|
| 340 |
procedure TRigidBodyNode.SetGeometry(const Value: array of TAbstractNBodyCollidableNode); |
| 341 |
var |
| 342 |
L: Integer; |
| 343 |
A: array of TX3DNode; |
| 344 |
begin |
| 345 |
L := High(Value) + 1; |
| 346 |
SetLength(A, L); |
| 347 |
if L > 0 then |
| 348 |
Move(Value[0], A[0], L * SizeOf(TAbstractNBodyCollidableNode)); |
| 349 |
FdGeometry.Send(A); |
| 350 |
end; |
| 351 |
|
| 352 |
function TRigidBodyNode.GetInertia: TMatrix3; |
| 353 |
begin |
| 354 |
Result := FdInertia.Value; |
| 355 |
end; |
| 356 |
|
| 357 |
procedure TRigidBodyNode.SetInertia(const Value: TMatrix3); |
| 358 |
begin |
| 359 |
FdInertia.Send(Value); |
| 360 |
end; |
| 361 |
|
| 362 |
function TRigidBodyNode.GetLinearDampingFactor: Single; |
| 363 |
begin |
| 364 |
Result := FdLinearDampingFactor.Value; |
| 365 |
end; |
| 366 |
|
| 367 |
procedure TRigidBodyNode.SetLinearDampingFactor(const Value: Single); |
| 368 |
begin |
| 369 |
FdLinearDampingFactor.Send(Value); |
| 370 |
end; |
| 371 |
|
| 372 |
function TRigidBodyNode.GetLinearVelocity: TVector3; |
| 373 |
begin |
| 374 |
Result := FdLinearVelocity.Value; |
| 375 |
end; |
| 376 |
|
| 377 |
procedure TRigidBodyNode.SetLinearVelocity(const Value: TVector3); |
| 378 |
begin |
| 379 |
FdLinearVelocity.Send(Value); |
| 380 |
end; |
| 381 |
|
| 382 |
function TRigidBodyNode.GetMass: Single; |
| 383 |
begin |
| 384 |
Result := FdMass.Value; |
| 385 |
end; |
| 386 |
|
| 387 |
procedure TRigidBodyNode.SetMass(const Value: Single); |
| 388 |
begin |
| 389 |
FdMass.Send(Value); |
| 390 |
end; |
| 391 |
|
| 392 |
function TRigidBodyNode.GetMassDensityModel: TX3DNode; |
| 393 |
begin |
| 394 |
if FdMassDensityModel.Value is TX3DNode then |
| 395 |
Result := TX3DNode(FdMassDensityModel.Value) |
| 396 |
else |
| 397 |
Result := nil; |
| 398 |
end; |
| 399 |
|
| 400 |
procedure TRigidBodyNode.SetMassDensityModel(const Value: TX3DNode); |
| 401 |
begin |
| 402 |
FdMassDensityModel.Send(Value); |
| 403 |
end; |
| 404 |
|
| 405 |
function TRigidBodyNode.GetOrientation: TVector4; |
| 406 |
begin |
| 407 |
Result := FdOrientation.Value; |
| 408 |
end; |
| 409 |
|
| 410 |
procedure TRigidBodyNode.SetOrientation(const Value: TVector4); |
| 411 |
begin |
| 412 |
FdOrientation.Send(Value); |
| 413 |
end; |
| 414 |
|
| 415 |
function TRigidBodyNode.GetPosition: TVector3; |
| 416 |
begin |
| 417 |
Result := FdPosition.Value; |
| 418 |
end; |
| 419 |
|
| 420 |
procedure TRigidBodyNode.SetPosition(const Value: TVector3); |
| 421 |
begin |
| 422 |
FdPosition.Send(Value); |
| 423 |
end; |
| 424 |
|
| 425 |
procedure TRigidBodyNode.SetTorques(const Value: array of TVector3); |
| 426 |
begin |
| 427 |
FdTorques.Send(Value); |
| 428 |
end; |
| 429 |
|
| 430 |
procedure TRigidBodyNode.SetTorques(const Value: TVector3List); |
| 431 |
begin |
| 432 |
FdTorques.Send(Value); |
| 433 |
end; |
| 434 |
|
| 435 |
function TRigidBodyNode.GetUseFiniteRotation: Boolean; |
| 436 |
begin |
| 437 |
Result := FdUseFiniteRotation.Value; |
| 438 |
end; |
| 439 |
|
| 440 |
procedure TRigidBodyNode.SetUseFiniteRotation(const Value: Boolean); |
| 441 |
begin |
| 442 |
FdUseFiniteRotation.Send(Value); |
| 443 |
end; |
| 444 |
|
| 445 |
function TRigidBodyNode.GetUseGlobalGravity: Boolean; |
| 446 |
begin |
| 447 |
Result := FdUseGlobalGravity.Value; |
| 448 |
end; |
| 449 |
|
| 450 |
procedure TRigidBodyNode.SetUseGlobalGravity(const Value: Boolean); |
| 451 |
begin |
| 452 |
FdUseGlobalGravity.Send(Value); |
| 453 |
end; |
| 454 |
|
| 455 |
class function TRigidBodyNode.ClassX3DType: String; |
| 456 |
begin |
| 457 |
Result := 'RigidBody'; |
| 458 |
end; |
| 459 |
|
| 460 |
procedure TRigidBodyNode.CreateNode; |
| 461 |
begin |
| 462 |
inherited; |
| 463 |
|
| 464 |
FFdAngularDampingFactor := TSFFloat.Create(Self, True, 'angularDampingFactor', 0.001); |
| 465 |
FdAngularDampingFactor.ChangeAlways := chVisibleNonGeometry; |
| 466 |
FdAngularDampingFactor.MustBeNonnegative := true; |
| 467 |
AddField(FFdAngularDampingFactor); |
| 468 |
|
| 469 |
FFdAngularVelocity := TSFVec3f.Create(Self, True, 'angularVelocity', Vector3(0, 0, 0)); |
| 470 |
FdAngularVelocity.ChangeAlways := chVisibleNonGeometry; |
| 471 |
AddField(FFdAngularVelocity); |
| 472 |
|
| 473 |
FFdAutoDamp := TSFBool.Create(Self, True, 'autoDamp', false); |
| 474 |
FdAutoDamp.ChangeAlways := chVisibleNonGeometry; |
| 475 |
AddField(FFdAutoDamp); |
| 476 |
|
| 477 |
FFdAutoDisable := TSFBool.Create(Self, True, 'autoDisable', false); |
| 478 |
FdAutoDisable.ChangeAlways := chVisibleNonGeometry; |
| 479 |
AddField(FFdAutoDisable); |
| 480 |
|
| 481 |
FFdCenterOfMass := TSFVec3f.Create(Self, True, 'centerOfMass', Vector3(0, 0, 0)); |
| 482 |
FdCenterOfMass.ChangeAlways := chVisibleNonGeometry; |
| 483 |
AddField(FFdCenterOfMass); |
| 484 |
|
| 485 |
FFdDisableAngularSpeed := TSFFloat.Create(Self, True, 'disableAngularSpeed', 0); |
| 486 |
FdDisableAngularSpeed.ChangeAlways := chVisibleNonGeometry; |
| 487 |
FdDisableAngularSpeed.MustBeNonnegative := true; |
| 488 |
AddField(FFdDisableAngularSpeed); |
| 489 |
|
| 490 |
FFdDisableLinearSpeed := TSFFloat.Create(Self, True, 'disableLinearSpeed', 0); |
| 491 |
FdDisableLinearSpeed.ChangeAlways := chVisibleNonGeometry; |
| 492 |
FdDisableLinearSpeed.MustBeNonnegative := true; |
| 493 |
AddField(FFdDisableLinearSpeed); |
| 494 |
|
| 495 |
FFdDisableTime := TSFFloat.Create(Self, True, 'disableTime', 0); |
| 496 |
FdDisableTime.ChangeAlways := chVisibleNonGeometry; |
| 497 |
FdDisableTime.MustBeNonnegative := true; |
| 498 |
AddField(FFdDisableTime); |
| 499 |
|
| 500 |
FFdEnabled := TSFBool.Create(Self, True, 'enabled', true); |
| 501 |
FdEnabled.ChangeAlways := chVisibleNonGeometry; |
| 502 |
AddField(FFdEnabled); |
| 503 |
|
| 504 |
FFdFiniteRotationAxis := TSFVec3f.Create(Self, True, 'finiteRotationAxis', Vector3(0, 0, 0)); |
| 505 |
FdFiniteRotationAxis.ChangeAlways := chVisibleNonGeometry; |
| 506 |
AddField(FFdFiniteRotationAxis); |
| 507 |
|
| 508 |
FFdFixed := TSFBool.Create(Self, True, 'fixed', false); |
| 509 |
FdFixed.ChangeAlways := chVisibleNonGeometry; |
| 510 |
AddField(FFdFixed); |
| 511 |
|
| 512 |
FFdForces := TMFVec3f.Create(Self, True, 'forces', []); |
| 513 |
FdForces.ChangeAlways := chVisibleNonGeometry; |
| 514 |
AddField(FFdForces); |
| 515 |
|
| 516 |
FFdGeometry := TMFNode.Create(Self, True, 'geometry', [TAbstractNBodyCollidableNode]); |
| 517 |
FdGeometry.ChangeAlways := chVisibleNonGeometry; |
| 518 |
AddField(FFdGeometry); |
| 519 |
|
| 520 |
FFdInertia := TSFMatrix3f.Create(Self, True, 'inertia', TMatrix3.Identity); |
| 521 |
FdInertia.ChangeAlways := chVisibleNonGeometry; |
| 522 |
AddField(FFdInertia); |
| 523 |
|
| 524 |
FFdLinearDampingFactor := TSFFloat.Create(Self, True, 'linearDampingFactor', 0.001); |
| 525 |
FdLinearDampingFactor.ChangeAlways := chVisibleNonGeometry; |
| 526 |
FdLinearDampingFactor.MustBeNonnegative := true; |
| 527 |
AddField(FFdLinearDampingFactor); |
| 528 |
|
| 529 |
FFdLinearVelocity := TSFVec3f.Create(Self, True, 'linearVelocity', Vector3(0, 0, 0)); |
| 530 |
FdLinearVelocity.ChangeAlways := chVisibleNonGeometry; |
| 531 |
AddField(FFdLinearVelocity); |
| 532 |
|
| 533 |
FFdMass := TSFFloat.Create(Self, True, 'mass', 1); |
| 534 |
FdMass.ChangeAlways := chVisibleNonGeometry; |
| 535 |
FdMass.MustBeNonnegative := true; |
| 536 |
AddField(FFdMass); |
| 537 |
|
| 538 |
FFdMassDensityModel := TSFNode.Create(Self, True, 'massDensityModel', [TSphereNode, TBoxNode, TConeNode]); |
| 539 |
FdMassDensityModel.ChangeAlways := chVisibleNonGeometry; |
| 540 |
AddField(FFdMassDensityModel); |
| 541 |
|
| 542 |
FFdOrientation := TSFRotation.Create(Self, True, 'orientation', Vector3(0, 0, 1), 0); |
| 543 |
FdOrientation.ChangeAlways := chVisibleNonGeometry; |
| 544 |
AddField(FFdOrientation); |
| 545 |
|
| 546 |
FFdPosition := TSFVec3f.Create(Self, True, 'position', Vector3(0, 0, 0)); |
| 547 |
FdPosition.ChangeAlways := chVisibleNonGeometry; |
| 548 |
AddField(FFdPosition); |
| 549 |
|
| 550 |
FFdTorques := TMFVec3f.Create(Self, True, 'torques', []); |
| 551 |
FdTorques.ChangeAlways := chVisibleNonGeometry; |
| 552 |
AddField(FFdTorques); |
| 553 |
|
| 554 |
FFdUseFiniteRotation := TSFBool.Create(Self, True, 'useFiniteRotation', false); |
| 555 |
FdUseFiniteRotation.ChangeAlways := chVisibleNonGeometry; |
| 556 |
AddField(FFdUseFiniteRotation); |
| 557 |
|
| 558 |
FFdUseGlobalGravity := TSFBool.Create(Self, True, 'useGlobalGravity', true); |
| 559 |
FdUseGlobalGravity.ChangeAlways := chVisibleNonGeometry; |
| 560 |
AddField(FFdUseGlobalGravity); |
| 561 |
|
| 562 |
DefaultContainerField := 'bodies'; |
| 563 |
end; |
| 564 |
|
| 565 |
{$endif read_implementation} |