{ -*- buffer-read-only: t -*- Copyright 2015-2024 Michalis Kamburelis. This file is part of "Castle Game Engine". "Castle Game Engine" is free software; see the file COPYING.txt, included in this distribution, for details about the copyright. "Castle Game Engine" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ---------------------------------------------------------------------------- } { Automatically generated node properties. Do not edit this file manually! To add new properties: - add them to the text files in tools/internal/x3d-nodes-to-pascal/nodes-specification/ , - and regenerate include files by running x3d-nodes-to-pascal } {$ifdef read_interface} strict private function GetBounce: Single; procedure SetBounce(const Value: Single); function GetEnabled: Boolean; procedure SetEnabled(const Value: Boolean); function GetFrictionCoefficients: TVector2; procedure SetFrictionCoefficients(const Value: TVector2); function GetMinBounceSpeed: Single; procedure SetMinBounceSpeed(const Value: Single); function GetSlipFactors: TVector2; procedure SetSlipFactors(const Value: TVector2); function GetSoftnessConstantForceMix: Single; procedure SetSoftnessConstantForceMix(const Value: Single); function GetSoftnessErrorCorrection: Single; procedure SetSoftnessErrorCorrection(const Value: Single); function GetSurfaceSpeed: TVector2; procedure SetSurfaceSpeed(const Value: TVector2); public { Create node fields and events. } procedure CreateNode; override; class function ClassX3DType: String; override; strict private FFdAppliedParameters: TMFString; { 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). } public property FdAppliedParameters: TMFString read FFdAppliedParameters; { } procedure SetAppliedParameters(const Value: array of string); overload; { } procedure SetAppliedParameters(const Value: TCastleStringList); overload; strict private FFdBounce: TSFFloat; { 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). } public property FdBounce: TSFFloat read FFdBounce; { } property Bounce: Single read GetBounce write SetBounce; strict private FFdCollidables: TMFNode; { 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). } public property FdCollidables: TMFNode read FFdCollidables; { } procedure SetCollidables(const Value: array of TX3DNode); strict private FFdEnabled: TSFBool; { 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). } public property FdEnabled: TSFBool read FFdEnabled; { } property Enabled: Boolean read GetEnabled write SetEnabled; strict private FFdFrictionCoefficients: TSFVec2f; { 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). } public property FdFrictionCoefficients: TSFVec2f read FFdFrictionCoefficients; { } property FrictionCoefficients: TVector2 read GetFrictionCoefficients write SetFrictionCoefficients; strict private FFdMinBounceSpeed: TSFFloat; { 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). } public property FdMinBounceSpeed: TSFFloat read FFdMinBounceSpeed; { } property MinBounceSpeed: Single read GetMinBounceSpeed write SetMinBounceSpeed; strict private FFdSlipFactors: TSFVec2f; { 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). } public property FdSlipFactors: TSFVec2f read FFdSlipFactors; { } property SlipFactors: TVector2 read GetSlipFactors write SetSlipFactors; strict private FFdSoftnessConstantForceMix: TSFFloat; { 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). } public property FdSoftnessConstantForceMix: TSFFloat read FFdSoftnessConstantForceMix; { } property SoftnessConstantForceMix: Single read GetSoftnessConstantForceMix write SetSoftnessConstantForceMix; strict private FFdSoftnessErrorCorrection: TSFFloat; { 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). } public property FdSoftnessErrorCorrection: TSFFloat read FFdSoftnessErrorCorrection; { } property SoftnessErrorCorrection: Single read GetSoftnessErrorCorrection write SetSoftnessErrorCorrection; strict private FFdSurfaceSpeed: TSFVec2f; { 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). } public property FdSurfaceSpeed: TSFVec2f read FFdSurfaceSpeed; { } property SurfaceSpeed: TVector2 read GetSurfaceSpeed write SetSurfaceSpeed; {$endif read_interface} {$ifdef read_implementation} { TCollisionCollectionNode ----------------------------------------------- } procedure TCollisionCollectionNode.SetAppliedParameters(const Value: array of string); begin FdAppliedParameters.Send(Value); end; procedure TCollisionCollectionNode.SetAppliedParameters(const Value: TCastleStringList); begin FdAppliedParameters.Send(Value); end; function TCollisionCollectionNode.GetBounce: Single; begin Result := FdBounce.Value; end; procedure TCollisionCollectionNode.SetBounce(const Value: Single); begin FdBounce.Send(Value); end; procedure TCollisionCollectionNode.SetCollidables(const Value: array of TX3DNode); var L: Integer; A: array of TX3DNode; begin L := High(Value) + 1; SetLength(A, L); if L > 0 then Move(Value[0], A[0], L * SizeOf(TX3DNode)); FdCollidables.Send(A); end; function TCollisionCollectionNode.GetEnabled: Boolean; begin Result := FdEnabled.Value; end; procedure TCollisionCollectionNode.SetEnabled(const Value: Boolean); begin FdEnabled.Send(Value); end; function TCollisionCollectionNode.GetFrictionCoefficients: TVector2; begin Result := FdFrictionCoefficients.Value; end; procedure TCollisionCollectionNode.SetFrictionCoefficients(const Value: TVector2); begin FdFrictionCoefficients.Send(Value); end; function TCollisionCollectionNode.GetMinBounceSpeed: Single; begin Result := FdMinBounceSpeed.Value; end; procedure TCollisionCollectionNode.SetMinBounceSpeed(const Value: Single); begin FdMinBounceSpeed.Send(Value); end; function TCollisionCollectionNode.GetSlipFactors: TVector2; begin Result := FdSlipFactors.Value; end; procedure TCollisionCollectionNode.SetSlipFactors(const Value: TVector2); begin FdSlipFactors.Send(Value); end; function TCollisionCollectionNode.GetSoftnessConstantForceMix: Single; begin Result := FdSoftnessConstantForceMix.Value; end; procedure TCollisionCollectionNode.SetSoftnessConstantForceMix(const Value: Single); begin FdSoftnessConstantForceMix.Send(Value); end; function TCollisionCollectionNode.GetSoftnessErrorCorrection: Single; begin Result := FdSoftnessErrorCorrection.Value; end; procedure TCollisionCollectionNode.SetSoftnessErrorCorrection(const Value: Single); begin FdSoftnessErrorCorrection.Send(Value); end; function TCollisionCollectionNode.GetSurfaceSpeed: TVector2; begin Result := FdSurfaceSpeed.Value; end; procedure TCollisionCollectionNode.SetSurfaceSpeed(const Value: TVector2); begin FdSurfaceSpeed.Send(Value); end; class function TCollisionCollectionNode.ClassX3DType: String; begin Result := 'CollisionCollection'; end; procedure TCollisionCollectionNode.CreateNode; begin inherited; FFdAppliedParameters := TMFString.Create(Self, True, 'appliedParameters', ['BOUNCE']); FdAppliedParameters.ChangeAlways := chVisibleNonGeometry; AddField(FFdAppliedParameters); FFdBounce := TSFFloat.Create(Self, True, 'bounce', 0); FdBounce.ChangeAlways := chVisibleNonGeometry; FdBounce.MustBeNonnegative := true; AddField(FFdBounce); FFdCollidables := TMFNode.Create(Self, True, 'collidables', [TAbstractNBodyCollisionSpaceNode, TAbstractNBodyCollidableNode]); FdCollidables.ChangeAlways := chVisibleNonGeometry; AddField(FFdCollidables); FFdEnabled := TSFBool.Create(Self, True, 'enabled', true); FdEnabled.ChangeAlways := chVisibleNonGeometry; AddField(FFdEnabled); FFdFrictionCoefficients := TSFVec2f.Create(Self, True, 'frictionCoefficients', Vector2(0, 0)); FdFrictionCoefficients.ChangeAlways := chVisibleNonGeometry; AddField(FFdFrictionCoefficients); FFdMinBounceSpeed := TSFFloat.Create(Self, True, 'minBounceSpeed', 0.1); FdMinBounceSpeed.ChangeAlways := chVisibleNonGeometry; FdMinBounceSpeed.MustBeNonnegative := true; AddField(FFdMinBounceSpeed); FFdSlipFactors := TSFVec2f.Create(Self, True, 'slipFactors', Vector2(0, 0)); FdSlipFactors.ChangeAlways := chVisibleNonGeometry; AddField(FFdSlipFactors); FFdSoftnessConstantForceMix := TSFFloat.Create(Self, True, 'softnessConstantForceMix', 0.0001); FdSoftnessConstantForceMix.ChangeAlways := chVisibleNonGeometry; FdSoftnessConstantForceMix.MustBeNonnegative := true; AddField(FFdSoftnessConstantForceMix); FFdSoftnessErrorCorrection := TSFFloat.Create(Self, True, 'softnessErrorCorrection', 0.8); FdSoftnessErrorCorrection.ChangeAlways := chVisibleNonGeometry; FdSoftnessErrorCorrection.MustBeNonnegative := true; AddField(FFdSoftnessErrorCorrection); FFdSurfaceSpeed := TSFVec2f.Create(Self, True, 'surfaceSpeed', Vector2(0, 0)); FdSurfaceSpeed.ChangeAlways := chVisibleNonGeometry; AddField(FFdSurfaceSpeed); end; {$endif read_implementation}