Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_geolocation.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 GetGeoCoords: TVector3Double;
28 procedure SetGeoCoords(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 FFdGeoCoords: TSFVec3d;
37 { Internal wrapper for property @code(GeoCoords). This wrapper API may change, we advise to access simpler @code(GeoCoords) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
38 public property FdGeoCoords: TSFVec3d read FFdGeoCoords;
39 { }
40 property GeoCoords: TVector3Double read GetGeoCoords write SetGeoCoords;
41
42 strict private FFdGeoOrigin: TSFNode;
43 { 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). }
44 public property FdGeoOrigin: TSFNode read FFdGeoOrigin;
45 { }
46 property GeoOrigin: TGeoOriginNode read GetGeoOrigin write SetGeoOrigin;
47
48 strict private FFdGeoSystem: TMFString;
49 { 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). }
50 public property FdGeoSystem: TMFString read FFdGeoSystem;
51 { }
52 procedure SetGeoSystem(const Value: array of string); overload;
53 { }
54 procedure SetGeoSystem(const Value: TCastleStringList); overload;
55
56 {$endif read_interface}
57
58 {$ifdef read_implementation}
59
60 { TGeoLocationNode ----------------------------------------------- }
61
62 function TGeoLocationNode.GetGeoCoords: TVector3Double;
63 begin
64 Result := FdGeoCoords.Value;
65 end;
66
67 procedure TGeoLocationNode.SetGeoCoords(const Value: TVector3Double);
68 begin
69 FdGeoCoords.Send(Value);
70 end;
71
72 function TGeoLocationNode.GetGeoOrigin: TGeoOriginNode;
73 begin
74 if FdGeoOrigin.Value is TGeoOriginNode then
75 Result := TGeoOriginNode(FdGeoOrigin.Value)
76 else
77 Result := nil;
78 end;
79
80 procedure TGeoLocationNode.SetGeoOrigin(const Value: TGeoOriginNode);
81 begin
82 FdGeoOrigin.Send(Value);
83 end;
84
85 procedure TGeoLocationNode.SetGeoSystem(const Value: array of string);
86 begin
87 FdGeoSystem.Send(Value);
88 end;
89
90 procedure TGeoLocationNode.SetGeoSystem(const Value: TCastleStringList);
91 begin
92 FdGeoSystem.Send(Value);
93 end;
94
95 class function TGeoLocationNode.ClassX3DType: String;
96 begin
97 Result := 'GeoLocation';
98 end;
99
100 procedure TGeoLocationNode.CreateNode;
101 begin
102 inherited;
103
104 FFdGeoCoords := TSFVec3d.Create(Self, True, 'geoCoords', Vector3Double(0, 0, 0));
105 FdGeoCoords.ChangeAlways := chVisibleNonGeometry;
106 AddField(FFdGeoCoords);
107
108 FFdGeoOrigin := TSFNode.Create(Self, False, 'geoOrigin', [TGeoOriginNode]);
109 FdGeoOrigin.ChangeAlways := chVisibleNonGeometry;
110 AddField(FFdGeoOrigin);
111
112 FFdGeoSystem := TMFString.Create(Self, False, 'geoSystem', ['GD','WE']);
113 FdGeoSystem.ChangeAlways := chVisibleNonGeometry;
114 AddField(FFdGeoSystem);
115 end;
116
117 {$endif read_implementation}