| 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 GetFieldOfView: Single; |
| 28 |
procedure SetFieldOfView(const Value: Single); |
| 29 |
function GetHeadlight: Boolean; |
| 30 |
procedure SetHeadlight(const Value: Boolean); |
| 31 |
function GetGeoOrigin: TGeoOriginNode; |
| 32 |
procedure SetGeoOrigin(const Value: TGeoOriginNode); |
| 33 |
function GetSpeedFactor: Single; |
| 34 |
procedure SetSpeedFactor(const Value: Single); |
| 35 |
public |
| 36 |
{ Create node fields and events. } |
| 37 |
procedure CreateNode; override; |
| 38 |
class function ClassX3DType: String; override; |
| 39 |
|
| 40 |
strict private FEventSet_orientation: TSFRotationEvent; |
| 41 |
{ } |
| 42 |
public property EventSet_orientation: TSFRotationEvent read FEventSet_orientation; |
| 43 |
|
| 44 |
strict private FEventSet_position: TSFVec3dEvent; |
| 45 |
{ } |
| 46 |
public property EventSet_position: TSFVec3dEvent read FEventSet_position; |
| 47 |
|
| 48 |
strict private FFdFieldOfView: TSFFloat; |
| 49 |
{ Internal wrapper for property @code(FieldOfView). This wrapper API may change, we advise to access simpler @code(FieldOfView) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 50 |
public property FdFieldOfView: TSFFloat read FFdFieldOfView; |
| 51 |
{ } |
| 52 |
property FieldOfView: Single read GetFieldOfView write SetFieldOfView; |
| 53 |
|
| 54 |
strict private FFdHeadlight: TSFBool; |
| 55 |
{ Internal wrapper for property @code(Headlight). This wrapper API may change, we advise to access simpler @code(Headlight) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 56 |
public property FdHeadlight: TSFBool read FFdHeadlight; |
| 57 |
{ } |
| 58 |
property Headlight: Boolean read GetHeadlight write SetHeadlight; |
| 59 |
|
| 60 |
strict private FFdNavType: TMFString; |
| 61 |
{ Internal wrapper for property @code(NavType). This wrapper API may change, we advise to access simpler @code(NavType) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 62 |
public property FdNavType: TMFString read FFdNavType; |
| 63 |
{ } |
| 64 |
procedure SetNavType(const Value: array of string); overload; |
| 65 |
{ } |
| 66 |
procedure SetNavType(const Value: TCastleStringList); overload; |
| 67 |
|
| 68 |
strict private FFdGeoOrigin: TSFNode; |
| 69 |
{ 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). } |
| 70 |
public property FdGeoOrigin: TSFNode read FFdGeoOrigin; |
| 71 |
{ } |
| 72 |
property GeoOrigin: TGeoOriginNode read GetGeoOrigin write SetGeoOrigin; |
| 73 |
|
| 74 |
strict private FFdGeoSystem: TMFString; |
| 75 |
{ 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). } |
| 76 |
public property FdGeoSystem: TMFString read FFdGeoSystem; |
| 77 |
{ } |
| 78 |
procedure SetGeoSystem(const Value: array of string); overload; |
| 79 |
{ } |
| 80 |
procedure SetGeoSystem(const Value: TCastleStringList); overload; |
| 81 |
|
| 82 |
strict private FFdPosition: TSFVec3d; |
| 83 |
{ Internal wrapper for property @code(Position). This wrapper API may change, we advise to access simpler @code(Position) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 84 |
public property FdPosition: TSFVec3d read FFdPosition; |
| 85 |
|
| 86 |
strict private FFdSpeedFactor: TSFFloat; |
| 87 |
{ Internal wrapper for property @code(SpeedFactor). This wrapper API may change, we advise to access simpler @code(SpeedFactor) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 88 |
public property FdSpeedFactor: TSFFloat read FFdSpeedFactor; |
| 89 |
{ } |
| 90 |
property SpeedFactor: Single read GetSpeedFactor write SetSpeedFactor; |
| 91 |
|
| 92 |
{$endif read_interface} |
| 93 |
|
| 94 |
{$ifdef read_implementation} |
| 95 |
|
| 96 |
{ TGeoViewpointNode ----------------------------------------------- } |
| 97 |
|
| 98 |
function TGeoViewpointNode.GetFieldOfView: Single; |
| 99 |
begin |
| 100 |
Result := FdFieldOfView.Value; |
| 101 |
end; |
| 102 |
|
| 103 |
procedure TGeoViewpointNode.SetFieldOfView(const Value: Single); |
| 104 |
begin |
| 105 |
FdFieldOfView.Send(Value); |
| 106 |
end; |
| 107 |
|
| 108 |
function TGeoViewpointNode.GetHeadlight: Boolean; |
| 109 |
begin |
| 110 |
Result := FdHeadlight.Value; |
| 111 |
end; |
| 112 |
|
| 113 |
procedure TGeoViewpointNode.SetHeadlight(const Value: Boolean); |
| 114 |
begin |
| 115 |
FdHeadlight.Send(Value); |
| 116 |
end; |
| 117 |
|
| 118 |
procedure TGeoViewpointNode.SetNavType(const Value: array of string); |
| 119 |
begin |
| 120 |
FdNavType.Send(Value); |
| 121 |
end; |
| 122 |
|
| 123 |
procedure TGeoViewpointNode.SetNavType(const Value: TCastleStringList); |
| 124 |
begin |
| 125 |
FdNavType.Send(Value); |
| 126 |
end; |
| 127 |
|
| 128 |
function TGeoViewpointNode.GetGeoOrigin: TGeoOriginNode; |
| 129 |
begin |
| 130 |
if FdGeoOrigin.Value is TGeoOriginNode then |
| 131 |
Result := TGeoOriginNode(FdGeoOrigin.Value) |
| 132 |
else |
| 133 |
Result := nil; |
| 134 |
end; |
| 135 |
|
| 136 |
procedure TGeoViewpointNode.SetGeoOrigin(const Value: TGeoOriginNode); |
| 137 |
begin |
| 138 |
FdGeoOrigin.Send(Value); |
| 139 |
end; |
| 140 |
|
| 141 |
procedure TGeoViewpointNode.SetGeoSystem(const Value: array of string); |
| 142 |
begin |
| 143 |
FdGeoSystem.Send(Value); |
| 144 |
end; |
| 145 |
|
| 146 |
procedure TGeoViewpointNode.SetGeoSystem(const Value: TCastleStringList); |
| 147 |
begin |
| 148 |
FdGeoSystem.Send(Value); |
| 149 |
end; |
| 150 |
|
| 151 |
function TGeoViewpointNode.GetSpeedFactor: Single; |
| 152 |
begin |
| 153 |
Result := FdSpeedFactor.Value; |
| 154 |
end; |
| 155 |
|
| 156 |
procedure TGeoViewpointNode.SetSpeedFactor(const Value: Single); |
| 157 |
begin |
| 158 |
FdSpeedFactor.Send(Value); |
| 159 |
end; |
| 160 |
|
| 161 |
class function TGeoViewpointNode.ClassX3DType: String; |
| 162 |
begin |
| 163 |
Result := 'GeoViewpoint'; |
| 164 |
end; |
| 165 |
|
| 166 |
procedure TGeoViewpointNode.CreateNode; |
| 167 |
begin |
| 168 |
inherited; |
| 169 |
|
| 170 |
FEventSet_orientation := TSFRotationEvent.Create(Self, 'set_orientation', true); |
| 171 |
AddEvent(FEventSet_orientation); |
| 172 |
|
| 173 |
FEventSet_position := TSFVec3dEvent.Create(Self, 'set_position', true); |
| 174 |
AddEvent(FEventSet_position); |
| 175 |
|
| 176 |
FFdFieldOfView := TSFFloat.Create(Self, True, 'fieldOfView', Pi/4); |
| 177 |
FdFieldOfView.ChangeAlways := chVisibleNonGeometry; |
| 178 |
AddField(FFdFieldOfView); |
| 179 |
|
| 180 |
FFdHeadlight := TSFBool.Create(Self, True, 'headlight', true); |
| 181 |
FdHeadlight.ChangeAlways := chVisibleNonGeometry; |
| 182 |
AddField(FFdHeadlight); |
| 183 |
|
| 184 |
FFdNavType := TMFString.Create(Self, True, 'navType', ['EXAMINE','ANY']); |
| 185 |
FdNavType.ChangeAlways := chVisibleNonGeometry; |
| 186 |
AddField(FFdNavType); |
| 187 |
|
| 188 |
FFdGeoOrigin := TSFNode.Create(Self, False, 'geoOrigin', [TGeoOriginNode]); |
| 189 |
FdGeoOrigin.ChangeAlways := chVisibleNonGeometry; |
| 190 |
AddField(FFdGeoOrigin); |
| 191 |
|
| 192 |
FFdGeoSystem := TMFString.Create(Self, False, 'geoSystem', ['GD','WE']); |
| 193 |
FdGeoSystem.ChangeAlways := chVisibleNonGeometry; |
| 194 |
AddField(FFdGeoSystem); |
| 195 |
|
| 196 |
FFdPosition := TSFVec3d.Create(Self, False, 'position', Vector3Double(0, 0, 100000)); |
| 197 |
FdPosition.ChangeAlways := chVisibleNonGeometry; |
| 198 |
AddField(FFdPosition); |
| 199 |
|
| 200 |
FFdSpeedFactor := TSFFloat.Create(Self, False, 'speedFactor', 1.0); |
| 201 |
FdSpeedFactor.ChangeAlways := chVisibleNonGeometry; |
| 202 |
FdSpeedFactor.MustBeNonnegative := true; |
| 203 |
AddField(FFdSpeedFactor); |
| 204 |
end; |
| 205 |
|
| 206 |
{$endif read_implementation} |