| 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 GetCenter: TVector3Double; |
| 28 |
procedure SetCenter(const Value: TVector3Double); |
| 29 |
function GetGeoOrigin: TGeoOriginNode; |
| 30 |
procedure SetGeoOrigin(const Value: TGeoOriginNode); |
| 31 |
function GetRange: Single; |
| 32 |
procedure SetRange(const Value: Single); |
| 33 |
function GetBBox: TBox3D; |
| 34 |
procedure SetBBox(const Value: TBox3D); |
| 35 |
public |
| 36 |
{ Create node fields and events. } |
| 37 |
procedure CreateNode; override; |
| 38 |
class function ClassX3DType: String; override; |
| 39 |
|
| 40 |
strict private FEventChildren: TMFNodeEvent; |
| 41 |
{ } |
| 42 |
public property EventChildren: TMFNodeEvent read FEventChildren; |
| 43 |
|
| 44 |
strict private FEventLevel_changed: TSFInt32Event; |
| 45 |
{ } |
| 46 |
public property EventLevel_changed: TSFInt32Event read FEventLevel_changed; |
| 47 |
|
| 48 |
strict private FFdCenter: TSFVec3d; |
| 49 |
{ Internal wrapper for property @code(Center). This wrapper API may change, we advise to access simpler @code(Center) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 50 |
public property FdCenter: TSFVec3d read FFdCenter; |
| 51 |
{ } |
| 52 |
property Center: TVector3Double read GetCenter write SetCenter; |
| 53 |
|
| 54 |
strict private FFdChild1Url: TMFString; |
| 55 |
{ Internal wrapper for property @code(Child1Url). This wrapper API may change, we advise to access simpler @code(Child1Url) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 56 |
public property FdChild1Url: TMFString read FFdChild1Url; |
| 57 |
{ } |
| 58 |
procedure SetChild1Url(const Value: array of string); overload; |
| 59 |
{ } |
| 60 |
procedure SetChild1Url(const Value: TCastleStringList); overload; |
| 61 |
|
| 62 |
strict private FFdChild2Url: TMFString; |
| 63 |
{ Internal wrapper for property @code(Child2Url). This wrapper API may change, we advise to access simpler @code(Child2Url) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 64 |
public property FdChild2Url: TMFString read FFdChild2Url; |
| 65 |
{ } |
| 66 |
procedure SetChild2Url(const Value: array of string); overload; |
| 67 |
{ } |
| 68 |
procedure SetChild2Url(const Value: TCastleStringList); overload; |
| 69 |
|
| 70 |
strict private FFdChild3Url: TMFString; |
| 71 |
{ Internal wrapper for property @code(Child3Url). This wrapper API may change, we advise to access simpler @code(Child3Url) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 72 |
public property FdChild3Url: TMFString read FFdChild3Url; |
| 73 |
{ } |
| 74 |
procedure SetChild3Url(const Value: array of string); overload; |
| 75 |
{ } |
| 76 |
procedure SetChild3Url(const Value: TCastleStringList); overload; |
| 77 |
|
| 78 |
strict private FFdChild4Url: TMFString; |
| 79 |
{ Internal wrapper for property @code(Child4Url). This wrapper API may change, we advise to access simpler @code(Child4Url) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 80 |
public property FdChild4Url: TMFString read FFdChild4Url; |
| 81 |
{ } |
| 82 |
procedure SetChild4Url(const Value: array of string); overload; |
| 83 |
{ } |
| 84 |
procedure SetChild4Url(const Value: TCastleStringList); overload; |
| 85 |
|
| 86 |
strict private FFdGeoOrigin: TSFNode; |
| 87 |
{ 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). } |
| 88 |
public property FdGeoOrigin: TSFNode read FFdGeoOrigin; |
| 89 |
{ } |
| 90 |
property GeoOrigin: TGeoOriginNode read GetGeoOrigin write SetGeoOrigin; |
| 91 |
|
| 92 |
strict private FFdGeoSystem: TMFString; |
| 93 |
{ 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). } |
| 94 |
public property FdGeoSystem: TMFString read FFdGeoSystem; |
| 95 |
{ } |
| 96 |
procedure SetGeoSystem(const Value: array of string); overload; |
| 97 |
{ } |
| 98 |
procedure SetGeoSystem(const Value: TCastleStringList); overload; |
| 99 |
|
| 100 |
strict private FFdRange: TSFFloat; |
| 101 |
{ Internal wrapper for property @code(Range). This wrapper API may change, we advise to access simpler @code(Range) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 102 |
public property FdRange: TSFFloat read FFdRange; |
| 103 |
{ } |
| 104 |
property Range: Single read GetRange write SetRange; |
| 105 |
|
| 106 |
strict private FFdRootUrl: TMFString; |
| 107 |
{ Internal wrapper for property @code(RootUrl). This wrapper API may change, we advise to access simpler @code(RootUrl) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 108 |
public property FdRootUrl: TMFString read FFdRootUrl; |
| 109 |
{ } |
| 110 |
procedure SetRootUrl(const Value: array of string); overload; |
| 111 |
{ } |
| 112 |
procedure SetRootUrl(const Value: TCastleStringList); overload; |
| 113 |
|
| 114 |
strict private FFdRootNode: TMFNode; |
| 115 |
{ Internal wrapper for property @code(RootNode). This wrapper API may change, we advise to access simpler @code(RootNode) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 116 |
public property FdRootNode: TMFNode read FFdRootNode; |
| 117 |
{ } |
| 118 |
procedure SetRootNode(const Value: array of TAbstractChildNode); |
| 119 |
|
| 120 |
strict private FFdBboxCenter: TSFVec3f; |
| 121 |
{ 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). } |
| 122 |
public property FdBboxCenter: TSFVec3f read FFdBboxCenter; |
| 123 |
{ } |
| 124 |
property BBox: TBox3D read GetBBox write SetBBox; |
| 125 |
|
| 126 |
strict private FFdBboxSize: TSFVec3f; |
| 127 |
{ 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). } |
| 128 |
public property FdBboxSize: TSFVec3f read FFdBboxSize; |
| 129 |
|
| 130 |
{$endif read_interface} |
| 131 |
|
| 132 |
{$ifdef read_implementation} |
| 133 |
|
| 134 |
{ TGeoLODNode ----------------------------------------------- } |
| 135 |
|
| 136 |
function TGeoLODNode.GetCenter: TVector3Double; |
| 137 |
begin |
| 138 |
Result := FdCenter.Value; |
| 139 |
end; |
| 140 |
|
| 141 |
procedure TGeoLODNode.SetCenter(const Value: TVector3Double); |
| 142 |
begin |
| 143 |
FdCenter.Send(Value); |
| 144 |
end; |
| 145 |
|
| 146 |
procedure TGeoLODNode.SetChild1Url(const Value: array of string); |
| 147 |
begin |
| 148 |
FdChild1Url.Send(Value); |
| 149 |
end; |
| 150 |
|
| 151 |
procedure TGeoLODNode.SetChild1Url(const Value: TCastleStringList); |
| 152 |
begin |
| 153 |
FdChild1Url.Send(Value); |
| 154 |
end; |
| 155 |
|
| 156 |
procedure TGeoLODNode.SetChild2Url(const Value: array of string); |
| 157 |
begin |
| 158 |
FdChild2Url.Send(Value); |
| 159 |
end; |
| 160 |
|
| 161 |
procedure TGeoLODNode.SetChild2Url(const Value: TCastleStringList); |
| 162 |
begin |
| 163 |
FdChild2Url.Send(Value); |
| 164 |
end; |
| 165 |
|
| 166 |
procedure TGeoLODNode.SetChild3Url(const Value: array of string); |
| 167 |
begin |
| 168 |
FdChild3Url.Send(Value); |
| 169 |
end; |
| 170 |
|
| 171 |
procedure TGeoLODNode.SetChild3Url(const Value: TCastleStringList); |
| 172 |
begin |
| 173 |
FdChild3Url.Send(Value); |
| 174 |
end; |
| 175 |
|
| 176 |
procedure TGeoLODNode.SetChild4Url(const Value: array of string); |
| 177 |
begin |
| 178 |
FdChild4Url.Send(Value); |
| 179 |
end; |
| 180 |
|
| 181 |
procedure TGeoLODNode.SetChild4Url(const Value: TCastleStringList); |
| 182 |
begin |
| 183 |
FdChild4Url.Send(Value); |
| 184 |
end; |
| 185 |
|
| 186 |
function TGeoLODNode.GetGeoOrigin: TGeoOriginNode; |
| 187 |
begin |
| 188 |
if FdGeoOrigin.Value is TGeoOriginNode then |
| 189 |
Result := TGeoOriginNode(FdGeoOrigin.Value) |
| 190 |
else |
| 191 |
Result := nil; |
| 192 |
end; |
| 193 |
|
| 194 |
procedure TGeoLODNode.SetGeoOrigin(const Value: TGeoOriginNode); |
| 195 |
begin |
| 196 |
FdGeoOrigin.Send(Value); |
| 197 |
end; |
| 198 |
|
| 199 |
procedure TGeoLODNode.SetGeoSystem(const Value: array of string); |
| 200 |
begin |
| 201 |
FdGeoSystem.Send(Value); |
| 202 |
end; |
| 203 |
|
| 204 |
procedure TGeoLODNode.SetGeoSystem(const Value: TCastleStringList); |
| 205 |
begin |
| 206 |
FdGeoSystem.Send(Value); |
| 207 |
end; |
| 208 |
|
| 209 |
function TGeoLODNode.GetRange: Single; |
| 210 |
begin |
| 211 |
Result := FdRange.Value; |
| 212 |
end; |
| 213 |
|
| 214 |
procedure TGeoLODNode.SetRange(const Value: Single); |
| 215 |
begin |
| 216 |
FdRange.Send(Value); |
| 217 |
end; |
| 218 |
|
| 219 |
procedure TGeoLODNode.SetRootUrl(const Value: array of string); |
| 220 |
begin |
| 221 |
FdRootUrl.Send(Value); |
| 222 |
end; |
| 223 |
|
| 224 |
procedure TGeoLODNode.SetRootUrl(const Value: TCastleStringList); |
| 225 |
begin |
| 226 |
FdRootUrl.Send(Value); |
| 227 |
end; |
| 228 |
|
| 229 |
procedure TGeoLODNode.SetRootNode(const Value: array of TAbstractChildNode); |
| 230 |
var |
| 231 |
L: Integer; |
| 232 |
A: array of TX3DNode; |
| 233 |
begin |
| 234 |
L := High(Value) + 1; |
| 235 |
SetLength(A, L); |
| 236 |
if L > 0 then |
| 237 |
Move(Value[0], A[0], L * SizeOf(TAbstractChildNode)); |
| 238 |
FdRootNode.Send(A); |
| 239 |
end; |
| 240 |
|
| 241 |
function TGeoLODNode.GetBBox: TBox3D; |
| 242 |
begin |
| 243 |
Result := TBox3D.FromCenterSize(FdBBoxCenter.Value, FdBBoxSize.Value); |
| 244 |
end; |
| 245 |
|
| 246 |
procedure TGeoLODNode.SetBBox(const Value: TBox3D); |
| 247 |
var |
| 248 |
ValueCenter, ValueSize: TVector3; |
| 249 |
begin |
| 250 |
Value.ToCenterSize(ValueCenter, ValueSize); |
| 251 |
FdBBoxCenter.Send(ValueCenter); |
| 252 |
FdBBoxSize.Send(ValueSize); |
| 253 |
end; |
| 254 |
|
| 255 |
class function TGeoLODNode.ClassX3DType: String; |
| 256 |
begin |
| 257 |
Result := 'GeoLOD'; |
| 258 |
end; |
| 259 |
|
| 260 |
procedure TGeoLODNode.CreateNode; |
| 261 |
begin |
| 262 |
inherited; |
| 263 |
|
| 264 |
FEventChildren := TMFNodeEvent.Create(Self, 'children', false); |
| 265 |
AddEvent(FEventChildren); |
| 266 |
|
| 267 |
FEventLevel_changed := TSFInt32Event.Create(Self, 'level_changed', false); |
| 268 |
AddEvent(FEventLevel_changed); |
| 269 |
|
| 270 |
FFdCenter := TSFVec3d.Create(Self, False, 'center', Vector3Double(0, 0, 0)); |
| 271 |
FdCenter.ChangeAlways := chVisibleNonGeometry; |
| 272 |
AddField(FFdCenter); |
| 273 |
|
| 274 |
FFdChild1Url := TMFString.Create(Self, False, 'child1Url', []); |
| 275 |
FdChild1Url.ChangeAlways := chVisibleNonGeometry; |
| 276 |
AddField(FFdChild1Url); |
| 277 |
|
| 278 |
FFdChild2Url := TMFString.Create(Self, False, 'child2Url', []); |
| 279 |
FdChild2Url.ChangeAlways := chVisibleNonGeometry; |
| 280 |
AddField(FFdChild2Url); |
| 281 |
|
| 282 |
FFdChild3Url := TMFString.Create(Self, False, 'child3Url', []); |
| 283 |
FdChild3Url.ChangeAlways := chVisibleNonGeometry; |
| 284 |
AddField(FFdChild3Url); |
| 285 |
|
| 286 |
FFdChild4Url := TMFString.Create(Self, False, 'child4Url', []); |
| 287 |
FdChild4Url.ChangeAlways := chVisibleNonGeometry; |
| 288 |
AddField(FFdChild4Url); |
| 289 |
|
| 290 |
FFdGeoOrigin := TSFNode.Create(Self, False, 'geoOrigin', [TGeoOriginNode]); |
| 291 |
FdGeoOrigin.ChangeAlways := chVisibleNonGeometry; |
| 292 |
AddField(FFdGeoOrigin); |
| 293 |
|
| 294 |
FFdGeoSystem := TMFString.Create(Self, False, 'geoSystem', ['GD','WE']); |
| 295 |
FdGeoSystem.ChangeAlways := chVisibleNonGeometry; |
| 296 |
AddField(FFdGeoSystem); |
| 297 |
|
| 298 |
FFdRange := TSFFloat.Create(Self, False, 'range', 10); |
| 299 |
FdRange.ChangeAlways := chVisibleNonGeometry; |
| 300 |
FdRange.MustBeNonnegative := true; |
| 301 |
AddField(FFdRange); |
| 302 |
|
| 303 |
FFdRootUrl := TMFString.Create(Self, False, 'rootUrl', []); |
| 304 |
FdRootUrl.ChangeAlways := chVisibleNonGeometry; |
| 305 |
AddField(FFdRootUrl); |
| 306 |
|
| 307 |
FFdRootNode := TMFNode.Create(Self, False, 'rootNode', [TAbstractChildNode]); |
| 308 |
FdRootNode.ChangeAlways := chVisibleNonGeometry; |
| 309 |
AddField(FFdRootNode); |
| 310 |
|
| 311 |
FFdBboxCenter := TSFVec3f.Create(Self, False, 'bboxCenter', Vector3(0, 0, 0)); |
| 312 |
FdBboxCenter.ChangeAlways := chVisibleNonGeometry; |
| 313 |
AddField(FFdBboxCenter); |
| 314 |
|
| 315 |
FFdBboxSize := TSFVec3f.Create(Self, False, 'bboxSize', Vector3(-1, -1, -1)); |
| 316 |
FdBboxSize.ChangeAlways := chVisibleNonGeometry; |
| 317 |
AddField(FFdBboxSize); |
| 318 |
end; |
| 319 |
|
| 320 |
{$endif read_implementation} |