| 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 GetBottom: Boolean; |
| 28 |
procedure SetBottom(const Value: Boolean); |
| 29 |
function GetBottomRadius: Single; |
| 30 |
procedure SetBottomRadius(const Value: Single); |
| 31 |
function GetHeight: Single; |
| 32 |
procedure SetHeight(const Value: Single); |
| 33 |
function GetSide: Boolean; |
| 34 |
procedure SetSide(const Value: Boolean); |
| 35 |
function GetTexCoord: TX3DNode; |
| 36 |
procedure SetTexCoord(const Value: TX3DNode); |
| 37 |
function GetSlices: Integer; |
| 38 |
procedure SetSlices(const Value: Integer); |
| 39 |
function GetStacks: Integer; |
| 40 |
procedure SetStacks(const Value: Integer); |
| 41 |
public |
| 42 |
{ Create node fields and events. } |
| 43 |
procedure CreateNode; override; |
| 44 |
class function ClassX3DType: String; override; |
| 45 |
|
| 46 |
strict private FFdBottom: TSFBool; |
| 47 |
{ Internal wrapper for property @code(Bottom). This wrapper API may change, we advise to access simpler @code(Bottom) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 48 |
public property FdBottom: TSFBool read FFdBottom; |
| 49 |
{ } |
| 50 |
property Bottom: Boolean read GetBottom write SetBottom; |
| 51 |
|
| 52 |
strict private FFdBottomRadius: TSFFloat; |
| 53 |
{ Internal wrapper for property @code(BottomRadius). This wrapper API may change, we advise to access simpler @code(BottomRadius) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 54 |
public property FdBottomRadius: TSFFloat read FFdBottomRadius; |
| 55 |
{ } |
| 56 |
property BottomRadius: Single read GetBottomRadius write SetBottomRadius; |
| 57 |
|
| 58 |
strict private FFdHeight: TSFFloat; |
| 59 |
{ 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). } |
| 60 |
public property FdHeight: TSFFloat read FFdHeight; |
| 61 |
{ } |
| 62 |
property Height: Single read GetHeight write SetHeight; |
| 63 |
|
| 64 |
strict private FFdSide: TSFBool; |
| 65 |
{ Internal wrapper for property @code(Side). This wrapper API may change, we advise to access simpler @code(Side) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 66 |
public property FdSide: TSFBool read FFdSide; |
| 67 |
{ } |
| 68 |
property Side: Boolean read GetSide write SetSide; |
| 69 |
|
| 70 |
strict private FFdSolid: TSFBool; |
| 71 |
{ 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). } |
| 72 |
public property FdSolid: TSFBool read FFdSolid; |
| 73 |
|
| 74 |
strict private FFdTexCoord: TSFNode; |
| 75 |
{ 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). } |
| 76 |
public property FdTexCoord: TSFNode read FFdTexCoord; |
| 77 |
{ } |
| 78 |
property TexCoord: TX3DNode read GetTexCoord write SetTexCoord; |
| 79 |
|
| 80 |
strict private FFdSlices: TSFInt32; |
| 81 |
{ Internal wrapper for property @code(Slices). This wrapper API may change, we advise to access simpler @code(Slices) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 82 |
public property FdSlices: TSFInt32 read FFdSlices; |
| 83 |
{ How many "slices" to use to approximate the cone. The cone is rendered using polygons (triangles and quads) that approximate the cone shape. The more slices, the more the cone will look like a cone. Slices divide the objects like slices of a pizza. The default value of 0 means to follow global variable @link(DefaultTriangulationSlices). } |
| 84 |
property Slices: Integer read GetSlices write SetSlices; |
| 85 |
|
| 86 |
strict private FFdStacks: TSFInt32; |
| 87 |
{ Internal wrapper for property @code(Stacks). This wrapper API may change, we advise to access simpler @code(Stacks) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 88 |
public property FdStacks: TSFInt32 read FFdStacks; |
| 89 |
{ How many "stacks" to use to approximate the cone. The cone is rendered using polygons (triangles and quads) that approximate the cone shape. The more stacks, the more the cone will look like a cone. Stacks divide the objects like stacks of a tower. The default value of 0 means to follow global variable @link(DefaultTriangulationStacks). } |
| 90 |
property Stacks: Integer read GetStacks write SetStacks; |
| 91 |
|
| 92 |
{$endif read_interface} |
| 93 |
|
| 94 |
{$ifdef read_implementation} |
| 95 |
|
| 96 |
{ TConeNode ----------------------------------------------- } |
| 97 |
|
| 98 |
function TConeNode.GetBottom: Boolean; |
| 99 |
begin |
| 100 |
Result := FdBottom.Value; |
| 101 |
end; |
| 102 |
|
| 103 |
procedure TConeNode.SetBottom(const Value: Boolean); |
| 104 |
begin |
| 105 |
FdBottom.Send(Value); |
| 106 |
end; |
| 107 |
|
| 108 |
function TConeNode.GetBottomRadius: Single; |
| 109 |
begin |
| 110 |
Result := FdBottomRadius.Value; |
| 111 |
end; |
| 112 |
|
| 113 |
procedure TConeNode.SetBottomRadius(const Value: Single); |
| 114 |
begin |
| 115 |
FdBottomRadius.Send(Value); |
| 116 |
end; |
| 117 |
|
| 118 |
function TConeNode.GetHeight: Single; |
| 119 |
begin |
| 120 |
Result := FdHeight.Value; |
| 121 |
end; |
| 122 |
|
| 123 |
procedure TConeNode.SetHeight(const Value: Single); |
| 124 |
begin |
| 125 |
FdHeight.Send(Value); |
| 126 |
end; |
| 127 |
|
| 128 |
function TConeNode.GetSide: Boolean; |
| 129 |
begin |
| 130 |
Result := FdSide.Value; |
| 131 |
end; |
| 132 |
|
| 133 |
procedure TConeNode.SetSide(const Value: Boolean); |
| 134 |
begin |
| 135 |
FdSide.Send(Value); |
| 136 |
end; |
| 137 |
|
| 138 |
function TConeNode.GetTexCoord: TX3DNode; |
| 139 |
begin |
| 140 |
if FdTexCoord.Value is TX3DNode then |
| 141 |
Result := TX3DNode(FdTexCoord.Value) |
| 142 |
else |
| 143 |
Result := nil; |
| 144 |
end; |
| 145 |
|
| 146 |
procedure TConeNode.SetTexCoord(const Value: TX3DNode); |
| 147 |
begin |
| 148 |
FdTexCoord.Send(Value); |
| 149 |
end; |
| 150 |
|
| 151 |
function TConeNode.GetSlices: Integer; |
| 152 |
begin |
| 153 |
Result := FdSlices.Value; |
| 154 |
end; |
| 155 |
|
| 156 |
procedure TConeNode.SetSlices(const Value: Integer); |
| 157 |
begin |
| 158 |
FdSlices.Send(Value); |
| 159 |
end; |
| 160 |
|
| 161 |
function TConeNode.GetStacks: Integer; |
| 162 |
begin |
| 163 |
Result := FdStacks.Value; |
| 164 |
end; |
| 165 |
|
| 166 |
procedure TConeNode.SetStacks(const Value: Integer); |
| 167 |
begin |
| 168 |
FdStacks.Send(Value); |
| 169 |
end; |
| 170 |
|
| 171 |
class function TConeNode.ClassX3DType: String; |
| 172 |
begin |
| 173 |
Result := 'Cone'; |
| 174 |
end; |
| 175 |
|
| 176 |
procedure TConeNode.CreateNode; |
| 177 |
begin |
| 178 |
inherited; |
| 179 |
|
| 180 |
FFdBottom := TSFBool.Create(Self, False, 'bottom', true); |
| 181 |
FdBottom.ChangeAlways := chGeometry; |
| 182 |
AddField(FFdBottom); |
| 183 |
|
| 184 |
FFdBottomRadius := TSFFloat.Create(Self, False, 'bottomRadius', 1); |
| 185 |
FdBottomRadius.ChangeAlways := chGeometry; |
| 186 |
FdBottomRadius.MustBeNonnegative := true; |
| 187 |
AddField(FFdBottomRadius); |
| 188 |
|
| 189 |
FFdHeight := TSFFloat.Create(Self, False, 'height', 2); |
| 190 |
FdHeight.ChangeAlways := chGeometry; |
| 191 |
FdHeight.MustBeNonnegative := true; |
| 192 |
AddField(FFdHeight); |
| 193 |
|
| 194 |
FFdSide := TSFBool.Create(Self, False, 'side', true); |
| 195 |
FdSide.ChangeAlways := chGeometry; |
| 196 |
AddField(FFdSide); |
| 197 |
|
| 198 |
FFdSolid := TSFBool.Create(Self, False, 'solid', true); |
| 199 |
FdSolid.ChangeAlways := chGeometry; |
| 200 |
AddField(FFdSolid); |
| 201 |
|
| 202 |
FFdTexCoord := TSFNode.Create(Self, True, 'texCoord', [TTextureCoordinateGeneratorNode, TProjectedTextureCoordinateNode, TMultiGeneratedTextureCoordinateNode]); |
| 203 |
FdTexCoord.ChangeAlways := chGeometry; |
| 204 |
FdTexCoord.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations; |
| 205 |
AddField(FFdTexCoord); |
| 206 |
|
| 207 |
FFdSlices := TSFInt32.Create(Self, True, 'slices', 0); |
| 208 |
FdSlices.ChangeAlways := chGeometry; |
| 209 |
AddField(FFdSlices); |
| 210 |
|
| 211 |
FFdStacks := TSFInt32.Create(Self, True, 'stacks', 0); |
| 212 |
FdStacks.ChangeAlways := chGeometry; |
| 213 |
AddField(FFdStacks); |
| 214 |
end; |
| 215 |
|
| 216 |
{$endif read_implementation} |