| 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 GetBottomRadius: Single; |
| 28 |
procedure SetBottomRadius(const Value: Single); |
| 29 |
function GetHeight: Single; |
| 30 |
procedure SetHeight(const Value: Single); |
| 31 |
public |
| 32 |
{ Create node fields and events. } |
| 33 |
procedure CreateNode; override; |
| 34 |
class function ClassX3DType: String; override; |
| 35 |
class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override; |
| 36 |
|
| 37 |
strict private FFdParts: TSFBitMask; |
| 38 |
{ Internal wrapper for property @code(Parts). This wrapper API may change, we advise to access simpler @code(Parts) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 39 |
public property FdParts: TSFBitMask read FFdParts; |
| 40 |
|
| 41 |
strict private FFdBottomRadius: TSFFloat; |
| 42 |
{ 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). } |
| 43 |
public property FdBottomRadius: TSFFloat read FFdBottomRadius; |
| 44 |
{ } |
| 45 |
property BottomRadius: Single read GetBottomRadius write SetBottomRadius; |
| 46 |
|
| 47 |
strict private FFdHeight: TSFFloat; |
| 48 |
{ 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). } |
| 49 |
public property FdHeight: TSFFloat read FFdHeight; |
| 50 |
{ } |
| 51 |
property Height: Single read GetHeight write SetHeight; |
| 52 |
|
| 53 |
{$endif read_interface} |
| 54 |
|
| 55 |
{$ifdef read_implementation} |
| 56 |
|
| 57 |
{ TConeNode_1 ----------------------------------------------- } |
| 58 |
|
| 59 |
function TConeNode_1.GetBottomRadius: Single; |
| 60 |
begin |
| 61 |
Result := FdBottomRadius.Value; |
| 62 |
end; |
| 63 |
|
| 64 |
procedure TConeNode_1.SetBottomRadius(const Value: Single); |
| 65 |
begin |
| 66 |
FdBottomRadius.Send(Value); |
| 67 |
end; |
| 68 |
|
| 69 |
function TConeNode_1.GetHeight: Single; |
| 70 |
begin |
| 71 |
Result := FdHeight.Value; |
| 72 |
end; |
| 73 |
|
| 74 |
procedure TConeNode_1.SetHeight(const Value: Single); |
| 75 |
begin |
| 76 |
FdHeight.Send(Value); |
| 77 |
end; |
| 78 |
|
| 79 |
class function TConeNode_1.ForVRMLVersion(const Version: TX3DVersion): Boolean; |
| 80 |
begin |
| 81 |
Result := Version.Major <= 1; // parse this node only in VRML 1.0 and Inventor files |
| 82 |
end; |
| 83 |
|
| 84 |
class function TConeNode_1.ClassX3DType: String; |
| 85 |
begin |
| 86 |
Result := 'Cone'; |
| 87 |
end; |
| 88 |
|
| 89 |
procedure TConeNode_1.CreateNode; |
| 90 |
begin |
| 91 |
inherited; |
| 92 |
|
| 93 |
FFdParts := TSFBitMask.Create(Self, True, 'parts', ['SIDES', 'BOTTOM'], 'NONE', 'ALL', [true, true]); |
| 94 |
FdParts.ChangeAlways := chGeometry; |
| 95 |
AddField(FFdParts); |
| 96 |
|
| 97 |
FFdBottomRadius := TSFFloat.Create(Self, True, 'bottomRadius', 1); |
| 98 |
FdBottomRadius.ChangeAlways := chGeometry; |
| 99 |
FdBottomRadius.MustBeNonnegative := true; |
| 100 |
AddField(FFdBottomRadius); |
| 101 |
|
| 102 |
FFdHeight := TSFFloat.Create(Self, True, 'height', 2); |
| 103 |
FdHeight.ChangeAlways := chGeometry; |
| 104 |
FdHeight.MustBeNonnegative := true; |
| 105 |
AddField(FFdHeight); |
| 106 |
end; |
| 107 |
|
| 108 |
{$endif read_implementation} |