| 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 GetControlPoint: TAbstractCoordinateNode; |
| 28 |
procedure SetControlPoint(const Value: TAbstractCoordinateNode); |
| 29 |
function GetTessellation: Integer; |
| 30 |
procedure SetTessellation(const Value: Integer); |
| 31 |
function GetClosed: Boolean; |
| 32 |
procedure SetClosed(const Value: Boolean); |
| 33 |
function GetOrder: Integer; |
| 34 |
procedure SetOrder(const Value: Integer); |
| 35 |
public |
| 36 |
{ Create node fields and events. } |
| 37 |
procedure CreateNode; override; |
| 38 |
class function ClassX3DType: String; override; |
| 39 |
|
| 40 |
strict private FFdControlPoint: TSFNode; |
| 41 |
{ Internal wrapper for property @code(ControlPoint). This wrapper API may change, we advise to access simpler @code(ControlPoint) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 42 |
public property FdControlPoint: TSFNode read FFdControlPoint; |
| 43 |
{ } |
| 44 |
property ControlPoint: TAbstractCoordinateNode read GetControlPoint write SetControlPoint; |
| 45 |
|
| 46 |
strict private FFdTessellation: TSFInt32; |
| 47 |
{ Internal wrapper for property @code(Tessellation). This wrapper API may change, we advise to access simpler @code(Tessellation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 48 |
public property FdTessellation: TSFInt32 read FFdTessellation; |
| 49 |
{ } |
| 50 |
property Tessellation: Integer read GetTessellation write SetTessellation; |
| 51 |
|
| 52 |
strict private FFdWeight: TMFDouble; |
| 53 |
{ Internal wrapper for property @code(Weight). This wrapper API may change, we advise to access simpler @code(Weight) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 54 |
public property FdWeight: TMFDouble read FFdWeight; |
| 55 |
{ } |
| 56 |
procedure SetWeight(const Value: array of Double); overload; |
| 57 |
{ } |
| 58 |
procedure SetWeight(const Value: TDoubleList); overload; |
| 59 |
|
| 60 |
strict private FFdClosed: TSFBool; |
| 61 |
{ Internal wrapper for property @code(Closed). This wrapper API may change, we advise to access simpler @code(Closed) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 62 |
public property FdClosed: TSFBool read FFdClosed; |
| 63 |
{ } |
| 64 |
property Closed: Boolean read GetClosed write SetClosed; |
| 65 |
|
| 66 |
strict private FFdKnot: TMFDouble; |
| 67 |
{ Internal wrapper for property @code(Knot). This wrapper API may change, we advise to access simpler @code(Knot) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 68 |
public property FdKnot: TMFDouble read FFdKnot; |
| 69 |
{ } |
| 70 |
procedure SetKnot(const Value: array of Double); overload; |
| 71 |
{ } |
| 72 |
procedure SetKnot(const Value: TDoubleList); overload; |
| 73 |
|
| 74 |
strict private FFdOrder: TSFInt32; |
| 75 |
{ Internal wrapper for property @code(Order). This wrapper API may change, we advise to access simpler @code(Order) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 76 |
public property FdOrder: TSFInt32 read FFdOrder; |
| 77 |
{ } |
| 78 |
property Order: Integer read GetOrder write SetOrder; |
| 79 |
|
| 80 |
{$endif read_interface} |
| 81 |
|
| 82 |
{$ifdef read_implementation} |
| 83 |
|
| 84 |
{ TNurbsCurveNode ----------------------------------------------- } |
| 85 |
|
| 86 |
function TNurbsCurveNode.GetControlPoint: TAbstractCoordinateNode; |
| 87 |
begin |
| 88 |
if FdControlPoint.Value is TAbstractCoordinateNode then |
| 89 |
Result := TAbstractCoordinateNode(FdControlPoint.Value) |
| 90 |
else |
| 91 |
Result := nil; |
| 92 |
end; |
| 93 |
|
| 94 |
procedure TNurbsCurveNode.SetControlPoint(const Value: TAbstractCoordinateNode); |
| 95 |
begin |
| 96 |
FdControlPoint.Send(Value); |
| 97 |
end; |
| 98 |
|
| 99 |
function TNurbsCurveNode.GetTessellation: Integer; |
| 100 |
begin |
| 101 |
Result := FdTessellation.Value; |
| 102 |
end; |
| 103 |
|
| 104 |
procedure TNurbsCurveNode.SetTessellation(const Value: Integer); |
| 105 |
begin |
| 106 |
FdTessellation.Send(Value); |
| 107 |
end; |
| 108 |
|
| 109 |
procedure TNurbsCurveNode.SetWeight(const Value: array of Double); |
| 110 |
begin |
| 111 |
FdWeight.Send(Value); |
| 112 |
end; |
| 113 |
|
| 114 |
procedure TNurbsCurveNode.SetWeight(const Value: TDoubleList); |
| 115 |
begin |
| 116 |
FdWeight.Send(Value); |
| 117 |
end; |
| 118 |
|
| 119 |
function TNurbsCurveNode.GetClosed: Boolean; |
| 120 |
begin |
| 121 |
Result := FdClosed.Value; |
| 122 |
end; |
| 123 |
|
| 124 |
procedure TNurbsCurveNode.SetClosed(const Value: Boolean); |
| 125 |
begin |
| 126 |
FdClosed.Send(Value); |
| 127 |
end; |
| 128 |
|
| 129 |
procedure TNurbsCurveNode.SetKnot(const Value: array of Double); |
| 130 |
begin |
| 131 |
FdKnot.Send(Value); |
| 132 |
end; |
| 133 |
|
| 134 |
procedure TNurbsCurveNode.SetKnot(const Value: TDoubleList); |
| 135 |
begin |
| 136 |
FdKnot.Send(Value); |
| 137 |
end; |
| 138 |
|
| 139 |
function TNurbsCurveNode.GetOrder: Integer; |
| 140 |
begin |
| 141 |
Result := FdOrder.Value; |
| 142 |
end; |
| 143 |
|
| 144 |
procedure TNurbsCurveNode.SetOrder(const Value: Integer); |
| 145 |
begin |
| 146 |
FdOrder.Send(Value); |
| 147 |
end; |
| 148 |
|
| 149 |
class function TNurbsCurveNode.ClassX3DType: String; |
| 150 |
begin |
| 151 |
Result := 'NurbsCurve'; |
| 152 |
end; |
| 153 |
|
| 154 |
procedure TNurbsCurveNode.CreateNode; |
| 155 |
begin |
| 156 |
inherited; |
| 157 |
|
| 158 |
FFdControlPoint := TSFNode.Create(Self, True, 'controlPoint', [TAbstractCoordinateNode]); |
| 159 |
FdControlPoint.ChangeAlways := chGeometry; |
| 160 |
AddField(FFdControlPoint); |
| 161 |
|
| 162 |
FFdTessellation := TSFInt32.Create(Self, True, 'tessellation', 0); |
| 163 |
FdTessellation.ChangeAlways := chGeometry; |
| 164 |
AddField(FFdTessellation); |
| 165 |
|
| 166 |
FFdWeight := TMFDouble.Create(Self, True, 'weight', []); |
| 167 |
FdWeight.ChangeAlways := chGeometry; |
| 168 |
AddField(FFdWeight); |
| 169 |
|
| 170 |
FFdClosed := TSFBool.Create(Self, False, 'closed', false); |
| 171 |
FdClosed.ChangeAlways := chGeometry; |
| 172 |
AddField(FFdClosed); |
| 173 |
|
| 174 |
FFdKnot := TMFDouble.Create(Self, False, 'knot', []); |
| 175 |
FdKnot.ChangeAlways := chGeometry; |
| 176 |
AddField(FFdKnot); |
| 177 |
|
| 178 |
FFdOrder := TSFInt32.Create(Self, False, 'order', 3); |
| 179 |
FdOrder.ChangeAlways := chGeometry; |
| 180 |
AddField(FFdOrder); |
| 181 |
end; |
| 182 |
|
| 183 |
{$endif read_implementation} |