| 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 GetCoord: TAbstractCoordinateNode; |
| 30 |
procedure SetCoord(const Value: TAbstractCoordinateNode); |
| 31 |
{$ifndef CASTLE_SLIM_NODES} |
| 32 |
function GetFogCoord: TFogCoordinateNode; |
| 33 |
procedure SetFogCoord(const Value: TFogCoordinateNode); |
| 34 |
{$endif not CASTLE_SLIM_NODES} |
| 35 |
function GetColorPerVertex: Boolean; |
| 36 |
procedure SetColorPerVertex(const Value: Boolean); |
| 37 |
function GetMode: TLineMode; |
| 38 |
procedure SetMode(const Value: TLineMode); |
| 39 |
public |
| 40 |
{ Create node fields and events. } |
| 41 |
procedure CreateNode; override; |
| 42 |
class function ClassX3DType: String; override; |
| 43 |
|
| 44 |
strict private FEventSet_colorIndex: TMFInt32Event; |
| 45 |
{ } |
| 46 |
public property EventSet_colorIndex: TMFInt32Event read FEventSet_colorIndex; |
| 47 |
|
| 48 |
strict private FEventSet_coordIndex: TMFInt32Event; |
| 49 |
{ } |
| 50 |
public property EventSet_coordIndex: TMFInt32Event read FEventSet_coordIndex; |
| 51 |
|
| 52 |
{$ifndef CASTLE_SLIM_NODES} |
| 53 |
strict private FFdAttrib: TMFNode; |
| 54 |
{ 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). } |
| 55 |
public property FdAttrib: TMFNode read FFdAttrib; |
| 56 |
{$endif not CASTLE_SLIM_NODES} |
| 57 |
{$ifndef CASTLE_SLIM_NODES} |
| 58 |
{ } |
| 59 |
procedure SetAttrib(const Value: array of TAbstractVertexAttributeNode); |
| 60 |
{$endif not CASTLE_SLIM_NODES} |
| 61 |
|
| 62 |
strict private FFdColor: TSFNode; |
| 63 |
{ 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). } |
| 64 |
public property FdColor: TSFNode read FFdColor; |
| 65 |
{ } |
| 66 |
property Color: TAbstractColorNode read GetColor write SetColor; |
| 67 |
|
| 68 |
strict private FFdCoord: TSFNode; |
| 69 |
{ Internal wrapper for property @code(Coord). This wrapper API may change, we advise to access simpler @code(Coord) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 70 |
public property FdCoord: TSFNode read FFdCoord; |
| 71 |
{ } |
| 72 |
property Coord: TAbstractCoordinateNode read GetCoord write SetCoord; |
| 73 |
|
| 74 |
{$ifndef CASTLE_SLIM_NODES} |
| 75 |
strict private FFdFogCoord: TSFNode; |
| 76 |
{ 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). } |
| 77 |
public property FdFogCoord: TSFNode read FFdFogCoord; |
| 78 |
{$endif not CASTLE_SLIM_NODES} |
| 79 |
{$ifndef CASTLE_SLIM_NODES} |
| 80 |
{ } |
| 81 |
property FogCoord: TFogCoordinateNode read GetFogCoord write SetFogCoord; |
| 82 |
{$endif not CASTLE_SLIM_NODES} |
| 83 |
|
| 84 |
strict private FFdColorIndex: TMFInt32; |
| 85 |
{ Internal wrapper for property @code(ColorIndex). This wrapper API may change, we advise to access simpler @code(ColorIndex) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 86 |
public property FdColorIndex: TMFInt32 read FFdColorIndex; |
| 87 |
{ } |
| 88 |
procedure SetColorIndex(const Value: array of Int32); overload; |
| 89 |
{ } |
| 90 |
procedure SetColorIndex(const Value: TInt32List); overload; |
| 91 |
|
| 92 |
strict private FFdColorPerVertex: TSFBool; |
| 93 |
{ 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). } |
| 94 |
public property FdColorPerVertex: TSFBool read FFdColorPerVertex; |
| 95 |
{ } |
| 96 |
property ColorPerVertex: Boolean read GetColorPerVertex write SetColorPerVertex; |
| 97 |
|
| 98 |
strict private FFdCoordIndex: TMFInt32; |
| 99 |
{ Internal wrapper for property @code(CoordIndex). This wrapper API may change, we advise to access simpler @code(CoordIndex) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 100 |
public property FdCoordIndex: TMFInt32 read FFdCoordIndex; |
| 101 |
{ } |
| 102 |
procedure SetCoordIndex(const Value: array of Int32); overload; |
| 103 |
{ } |
| 104 |
procedure SetCoordIndex(const Value: TInt32List); overload; |
| 105 |
|
| 106 |
strict private FFdMode: TSFStringEnum; |
| 107 |
{ Internal wrapper for property @code(Mode). This wrapper API may change, we advise to access simpler @code(Mode) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } |
| 108 |
public property FdMode: TSFStringEnum read FFdMode; |
| 109 |
{ How to interpret the vertexes: as a set of strips (connected line segments), loops (connected line segments with additional segment to form a loop), or just pairs of vertexes (each pair defines a line segment). See possible @link(TLineMode) values for details. } |
| 110 |
property Mode: TLineMode read GetMode write SetMode; |
| 111 |
|
| 112 |
{$endif read_interface} |
| 113 |
|
| 114 |
{$ifdef read_implementation} |
| 115 |
|
| 116 |
{ TIndexedLineSetNode ----------------------------------------------- } |
| 117 |
|
| 118 |
{$ifndef CASTLE_SLIM_NODES} |
| 119 |
procedure TIndexedLineSetNode.SetAttrib(const Value: array of TAbstractVertexAttributeNode); |
| 120 |
var |
| 121 |
L: Integer; |
| 122 |
A: array of TX3DNode; |
| 123 |
begin |
| 124 |
L := High(Value) + 1; |
| 125 |
SetLength(A, L); |
| 126 |
if L > 0 then |
| 127 |
Move(Value[0], A[0], L * SizeOf(TAbstractVertexAttributeNode)); |
| 128 |
FdAttrib.Send(A); |
| 129 |
end; |
| 130 |
|
| 131 |
{$endif not CASTLE_SLIM_NODES} |
| 132 |
function TIndexedLineSetNode.GetColor: TAbstractColorNode; |
| 133 |
begin |
| 134 |
if FdColor.Value is TAbstractColorNode then |
| 135 |
Result := TAbstractColorNode(FdColor.Value) |
| 136 |
else |
| 137 |
Result := nil; |
| 138 |
end; |
| 139 |
|
| 140 |
procedure TIndexedLineSetNode.SetColor(const Value: TAbstractColorNode); |
| 141 |
begin |
| 142 |
FdColor.Send(Value); |
| 143 |
end; |
| 144 |
|
| 145 |
function TIndexedLineSetNode.GetCoord: TAbstractCoordinateNode; |
| 146 |
begin |
| 147 |
if FdCoord.Value is TAbstractCoordinateNode then |
| 148 |
Result := TAbstractCoordinateNode(FdCoord.Value) |
| 149 |
else |
| 150 |
Result := nil; |
| 151 |
end; |
| 152 |
|
| 153 |
procedure TIndexedLineSetNode.SetCoord(const Value: TAbstractCoordinateNode); |
| 154 |
begin |
| 155 |
FdCoord.Send(Value); |
| 156 |
end; |
| 157 |
|
| 158 |
{$ifndef CASTLE_SLIM_NODES} |
| 159 |
function TIndexedLineSetNode.GetFogCoord: TFogCoordinateNode; |
| 160 |
begin |
| 161 |
if FdFogCoord.Value is TFogCoordinateNode then |
| 162 |
Result := TFogCoordinateNode(FdFogCoord.Value) |
| 163 |
else |
| 164 |
Result := nil; |
| 165 |
end; |
| 166 |
|
| 167 |
procedure TIndexedLineSetNode.SetFogCoord(const Value: TFogCoordinateNode); |
| 168 |
begin |
| 169 |
FdFogCoord.Send(Value); |
| 170 |
end; |
| 171 |
|
| 172 |
{$endif not CASTLE_SLIM_NODES} |
| 173 |
procedure TIndexedLineSetNode.SetColorIndex(const Value: array of Int32); |
| 174 |
begin |
| 175 |
FdColorIndex.Send(Value); |
| 176 |
end; |
| 177 |
|
| 178 |
procedure TIndexedLineSetNode.SetColorIndex(const Value: TInt32List); |
| 179 |
begin |
| 180 |
FdColorIndex.Send(Value); |
| 181 |
end; |
| 182 |
|
| 183 |
function TIndexedLineSetNode.GetColorPerVertex: Boolean; |
| 184 |
begin |
| 185 |
Result := FdColorPerVertex.Value; |
| 186 |
end; |
| 187 |
|
| 188 |
procedure TIndexedLineSetNode.SetColorPerVertex(const Value: Boolean); |
| 189 |
begin |
| 190 |
FdColorPerVertex.Send(Value); |
| 191 |
end; |
| 192 |
|
| 193 |
procedure TIndexedLineSetNode.SetCoordIndex(const Value: array of Int32); |
| 194 |
begin |
| 195 |
FdCoordIndex.Send(Value); |
| 196 |
end; |
| 197 |
|
| 198 |
procedure TIndexedLineSetNode.SetCoordIndex(const Value: TInt32List); |
| 199 |
begin |
| 200 |
FdCoordIndex.Send(Value); |
| 201 |
end; |
| 202 |
|
| 203 |
function TIndexedLineSetNode.GetMode: TLineMode; |
| 204 |
begin |
| 205 |
Result := TLineMode(FdMode.EnumValue); |
| 206 |
end; |
| 207 |
|
| 208 |
procedure TIndexedLineSetNode.SetMode(const Value: TLineMode); |
| 209 |
begin |
| 210 |
FdMode.SendEnumValue(Ord(Value)); |
| 211 |
end; |
| 212 |
|
| 213 |
class function TIndexedLineSetNode.ClassX3DType: String; |
| 214 |
begin |
| 215 |
Result := 'IndexedLineSet'; |
| 216 |
end; |
| 217 |
|
| 218 |
procedure TIndexedLineSetNode.CreateNode; |
| 219 |
begin |
| 220 |
inherited; |
| 221 |
|
| 222 |
FEventSet_colorIndex := TMFInt32Event.Create(Self, 'set_colorIndex', true); |
| 223 |
AddEvent(FEventSet_colorIndex); |
| 224 |
|
| 225 |
FEventSet_coordIndex := TMFInt32Event.Create(Self, 'set_coordIndex', true); |
| 226 |
AddEvent(FEventSet_coordIndex); |
| 227 |
|
| 228 |
{$ifndef CASTLE_SLIM_NODES} |
| 229 |
FFdAttrib := TMFNode.Create(Self, True, 'attrib', [TAbstractVertexAttributeNode]); |
| 230 |
FdAttrib.ChangeAlways := chGeometry; |
| 231 |
AddField(FFdAttrib); |
| 232 |
{$endif not CASTLE_SLIM_NODES} |
| 233 |
|
| 234 |
FFdColor := TSFNode.Create(Self, True, 'color', [TAbstractColorNode]); |
| 235 |
FdColor.ChangeAlways := chGeometry; |
| 236 |
FdColor.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations; |
| 237 |
AddField(FFdColor); |
| 238 |
|
| 239 |
FFdCoord := TSFNode.Create(Self, True, 'coord', [TAbstractCoordinateNode]); |
| 240 |
FdCoord.ChangeAlways := chGeometry; |
| 241 |
FdCoord.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations; |
| 242 |
AddField(FFdCoord); |
| 243 |
|
| 244 |
{$ifndef CASTLE_SLIM_NODES} |
| 245 |
FFdFogCoord := TSFNode.Create(Self, True, 'fogCoord', [TFogCoordinateNode]); |
| 246 |
FdFogCoord.ChangeAlways := chGeometry; |
| 247 |
AddField(FFdFogCoord); |
| 248 |
{$endif not CASTLE_SLIM_NODES} |
| 249 |
|
| 250 |
FFdColorIndex := TMFInt32.Create(Self, False, 'colorIndex', []); |
| 251 |
FdColorIndex.ChangeAlways := chGeometry; |
| 252 |
AddField(FFdColorIndex); |
| 253 |
|
| 254 |
FFdColorPerVertex := TSFBool.Create(Self, False, 'colorPerVertex', true); |
| 255 |
FdColorPerVertex.ChangeAlways := chGeometry; |
| 256 |
AddField(FFdColorPerVertex); |
| 257 |
|
| 258 |
FFdCoordIndex := TMFInt32.Create(Self, False, 'coordIndex', []); |
| 259 |
FdCoordIndex.ChangeAlways := chGeometry; |
| 260 |
AddField(FFdCoordIndex); |
| 261 |
|
| 262 |
FFdMode := TSFStringEnum.Create(Self, False, 'mode', @LineModeNames, Ord(High(LineModeNames)) + 1, Ord(lmStrip)); |
| 263 |
FdMode.ChangeAlways := chGeometry; |
| 264 |
AddField(FFdMode); |
| 265 |
end; |
| 266 |
|
| 267 |
{$endif read_implementation} |