Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_pointset.inc

raw
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 public
36 { Create node fields and events. }
37 procedure CreateNode; override;
38 class function ClassX3DType: String; override;
39
40 {$ifndef CASTLE_SLIM_NODES}
41 strict private FFdAttrib: TMFNode;
42 { 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). }
43 public property FdAttrib: TMFNode read FFdAttrib;
44 {$endif not CASTLE_SLIM_NODES}
45 {$ifndef CASTLE_SLIM_NODES}
46 { }
47 procedure SetAttrib(const Value: array of TAbstractVertexAttributeNode);
48 {$endif not CASTLE_SLIM_NODES}
49
50 strict private FFdColor: TSFNode;
51 { 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). }
52 public property FdColor: TSFNode read FFdColor;
53 { }
54 property Color: TAbstractColorNode read GetColor write SetColor;
55
56 strict private FFdCoord: TSFNode;
57 { 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). }
58 public property FdCoord: TSFNode read FFdCoord;
59 { }
60 property Coord: TAbstractCoordinateNode read GetCoord write SetCoord;
61
62 {$ifndef CASTLE_SLIM_NODES}
63 strict private FFdFogCoord: TSFNode;
64 { 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). }
65 public property FdFogCoord: TSFNode read FFdFogCoord;
66 {$endif not CASTLE_SLIM_NODES}
67 {$ifndef CASTLE_SLIM_NODES}
68 { }
69 property FogCoord: TFogCoordinateNode read GetFogCoord write SetFogCoord;
70 {$endif not CASTLE_SLIM_NODES}
71
72 {$endif read_interface}
73
74 {$ifdef read_implementation}
75
76 { TPointSetNode ----------------------------------------------- }
77
78 {$ifndef CASTLE_SLIM_NODES}
79 procedure TPointSetNode.SetAttrib(const Value: array of TAbstractVertexAttributeNode);
80 var
81 L: Integer;
82 A: array of TX3DNode;
83 begin
84 L := High(Value) + 1;
85 SetLength(A, L);
86 if L > 0 then
87 Move(Value[0], A[0], L * SizeOf(TAbstractVertexAttributeNode));
88 FdAttrib.Send(A);
89 end;
90
91 {$endif not CASTLE_SLIM_NODES}
92 function TPointSetNode.GetColor: TAbstractColorNode;
93 begin
94 if FdColor.Value is TAbstractColorNode then
95 Result := TAbstractColorNode(FdColor.Value)
96 else
97 Result := nil;
98 end;
99
100 procedure TPointSetNode.SetColor(const Value: TAbstractColorNode);
101 begin
102 FdColor.Send(Value);
103 end;
104
105 function TPointSetNode.GetCoord: TAbstractCoordinateNode;
106 begin
107 if FdCoord.Value is TAbstractCoordinateNode then
108 Result := TAbstractCoordinateNode(FdCoord.Value)
109 else
110 Result := nil;
111 end;
112
113 procedure TPointSetNode.SetCoord(const Value: TAbstractCoordinateNode);
114 begin
115 FdCoord.Send(Value);
116 end;
117
118 {$ifndef CASTLE_SLIM_NODES}
119 function TPointSetNode.GetFogCoord: TFogCoordinateNode;
120 begin
121 if FdFogCoord.Value is TFogCoordinateNode then
122 Result := TFogCoordinateNode(FdFogCoord.Value)
123 else
124 Result := nil;
125 end;
126
127 procedure TPointSetNode.SetFogCoord(const Value: TFogCoordinateNode);
128 begin
129 FdFogCoord.Send(Value);
130 end;
131
132 {$endif not CASTLE_SLIM_NODES}
133 class function TPointSetNode.ClassX3DType: String;
134 begin
135 Result := 'PointSet';
136 end;
137
138 procedure TPointSetNode.CreateNode;
139 begin
140 inherited;
141
142 {$ifndef CASTLE_SLIM_NODES}
143 FFdAttrib := TMFNode.Create(Self, True, 'attrib', [TAbstractVertexAttributeNode]);
144 FdAttrib.ChangeAlways := chGeometry;
145 AddField(FFdAttrib);
146 {$endif not CASTLE_SLIM_NODES}
147
148 FFdColor := TSFNode.Create(Self, True, 'color', [TAbstractColorNode]);
149 FdColor.ChangeAlways := chGeometry;
150 FdColor.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations;
151 AddField(FFdColor);
152
153 FFdCoord := TSFNode.Create(Self, True, 'coord', [TAbstractCoordinateNode]);
154 FdCoord.ChangeAlways := chGeometry;
155 FdCoord.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations;
156 AddField(FFdCoord);
157
158 {$ifndef CASTLE_SLIM_NODES}
159 FFdFogCoord := TSFNode.Create(Self, True, 'fogCoord', [TFogCoordinateNode]);
160 FdFogCoord.ChangeAlways := chGeometry;
161 AddField(FFdFogCoord);
162 {$endif not CASTLE_SLIM_NODES}
163 end;
164
165 {$endif read_implementation}