| 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 GetColor: TAbstractColorNode; |
| 28 |
procedure SetColor(const Value: TAbstractColorNode); |
| 29 |
function GetFogCoord: TFogCoordinateNode; |
| 30 |
procedure SetFogCoord(const Value: TFogCoordinateNode); |
| 31 |
function GetNormal: TAbstractNormalNode; |
| 32 |
procedure SetNormal(const Value: TAbstractNormalNode); |
| 33 |
function GetTexCoord: TAbstractTextureCoordinateNode; |
| 34 |
procedure SetTexCoord(const Value: TAbstractTextureCoordinateNode); |
| 35 |
function GetCcw: Boolean; |
| 36 |
procedure SetCcw(const Value: Boolean); |
| 37 |
function GetColorPerVertex: Boolean; |
| 38 |
procedure SetColorPerVertex(const Value: Boolean); |
| 39 |
function GetCreaseAngle: Single; |
| 40 |
procedure SetCreaseAngle(const Value: Single); |
| 41 |
function GetNormalPerVertex: Boolean; |
| 42 |
procedure SetNormalPerVertex(const Value: Boolean); |
| 43 |
function GetXDimension: Integer; |
| 44 |
procedure SetXDimension(const Value: Integer); |
| 45 |
function GetXSpacing: Single; |
| 46 |
procedure SetXSpacing(const Value: Single); |
| 47 |
function GetZDimension: Integer; |
| 48 |
procedure SetZDimension(const Value: Integer); |
| 49 |
function GetZSpacing: Single; |
| 50 |
procedure SetZSpacing(const Value: Single); |
| 51 |
public |
| 52 |
{ Create node fields and events. } |
| 53 |
procedure CreateNode; override; |
| 54 |
class function ClassX3DType: String; override; |
| 55 |
|
| 56 |
strict private FEventSet_height: TMFFloatEvent; |
| 57 |
{ } |
| 58 |
public property EventSet_height: TMFFloatEvent read FEventSet_height; |
| 59 |
|
| 60 |
strict private FFdAttrib: TMFNode; |
| 61 |
{ Internal wrapper for property @code(Attrib). This wrapper API may change, we advise to access simpler @code(Attrib) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 62 |
public property FdAttrib: TMFNode read FFdAttrib; |
| 63 |
{ } |
| 64 |
procedure SetAttrib(const Value: array of TAbstractVertexAttributeNode); |
| 65 |
|
| 66 |
strict private FFdColor: TSFNode; |
| 67 |
{ Internal wrapper for property @code(Color). This wrapper API may change, we advise to access simpler @code(Color) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 68 |
public property FdColor: TSFNode read FFdColor; |
| 69 |
{ } |
| 70 |
property Color: TAbstractColorNode read GetColor write SetColor; |
| 71 |
|
| 72 |
strict private FFdFogCoord: TSFNode; |
| 73 |
{ Internal wrapper for property @code(FogCoord). This wrapper API may change, we advise to access simpler @code(FogCoord) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 74 |
public property FdFogCoord: TSFNode read FFdFogCoord; |
| 75 |
{ } |
| 76 |
property FogCoord: TFogCoordinateNode read GetFogCoord write SetFogCoord; |
| 77 |
|
| 78 |
strict private FFdNormal: TSFNode; |
| 79 |
{ Internal wrapper for property @code(Normal). This wrapper API may change, we advise to access simpler @code(Normal) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 80 |
public property FdNormal: TSFNode read FFdNormal; |
| 81 |
{ } |
| 82 |
property Normal: TAbstractNormalNode read GetNormal write SetNormal; |
| 83 |
|
| 84 |
strict private FFdTexCoord: TSFNode; |
| 85 |
{ Internal wrapper for property @code(TexCoord). This wrapper API may change, we advise to access simpler @code(TexCoord) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 86 |
public property FdTexCoord: TSFNode read FFdTexCoord; |
| 87 |
{ } |
| 88 |
property TexCoord: TAbstractTextureCoordinateNode read GetTexCoord write SetTexCoord; |
| 89 |
|
| 90 |
strict private FFdCcw: TSFBool; |
| 91 |
{ Internal wrapper for property @code(Ccw). This wrapper API may change, we advise to access simpler @code(Ccw) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 92 |
public property FdCcw: TSFBool read FFdCcw; |
| 93 |
{ } |
| 94 |
property Ccw: Boolean read GetCcw write SetCcw; |
| 95 |
|
| 96 |
strict private FFdColorPerVertex: TSFBool; |
| 97 |
{ Internal wrapper for property @code(ColorPerVertex). This wrapper API may change, we advise to access simpler @code(ColorPerVertex) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 98 |
public property FdColorPerVertex: TSFBool read FFdColorPerVertex; |
| 99 |
{ } |
| 100 |
property ColorPerVertex: Boolean read GetColorPerVertex write SetColorPerVertex; |
| 101 |
|
| 102 |
strict private FFdCreaseAngle: TSFFloat; |
| 103 |
{ Internal wrapper for property @code(CreaseAngle). This wrapper API may change, we advise to access simpler @code(CreaseAngle) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 104 |
public property FdCreaseAngle: TSFFloat read FFdCreaseAngle; |
| 105 |
{ } |
| 106 |
property CreaseAngle: Single read GetCreaseAngle write SetCreaseAngle; |
| 107 |
|
| 108 |
strict private FFdHeight: TMFFloat; |
| 109 |
{ Internal wrapper for property @code(Height). This wrapper API may change, we advise to access simpler @code(Height) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 110 |
public property FdHeight: TMFFloat read FFdHeight; |
| 111 |
{ } |
| 112 |
procedure SetHeight(const Value: array of Single); overload; |
| 113 |
{ } |
| 114 |
procedure SetHeight(const Value: TSingleList); overload; |
| 115 |
|
| 116 |
strict private FFdNormalPerVertex: TSFBool; |
| 117 |
{ Internal wrapper for property @code(NormalPerVertex). This wrapper API may change, we advise to access simpler @code(NormalPerVertex) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 118 |
public property FdNormalPerVertex: TSFBool read FFdNormalPerVertex; |
| 119 |
{ } |
| 120 |
property NormalPerVertex: Boolean read GetNormalPerVertex write SetNormalPerVertex; |
| 121 |
|
| 122 |
strict private FFdSolid: TSFBool; |
| 123 |
{ Internal wrapper for property @code(Solid). This wrapper API may change, we advise to access simpler @code(Solid) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 124 |
public property FdSolid: TSFBool read FFdSolid; |
| 125 |
|
| 126 |
strict private FFdXDimension: TSFInt32; |
| 127 |
{ Internal wrapper for property @code(XDimension). This wrapper API may change, we advise to access simpler @code(XDimension) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 128 |
public property FdXDimension: TSFInt32 read FFdXDimension; |
| 129 |
{ } |
| 130 |
property XDimension: Integer read GetXDimension write SetXDimension; |
| 131 |
|
| 132 |
strict private FFdXSpacing: TSFFloat; |
| 133 |
{ Internal wrapper for property @code(XSpacing). This wrapper API may change, we advise to access simpler @code(XSpacing) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 134 |
public property FdXSpacing: TSFFloat read FFdXSpacing; |
| 135 |
{ } |
| 136 |
property XSpacing: Single read GetXSpacing write SetXSpacing; |
| 137 |
|
| 138 |
strict private FFdZDimension: TSFInt32; |
| 139 |
{ Internal wrapper for property @code(ZDimension). This wrapper API may change, we advise to access simpler @code(ZDimension) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 140 |
public property FdZDimension: TSFInt32 read FFdZDimension; |
| 141 |
{ } |
| 142 |
property ZDimension: Integer read GetZDimension write SetZDimension; |
| 143 |
|
| 144 |
strict private FFdZSpacing: TSFFloat; |
| 145 |
{ Internal wrapper for property @code(ZSpacing). This wrapper API may change, we advise to access simpler @code(ZSpacing) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 146 |
public property FdZSpacing: TSFFloat read FFdZSpacing; |
| 147 |
{ } |
| 148 |
property ZSpacing: Single read GetZSpacing write SetZSpacing; |
| 149 |
|
| 150 |
{$endif read_interface} |
| 151 |
|
| 152 |
{$ifdef read_implementation} |
| 153 |
|
| 154 |
{ TElevationGridNode ----------------------------------------------- } |
| 155 |
|
| 156 |
procedure TElevationGridNode.SetAttrib(const Value: array of TAbstractVertexAttributeNode); |
| 157 |
var |
| 158 |
L: Integer; |
| 159 |
A: array of TX3DNode; |
| 160 |
begin |
| 161 |
L := High(Value) + 1; |
| 162 |
SetLength(A, L); |
| 163 |
if L > 0 then |
| 164 |
Move(Value[0], A[0], L * SizeOf(TAbstractVertexAttributeNode)); |
| 165 |
FdAttrib.Send(A); |
| 166 |
end; |
| 167 |
|
| 168 |
function TElevationGridNode.GetColor: TAbstractColorNode; |
| 169 |
begin |
| 170 |
if FdColor.Value is TAbstractColorNode then |
| 171 |
Result := TAbstractColorNode(FdColor.Value) |
| 172 |
else |
| 173 |
Result := nil; |
| 174 |
end; |
| 175 |
|
| 176 |
procedure TElevationGridNode.SetColor(const Value: TAbstractColorNode); |
| 177 |
begin |
| 178 |
FdColor.Send(Value); |
| 179 |
end; |
| 180 |
|
| 181 |
function TElevationGridNode.GetFogCoord: TFogCoordinateNode; |
| 182 |
begin |
| 183 |
if FdFogCoord.Value is TFogCoordinateNode then |
| 184 |
Result := TFogCoordinateNode(FdFogCoord.Value) |
| 185 |
else |
| 186 |
Result := nil; |
| 187 |
end; |
| 188 |
|
| 189 |
procedure TElevationGridNode.SetFogCoord(const Value: TFogCoordinateNode); |
| 190 |
begin |
| 191 |
FdFogCoord.Send(Value); |
| 192 |
end; |
| 193 |
|
| 194 |
function TElevationGridNode.GetNormal: TAbstractNormalNode; |
| 195 |
begin |
| 196 |
if FdNormal.Value is TAbstractNormalNode then |
| 197 |
Result := TAbstractNormalNode(FdNormal.Value) |
| 198 |
else |
| 199 |
Result := nil; |
| 200 |
end; |
| 201 |
|
| 202 |
procedure TElevationGridNode.SetNormal(const Value: TAbstractNormalNode); |
| 203 |
begin |
| 204 |
FdNormal.Send(Value); |
| 205 |
end; |
| 206 |
|
| 207 |
function TElevationGridNode.GetTexCoord: TAbstractTextureCoordinateNode; |
| 208 |
begin |
| 209 |
if FdTexCoord.Value is TAbstractTextureCoordinateNode then |
| 210 |
Result := TAbstractTextureCoordinateNode(FdTexCoord.Value) |
| 211 |
else |
| 212 |
Result := nil; |
| 213 |
end; |
| 214 |
|
| 215 |
procedure TElevationGridNode.SetTexCoord(const Value: TAbstractTextureCoordinateNode); |
| 216 |
begin |
| 217 |
FdTexCoord.Send(Value); |
| 218 |
end; |
| 219 |
|
| 220 |
function TElevationGridNode.GetCcw: Boolean; |
| 221 |
begin |
| 222 |
Result := FdCcw.Value; |
| 223 |
end; |
| 224 |
|
| 225 |
procedure TElevationGridNode.SetCcw(const Value: Boolean); |
| 226 |
begin |
| 227 |
FdCcw.Send(Value); |
| 228 |
end; |
| 229 |
|
| 230 |
function TElevationGridNode.GetColorPerVertex: Boolean; |
| 231 |
begin |
| 232 |
Result := FdColorPerVertex.Value; |
| 233 |
end; |
| 234 |
|
| 235 |
procedure TElevationGridNode.SetColorPerVertex(const Value: Boolean); |
| 236 |
begin |
| 237 |
FdColorPerVertex.Send(Value); |
| 238 |
end; |
| 239 |
|
| 240 |
function TElevationGridNode.GetCreaseAngle: Single; |
| 241 |
begin |
| 242 |
Result := FdCreaseAngle.Value; |
| 243 |
end; |
| 244 |
|
| 245 |
procedure TElevationGridNode.SetCreaseAngle(const Value: Single); |
| 246 |
begin |
| 247 |
FdCreaseAngle.Send(Value); |
| 248 |
end; |
| 249 |
|
| 250 |
procedure TElevationGridNode.SetHeight(const Value: array of Single); |
| 251 |
begin |
| 252 |
FdHeight.Send(Value); |
| 253 |
end; |
| 254 |
|
| 255 |
procedure TElevationGridNode.SetHeight(const Value: TSingleList); |
| 256 |
begin |
| 257 |
FdHeight.Send(Value); |
| 258 |
end; |
| 259 |
|
| 260 |
function TElevationGridNode.GetNormalPerVertex: Boolean; |
| 261 |
begin |
| 262 |
Result := FdNormalPerVertex.Value; |
| 263 |
end; |
| 264 |
|
| 265 |
procedure TElevationGridNode.SetNormalPerVertex(const Value: Boolean); |
| 266 |
begin |
| 267 |
FdNormalPerVertex.Send(Value); |
| 268 |
end; |
| 269 |
|
| 270 |
function TElevationGridNode.GetXDimension: Integer; |
| 271 |
begin |
| 272 |
Result := FdXDimension.Value; |
| 273 |
end; |
| 274 |
|
| 275 |
procedure TElevationGridNode.SetXDimension(const Value: Integer); |
| 276 |
begin |
| 277 |
FdXDimension.Send(Value); |
| 278 |
end; |
| 279 |
|
| 280 |
function TElevationGridNode.GetXSpacing: Single; |
| 281 |
begin |
| 282 |
Result := FdXSpacing.Value; |
| 283 |
end; |
| 284 |
|
| 285 |
procedure TElevationGridNode.SetXSpacing(const Value: Single); |
| 286 |
begin |
| 287 |
FdXSpacing.Send(Value); |
| 288 |
end; |
| 289 |
|
| 290 |
function TElevationGridNode.GetZDimension: Integer; |
| 291 |
begin |
| 292 |
Result := FdZDimension.Value; |
| 293 |
end; |
| 294 |
|
| 295 |
procedure TElevationGridNode.SetZDimension(const Value: Integer); |
| 296 |
begin |
| 297 |
FdZDimension.Send(Value); |
| 298 |
end; |
| 299 |
|
| 300 |
function TElevationGridNode.GetZSpacing: Single; |
| 301 |
begin |
| 302 |
Result := FdZSpacing.Value; |
| 303 |
end; |
| 304 |
|
| 305 |
procedure TElevationGridNode.SetZSpacing(const Value: Single); |
| 306 |
begin |
| 307 |
FdZSpacing.Send(Value); |
| 308 |
end; |
| 309 |
|
| 310 |
class function TElevationGridNode.ClassX3DType: String; |
| 311 |
begin |
| 312 |
Result := 'ElevationGrid'; |
| 313 |
end; |
| 314 |
|
| 315 |
procedure TElevationGridNode.CreateNode; |
| 316 |
begin |
| 317 |
inherited; |
| 318 |
|
| 319 |
FEventSet_height := TMFFloatEvent.Create(Self, 'set_height', true); |
| 320 |
AddEvent(FEventSet_height); |
| 321 |
|
| 322 |
FFdAttrib := TMFNode.Create(Self, True, 'attrib', [TAbstractVertexAttributeNode]); |
| 323 |
FdAttrib.ChangeAlways := chGeometry; |
| 324 |
AddField(FFdAttrib); |
| 325 |
|
| 326 |
FFdColor := TSFNode.Create(Self, True, 'color', [TAbstractColorNode]); |
| 327 |
FdColor.ChangeAlways := chGeometry; |
| 328 |
AddField(FFdColor); |
| 329 |
|
| 330 |
FFdFogCoord := TSFNode.Create(Self, True, 'fogCoord', [TFogCoordinateNode]); |
| 331 |
FdFogCoord.ChangeAlways := chGeometry; |
| 332 |
AddField(FFdFogCoord); |
| 333 |
|
| 334 |
FFdNormal := TSFNode.Create(Self, True, 'normal', [TAbstractNormalNode]); |
| 335 |
FdNormal.ChangeAlways := chGeometry; |
| 336 |
AddField(FFdNormal); |
| 337 |
|
| 338 |
FFdTexCoord := TSFNode.Create(Self, True, 'texCoord', [TAbstractTextureCoordinateNode]); |
| 339 |
FdTexCoord.ChangeAlways := chGeometry; |
| 340 |
FdTexCoord.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations; |
| 341 |
AddField(FFdTexCoord); |
| 342 |
|
| 343 |
FFdCcw := TSFBool.Create(Self, False, 'ccw', true); |
| 344 |
FdCcw.ChangeAlways := chGeometry; |
| 345 |
AddField(FFdCcw); |
| 346 |
|
| 347 |
FFdColorPerVertex := TSFBool.Create(Self, False, 'colorPerVertex', true); |
| 348 |
FdColorPerVertex.ChangeAlways := chGeometry; |
| 349 |
AddField(FFdColorPerVertex); |
| 350 |
|
| 351 |
FFdCreaseAngle := TSFFloat.Create(Self, False, 'creaseAngle', 0); |
| 352 |
FdCreaseAngle.ChangeAlways := chGeometry; |
| 353 |
FdCreaseAngle.Angle := true; |
| 354 |
FdCreaseAngle.MustBeNonnegative := true; |
| 355 |
AddField(FFdCreaseAngle); |
| 356 |
|
| 357 |
FFdHeight := TMFFloat.Create(Self, False, 'height', []); |
| 358 |
FdHeight.ChangeAlways := chGeometry; |
| 359 |
AddField(FFdHeight); |
| 360 |
|
| 361 |
FFdNormalPerVertex := TSFBool.Create(Self, False, 'normalPerVertex', true); |
| 362 |
FdNormalPerVertex.ChangeAlways := chGeometry; |
| 363 |
AddField(FFdNormalPerVertex); |
| 364 |
|
| 365 |
FFdSolid := TSFBool.Create(Self, False, 'solid', true); |
| 366 |
FdSolid.ChangeAlways := chGeometry; |
| 367 |
AddField(FFdSolid); |
| 368 |
|
| 369 |
FFdXDimension := TSFInt32.Create(Self, False, 'xDimension', 0); |
| 370 |
FdXDimension.ChangeAlways := chGeometry; |
| 371 |
FdXDimension.MustBeNonnegative := true; |
| 372 |
AddField(FFdXDimension); |
| 373 |
|
| 374 |
FFdXSpacing := TSFFloat.Create(Self, False, 'xSpacing', 1.0); |
| 375 |
FdXSpacing.ChangeAlways := chGeometry; |
| 376 |
FdXSpacing.MustBeNonnegative := true; |
| 377 |
AddField(FFdXSpacing); |
| 378 |
|
| 379 |
FFdZDimension := TSFInt32.Create(Self, False, 'zDimension', 0); |
| 380 |
FdZDimension.ChangeAlways := chGeometry; |
| 381 |
FdZDimension.MustBeNonnegative := true; |
| 382 |
AddField(FFdZDimension); |
| 383 |
|
| 384 |
FFdZSpacing := TSFFloat.Create(Self, False, 'zSpacing', 1.0); |
| 385 |
FdZSpacing.ChangeAlways := chGeometry; |
| 386 |
FdZSpacing.MustBeNonnegative := true; |
| 387 |
AddField(FFdZSpacing); |
| 388 |
end; |
| 389 |
|
| 390 |
{$endif read_implementation} |