Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_x3dnbodycollisionspacenode.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 GetEnabled: Boolean;
28 procedure SetEnabled(const Value: Boolean);
29 function GetBBox: TBox3D;
30 procedure SetBBox(const Value: TBox3D);
31 public
32 { Create node fields and events. }
33 procedure CreateNode; override;
34 class function ClassX3DType: String; override;
35
36 strict private FFdEnabled: TSFBool;
37 { 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). }
38 public property FdEnabled: TSFBool read FFdEnabled;
39 { }
40 property Enabled: Boolean read GetEnabled write SetEnabled;
41
42 strict private FFdBboxCenter: TSFVec3f;
43 { Internal wrapper for property @code(BboxCenter). This wrapper API may change, we advise to access simpler @code(BboxCenter) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
44 public property FdBboxCenter: TSFVec3f read FFdBboxCenter;
45 { }
46 property BBox: TBox3D read GetBBox write SetBBox;
47
48 strict private FFdBboxSize: TSFVec3f;
49 { Internal wrapper for property @code(BboxSize). This wrapper API may change, we advise to access simpler @code(BboxSize) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
50 public property FdBboxSize: TSFVec3f read FFdBboxSize;
51
52 {$endif read_interface}
53
54 {$ifdef read_implementation}
55
56 { TAbstractNBodyCollisionSpaceNode ----------------------------------------------- }
57
58 function TAbstractNBodyCollisionSpaceNode.GetEnabled: Boolean;
59 begin
60 Result := FdEnabled.Value;
61 end;
62
63 procedure TAbstractNBodyCollisionSpaceNode.SetEnabled(const Value: Boolean);
64 begin
65 FdEnabled.Send(Value);
66 end;
67
68 function TAbstractNBodyCollisionSpaceNode.GetBBox: TBox3D;
69 begin
70 Result := TBox3D.FromCenterSize(FdBBoxCenter.Value, FdBBoxSize.Value);
71 end;
72
73 procedure TAbstractNBodyCollisionSpaceNode.SetBBox(const Value: TBox3D);
74 var
75 ValueCenter, ValueSize: TVector3;
76 begin
77 Value.ToCenterSize(ValueCenter, ValueSize);
78 FdBBoxCenter.Send(ValueCenter);
79 FdBBoxSize.Send(ValueSize);
80 end;
81
82 class function TAbstractNBodyCollisionSpaceNode.ClassX3DType: String;
83 begin
84 Result := 'X3DNBodyCollisionSpaceNode';
85 end;
86
87 procedure TAbstractNBodyCollisionSpaceNode.CreateNode;
88 begin
89 inherited;
90
91 FFdEnabled := TSFBool.Create(Self, True, 'enabled', true);
92 FdEnabled.ChangeAlways := chVisibleNonGeometry;
93 AddField(FFdEnabled);
94
95 FFdBboxCenter := TSFVec3f.Create(Self, False, 'bboxCenter', Vector3(0, 0, 0));
96 FdBboxCenter.ChangeAlways := chVisibleNonGeometry;
97 AddField(FFdBboxCenter);
98
99 FFdBboxSize := TSFVec3f.Create(Self, False, 'bboxSize', Vector3(-1, -1, -1));
100 FdBboxSize.ChangeAlways := chVisibleNonGeometry;
101 AddField(FFdBboxSize);
102 end;
103
104 {$endif read_implementation}