{ -*- buffer-read-only: t -*- Copyright 2015-2024 Michalis Kamburelis. This file is part of "Castle Game Engine". "Castle Game Engine" is free software; see the file COPYING.txt, included in this distribution, for details about the copyright. "Castle Game Engine" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ---------------------------------------------------------------------------- } { Automatically generated node properties. Do not edit this file manually! To add new properties: - add them to the text files in tools/internal/x3d-nodes-to-pascal/nodes-specification/ , - and regenerate include files by running x3d-nodes-to-pascal } {$ifdef read_interface} strict private function GetColor: TAbstractColorNode; procedure SetColor(const Value: TAbstractColorNode); function GetCoord: TAbstractCoordinateNode; procedure SetCoord(const Value: TAbstractCoordinateNode); {$ifndef CASTLE_SLIM_NODES} function GetFogCoord: TFogCoordinateNode; procedure SetFogCoord(const Value: TFogCoordinateNode); {$endif not CASTLE_SLIM_NODES} function GetMode: TLineMode; procedure SetMode(const Value: TLineMode); public { Create node fields and events. } procedure CreateNode; override; class function ClassX3DType: String; override; {$ifndef CASTLE_SLIM_NODES} strict private FFdAttrib: TMFNode; { 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). } public property FdAttrib: TMFNode read FFdAttrib; {$endif not CASTLE_SLIM_NODES} {$ifndef CASTLE_SLIM_NODES} { } procedure SetAttrib(const Value: array of TAbstractVertexAttributeNode); {$endif not CASTLE_SLIM_NODES} strict private FFdColor: TSFNode; { 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). } public property FdColor: TSFNode read FFdColor; { } property Color: TAbstractColorNode read GetColor write SetColor; strict private FFdCoord: TSFNode; { 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). } public property FdCoord: TSFNode read FFdCoord; { } property Coord: TAbstractCoordinateNode read GetCoord write SetCoord; {$ifndef CASTLE_SLIM_NODES} strict private FFdFogCoord: TSFNode; { 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). } public property FdFogCoord: TSFNode read FFdFogCoord; {$endif not CASTLE_SLIM_NODES} {$ifndef CASTLE_SLIM_NODES} { } property FogCoord: TFogCoordinateNode read GetFogCoord write SetFogCoord; {$endif not CASTLE_SLIM_NODES} strict private FFdVertexCount: TMFInt32; { Internal wrapper for property @code(VertexCount). This wrapper API may change, we advise to access simpler @code(VertexCount) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). } public property FdVertexCount: TMFInt32 read FFdVertexCount; { Array of counts that split the line vertexes. Exact interpretation depends on the @link(Mode) value: @definitionList( @itemLabel lmStrip @item(Render a number of line strips. Each count on this array is the count of vertexes in a line strip. Each line strip is a polyline, i.e. a sequence of lines from the first vertex (in given line strip) to the last vertex (again, in given line strip).) @itemLabel lmLoop @item(Render a number of line loops. Each count on this array is the number of vertexes in a line loop. Each line loop is a closed polyline, i.e. a sequence of lines from the first vertex (in given line loop) to the last vertex (again, in given line loop). Moreover, within each line loop, there's a closing line from last vertex to the first.) @itemLabel lmPair @item(Render a number of line segments. Counts of this array are ignored, so there's not much point in calling SetVertexCount. In this mode, every 2 vertexes define a line segment.) ) } procedure SetVertexCount(const Value: array of Int32); overload; { Array of counts that split the line vertexes. Exact interpretation depends on the @link(Mode) value: @definitionList( @itemLabel lmStrip @item(Render a number of line strips. Each count on this array is the count of vertexes in a line strip. Each line strip is a polyline, i.e. a sequence of lines from the first vertex (in given line strip) to the last vertex (again, in given line strip).) @itemLabel lmLoop @item(Render a number of line loops. Each count on this array is the number of vertexes in a line loop. Each line loop is a closed polyline, i.e. a sequence of lines from the first vertex (in given line loop) to the last vertex (again, in given line loop). Moreover, within each line loop, there's a closing line from last vertex to the first.) @itemLabel lmPair @item(Render a number of line segments. Counts of this array are ignored, so there's not much point in calling SetVertexCount. In this mode, every 2 vertexes define a line segment.) ) } procedure SetVertexCount(const Value: TInt32List); overload; strict private FFdMode: TSFStringEnum; { 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). } public property FdMode: TSFStringEnum read FFdMode; { 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. } property Mode: TLineMode read GetMode write SetMode; {$endif read_interface} {$ifdef read_implementation} { TLineSetNode ----------------------------------------------- } {$ifndef CASTLE_SLIM_NODES} procedure TLineSetNode.SetAttrib(const Value: array of TAbstractVertexAttributeNode); var L: Integer; A: array of TX3DNode; begin L := High(Value) + 1; SetLength(A, L); if L > 0 then Move(Value[0], A[0], L * SizeOf(TAbstractVertexAttributeNode)); FdAttrib.Send(A); end; {$endif not CASTLE_SLIM_NODES} function TLineSetNode.GetColor: TAbstractColorNode; begin if FdColor.Value is TAbstractColorNode then Result := TAbstractColorNode(FdColor.Value) else Result := nil; end; procedure TLineSetNode.SetColor(const Value: TAbstractColorNode); begin FdColor.Send(Value); end; function TLineSetNode.GetCoord: TAbstractCoordinateNode; begin if FdCoord.Value is TAbstractCoordinateNode then Result := TAbstractCoordinateNode(FdCoord.Value) else Result := nil; end; procedure TLineSetNode.SetCoord(const Value: TAbstractCoordinateNode); begin FdCoord.Send(Value); end; {$ifndef CASTLE_SLIM_NODES} function TLineSetNode.GetFogCoord: TFogCoordinateNode; begin if FdFogCoord.Value is TFogCoordinateNode then Result := TFogCoordinateNode(FdFogCoord.Value) else Result := nil; end; procedure TLineSetNode.SetFogCoord(const Value: TFogCoordinateNode); begin FdFogCoord.Send(Value); end; {$endif not CASTLE_SLIM_NODES} procedure TLineSetNode.SetVertexCount(const Value: array of Int32); begin FdVertexCount.Send(Value); end; procedure TLineSetNode.SetVertexCount(const Value: TInt32List); begin FdVertexCount.Send(Value); end; function TLineSetNode.GetMode: TLineMode; begin Result := TLineMode(FdMode.EnumValue); end; procedure TLineSetNode.SetMode(const Value: TLineMode); begin FdMode.SendEnumValue(Ord(Value)); end; class function TLineSetNode.ClassX3DType: String; begin Result := 'LineSet'; end; procedure TLineSetNode.CreateNode; begin inherited; {$ifndef CASTLE_SLIM_NODES} FFdAttrib := TMFNode.Create(Self, True, 'attrib', [TAbstractVertexAttributeNode]); FdAttrib.ChangeAlways := chGeometry; AddField(FFdAttrib); {$endif not CASTLE_SLIM_NODES} FFdColor := TSFNode.Create(Self, True, 'color', [TAbstractColorNode]); FdColor.ChangeAlways := chGeometry; FdColor.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations; AddField(FFdColor); FFdCoord := TSFNode.Create(Self, True, 'coord', [TAbstractCoordinateNode]); FdCoord.ChangeAlways := chGeometry; FdCoord.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations; AddField(FFdCoord); {$ifndef CASTLE_SLIM_NODES} FFdFogCoord := TSFNode.Create(Self, True, 'fogCoord', [TFogCoordinateNode]); FdFogCoord.ChangeAlways := chGeometry; AddField(FFdFogCoord); {$endif not CASTLE_SLIM_NODES} FFdVertexCount := TMFInt32.Create(Self, True, 'vertexCount', []); FdVertexCount.ChangeAlways := chGeometry; AddField(FFdVertexCount); FFdMode := TSFStringEnum.Create(Self, False, 'mode', @LineModeNames, Ord(High(LineModeNames)) + 1, Ord(lmStrip)); FdMode.ChangeAlways := chGeometry; AddField(FFdMode); end; {$endif read_implementation}