Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_collision.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 GetProxy: TAbstractChildNode;
30 procedure SetProxy(const Value: TAbstractChildNode);
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 FEventCollideTime: TSFTimeEvent;
43 { }
44 public property EventCollideTime: TSFTimeEvent read FEventCollideTime;
45
46 strict private FEventIsActive: TSFBoolEvent;
47 { }
48 public property EventIsActive: TSFBoolEvent read FEventIsActive;
49
50 strict private FFdProxy: TSFNode;
51 { Internal wrapper for property @code(Proxy). This wrapper API may change, we advise to access simpler @code(Proxy) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
52 public property FdProxy: TSFNode read FFdProxy;
53 { }
54 property Proxy: TAbstractChildNode read GetProxy write SetProxy;
55
56 {$endif read_interface}
57
58 {$ifdef read_implementation}
59
60 { TCollisionNode ----------------------------------------------- }
61
62 function TCollisionNode.GetEnabled: Boolean;
63 begin
64 Result := FdEnabled.Value;
65 end;
66
67 procedure TCollisionNode.SetEnabled(const Value: Boolean);
68 begin
69 FdEnabled.Send(Value);
70 end;
71
72 function TCollisionNode.GetProxy: TAbstractChildNode;
73 begin
74 if FdProxy.Value is TAbstractChildNode then
75 Result := TAbstractChildNode(FdProxy.Value)
76 else
77 Result := nil;
78 end;
79
80 procedure TCollisionNode.SetProxy(const Value: TAbstractChildNode);
81 begin
82 FdProxy.Send(Value);
83 end;
84
85 class function TCollisionNode.ClassX3DType: String;
86 begin
87 Result := 'Collision';
88 end;
89
90 procedure TCollisionNode.CreateNode;
91 begin
92 inherited;
93
94 FFdEnabled := TSFBool.Create(Self, True, 'enabled', true);
95 FdEnabled.ChangeAlways := chEverything;
96 AddField(FFdEnabled);
97
98 FEventCollideTime := TSFTimeEvent.Create(Self, 'collideTime', false);
99 AddEvent(FEventCollideTime);
100
101 FEventIsActive := TSFBoolEvent.Create(Self, 'isActive', false);
102 AddEvent(FEventIsActive);
103
104 FFdProxy := TSFNode.Create(Self, False, 'proxy', [TAbstractChildNode]);
105 FdProxy.ChangeAlways := chEverything;
106 AddField(FFdProxy);
107 end;
108
109 {$endif read_implementation}