Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_geoproximitysensor.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 GetGeoCenter: TVector3Double;
28 procedure SetGeoCenter(const Value: TVector3Double);
29 function GetGeoOrigin: TGeoOriginNode;
30 procedure SetGeoOrigin(const Value: TGeoOriginNode);
31 public
32 { Create node fields and events. }
33 procedure CreateNode; override;
34 class function ClassX3DType: String; override;
35
36 strict private FFdGeoCenter: TSFVec3d;
37 { Internal wrapper for property @code(GeoCenter). This wrapper API may change, we advise to access simpler @code(GeoCenter) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
38 public property FdGeoCenter: TSFVec3d read FFdGeoCenter;
39 { }
40 property GeoCenter: TVector3Double read GetGeoCenter write SetGeoCenter;
41
42 strict private FEventCenterOfRotation_changed: TSFVec3fEvent;
43 { }
44 public property EventCenterOfRotation_changed: TSFVec3fEvent read FEventCenterOfRotation_changed;
45
46 strict private FEventGeoCoord_changed: TSFVec3dEvent;
47 { }
48 public property EventGeoCoord_changed: TSFVec3dEvent read FEventGeoCoord_changed;
49
50 strict private FEventOrientation_changed: TSFRotationEvent;
51 { }
52 public property EventOrientation_changed: TSFRotationEvent read FEventOrientation_changed;
53
54 strict private FEventPosition_changed: TSFVec3fEvent;
55 { }
56 public property EventPosition_changed: TSFVec3fEvent read FEventPosition_changed;
57
58 strict private FFdGeoOrigin: TSFNode;
59 { Internal wrapper for property @code(GeoOrigin). This wrapper API may change, we advise to access simpler @code(GeoOrigin) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
60 public property FdGeoOrigin: TSFNode read FFdGeoOrigin;
61 { }
62 property GeoOrigin: TGeoOriginNode read GetGeoOrigin write SetGeoOrigin;
63
64 strict private FFdGeoSystem: TMFString;
65 { Internal wrapper for property @code(GeoSystem). This wrapper API may change, we advise to access simpler @code(GeoSystem) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
66 public property FdGeoSystem: TMFString read FFdGeoSystem;
67 { }
68 procedure SetGeoSystem(const Value: array of string); overload;
69 { }
70 procedure SetGeoSystem(const Value: TCastleStringList); overload;
71
72 {$endif read_interface}
73
74 {$ifdef read_implementation}
75
76 { TGeoProximitySensorNode ----------------------------------------------- }
77
78 function TGeoProximitySensorNode.GetGeoCenter: TVector3Double;
79 begin
80 Result := FdGeoCenter.Value;
81 end;
82
83 procedure TGeoProximitySensorNode.SetGeoCenter(const Value: TVector3Double);
84 begin
85 FdGeoCenter.Send(Value);
86 end;
87
88 function TGeoProximitySensorNode.GetGeoOrigin: TGeoOriginNode;
89 begin
90 if FdGeoOrigin.Value is TGeoOriginNode then
91 Result := TGeoOriginNode(FdGeoOrigin.Value)
92 else
93 Result := nil;
94 end;
95
96 procedure TGeoProximitySensorNode.SetGeoOrigin(const Value: TGeoOriginNode);
97 begin
98 FdGeoOrigin.Send(Value);
99 end;
100
101 procedure TGeoProximitySensorNode.SetGeoSystem(const Value: array of string);
102 begin
103 FdGeoSystem.Send(Value);
104 end;
105
106 procedure TGeoProximitySensorNode.SetGeoSystem(const Value: TCastleStringList);
107 begin
108 FdGeoSystem.Send(Value);
109 end;
110
111 class function TGeoProximitySensorNode.ClassX3DType: String;
112 begin
113 Result := 'GeoProximitySensor';
114 end;
115
116 procedure TGeoProximitySensorNode.CreateNode;
117 begin
118 inherited;
119
120 FFdGeoCenter := TSFVec3d.Create(Self, True, 'geoCenter', Vector3Double(0, 0, 0));
121 FdGeoCenter.ChangeAlways := chVisibleNonGeometry;
122 AddField(FFdGeoCenter);
123
124 FEventCenterOfRotation_changed := TSFVec3fEvent.Create(Self, 'centerOfRotation_changed', false);
125 AddEvent(FEventCenterOfRotation_changed);
126
127 FEventGeoCoord_changed := TSFVec3dEvent.Create(Self, 'geoCoord_changed', false);
128 AddEvent(FEventGeoCoord_changed);
129
130 FEventOrientation_changed := TSFRotationEvent.Create(Self, 'orientation_changed', false);
131 AddEvent(FEventOrientation_changed);
132
133 FEventPosition_changed := TSFVec3fEvent.Create(Self, 'position_changed', false);
134 AddEvent(FEventPosition_changed);
135
136 FFdGeoOrigin := TSFNode.Create(Self, False, 'geoOrigin', [TGeoOriginNode]);
137 FdGeoOrigin.ChangeAlways := chVisibleNonGeometry;
138 AddField(FFdGeoOrigin);
139
140 FFdGeoSystem := TMFString.Create(Self, False, 'geoSystem', ['GD','WE']);
141 FdGeoSystem.ChangeAlways := chVisibleNonGeometry;
142 AddField(FFdGeoSystem);
143 end;
144
145 {$endif read_implementation}