{ -*- 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} 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} {$endif read_interface} {$ifdef read_implementation} { TPointSetNode ----------------------------------------------- } {$ifndef CASTLE_SLIM_NODES} procedure TPointSetNode.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 TPointSetNode.GetColor: TAbstractColorNode; begin if FdColor.Value is TAbstractColorNode then Result := TAbstractColorNode(FdColor.Value) else Result := nil; end; procedure TPointSetNode.SetColor(const Value: TAbstractColorNode); begin FdColor.Send(Value); end; function TPointSetNode.GetCoord: TAbstractCoordinateNode; begin if FdCoord.Value is TAbstractCoordinateNode then Result := TAbstractCoordinateNode(FdCoord.Value) else Result := nil; end; procedure TPointSetNode.SetCoord(const Value: TAbstractCoordinateNode); begin FdCoord.Send(Value); end; {$ifndef CASTLE_SLIM_NODES} function TPointSetNode.GetFogCoord: TFogCoordinateNode; begin if FdFogCoord.Value is TFogCoordinateNode then Result := TFogCoordinateNode(FdFogCoord.Value) else Result := nil; end; procedure TPointSetNode.SetFogCoord(const Value: TFogCoordinateNode); begin FdFogCoord.Send(Value); end; {$endif not CASTLE_SLIM_NODES} class function TPointSetNode.ClassX3DType: String; begin Result := 'PointSet'; end; procedure TPointSetNode.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} end; {$endif read_implementation}