| 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 GetWidth: Single; |
| 28 |
procedure SetWidth(const Value: Single); |
| 29 |
function GetHeight: Single; |
| 30 |
procedure SetHeight(const Value: Single); |
| 31 |
function GetDepth: Single; |
| 32 |
procedure SetDepth(const Value: Single); |
| 33 |
public |
| 34 |
{ Create node fields and events. } |
| 35 |
procedure CreateNode; override; |
| 36 |
class function ClassX3DType: String; override; |
| 37 |
class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override; |
| 38 |
|
| 39 |
strict private FFdWidth: TSFFloat; |
| 40 |
{ Internal wrapper for property @code(Width). This wrapper API may change, we advise to access simpler @code(Width) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 41 |
public property FdWidth: TSFFloat read FFdWidth; |
| 42 |
{ } |
| 43 |
property Width: Single read GetWidth write SetWidth; |
| 44 |
|
| 45 |
strict private FFdHeight: TSFFloat; |
| 46 |
{ 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). } |
| 47 |
public property FdHeight: TSFFloat read FFdHeight; |
| 48 |
{ } |
| 49 |
property Height: Single read GetHeight write SetHeight; |
| 50 |
|
| 51 |
strict private FFdDepth: TSFFloat; |
| 52 |
{ Internal wrapper for property @code(Depth). This wrapper API may change, we advise to access simpler @code(Depth) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 53 |
public property FdDepth: TSFFloat read FFdDepth; |
| 54 |
{ } |
| 55 |
property Depth: Single read GetDepth write SetDepth; |
| 56 |
|
| 57 |
{$endif read_interface} |
| 58 |
|
| 59 |
{$ifdef read_implementation} |
| 60 |
|
| 61 |
{ TCubeNode_1 ----------------------------------------------- } |
| 62 |
|
| 63 |
function TCubeNode_1.GetWidth: Single; |
| 64 |
begin |
| 65 |
Result := FdWidth.Value; |
| 66 |
end; |
| 67 |
|
| 68 |
procedure TCubeNode_1.SetWidth(const Value: Single); |
| 69 |
begin |
| 70 |
FdWidth.Send(Value); |
| 71 |
end; |
| 72 |
|
| 73 |
function TCubeNode_1.GetHeight: Single; |
| 74 |
begin |
| 75 |
Result := FdHeight.Value; |
| 76 |
end; |
| 77 |
|
| 78 |
procedure TCubeNode_1.SetHeight(const Value: Single); |
| 79 |
begin |
| 80 |
FdHeight.Send(Value); |
| 81 |
end; |
| 82 |
|
| 83 |
function TCubeNode_1.GetDepth: Single; |
| 84 |
begin |
| 85 |
Result := FdDepth.Value; |
| 86 |
end; |
| 87 |
|
| 88 |
procedure TCubeNode_1.SetDepth(const Value: Single); |
| 89 |
begin |
| 90 |
FdDepth.Send(Value); |
| 91 |
end; |
| 92 |
|
| 93 |
class function TCubeNode_1.ForVRMLVersion(const Version: TX3DVersion): Boolean; |
| 94 |
begin |
| 95 |
Result := Version.Major <= 1; // parse this node only in VRML 1.0 and Inventor files |
| 96 |
end; |
| 97 |
|
| 98 |
class function TCubeNode_1.ClassX3DType: String; |
| 99 |
begin |
| 100 |
Result := 'Cube'; |
| 101 |
end; |
| 102 |
|
| 103 |
procedure TCubeNode_1.CreateNode; |
| 104 |
begin |
| 105 |
inherited; |
| 106 |
|
| 107 |
FFdWidth := TSFFloat.Create(Self, True, 'width', 2); |
| 108 |
FdWidth.ChangeAlways := chGeometry; |
| 109 |
FdWidth.MustBeNonnegative := true; |
| 110 |
AddField(FFdWidth); |
| 111 |
|
| 112 |
FFdHeight := TSFFloat.Create(Self, True, 'height', 2); |
| 113 |
FdHeight.ChangeAlways := chGeometry; |
| 114 |
FdHeight.MustBeNonnegative := true; |
| 115 |
AddField(FFdHeight); |
| 116 |
|
| 117 |
FFdDepth := TSFFloat.Create(Self, True, 'depth', 2); |
| 118 |
FdDepth.ChangeAlways := chGeometry; |
| 119 |
FdDepth.MustBeNonnegative := true; |
| 120 |
AddField(FFdDepth); |
| 121 |
end; |
| 122 |
|
| 123 |
{$endif read_implementation} |