Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_cylinder.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 GetBottom: Boolean;
28 procedure SetBottom(const Value: Boolean);
29 function GetHeight: Single;
30 procedure SetHeight(const Value: Single);
31 function GetRadius: Single;
32 procedure SetRadius(const Value: Single);
33 function GetSide: Boolean;
34 procedure SetSide(const Value: Boolean);
35 function GetTop: Boolean;
36 procedure SetTop(const Value: Boolean);
37 function GetTexCoord: TX3DNode;
38 procedure SetTexCoord(const Value: TX3DNode);
39 function GetSlices: Integer;
40 procedure SetSlices(const Value: Integer);
41 public
42 { Create node fields and events. }
43 procedure CreateNode; override;
44 class function ClassX3DType: String; override;
45
46 strict private FFdBottom: TSFBool;
47 { Internal wrapper for property @code(Bottom). This wrapper API may change, we advise to access simpler @code(Bottom) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdBottom: TSFBool read FFdBottom;
49 { }
50 property Bottom: Boolean read GetBottom write SetBottom;
51
52 strict private FFdHeight: TSFFloat;
53 { Internal wrapper for property @code(Height). This wrapper API may change, we advise to access simpler @code(Height) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
54 public property FdHeight: TSFFloat read FFdHeight;
55 { }
56 property Height: Single read GetHeight write SetHeight;
57
58 strict private FFdRadius: TSFFloat;
59 { Internal wrapper for property @code(Radius). This wrapper API may change, we advise to access simpler @code(Radius) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
60 public property FdRadius: TSFFloat read FFdRadius;
61 { }
62 property Radius: Single read GetRadius write SetRadius;
63
64 strict private FFdSide: TSFBool;
65 { Internal wrapper for property @code(Side). This wrapper API may change, we advise to access simpler @code(Side) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
66 public property FdSide: TSFBool read FFdSide;
67 { }
68 property Side: Boolean read GetSide write SetSide;
69
70 strict private FFdSolid: TSFBool;
71 { Internal wrapper for property @code(Solid). This wrapper API may change, we advise to access simpler @code(Solid) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
72 public property FdSolid: TSFBool read FFdSolid;
73
74 strict private FFdTop: TSFBool;
75 { Internal wrapper for property @code(Top). This wrapper API may change, we advise to access simpler @code(Top) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
76 public property FdTop: TSFBool read FFdTop;
77 { }
78 property Top: Boolean read GetTop write SetTop;
79
80 strict private FFdTexCoord: TSFNode;
81 { Internal wrapper for property @code(TexCoord). This wrapper API may change, we advise to access simpler @code(TexCoord) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
82 public property FdTexCoord: TSFNode read FFdTexCoord;
83 { }
84 property TexCoord: TX3DNode read GetTexCoord write SetTexCoord;
85
86 strict private FFdSlices: TSFInt32;
87 { Internal wrapper for property @code(Slices). This wrapper API may change, we advise to access simpler @code(Slices) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
88 public property FdSlices: TSFInt32 read FFdSlices;
89 { How many "slices" to use to approximate the cylinder. The cylinder is rendered using polygons (triangles and quads) that approximate the cylinder shape. The more slices, the more the cylinder will look like a cylinder. Slices divide the objects like slices of a pizza. The default value of 0 means to follow global variable @link(DefaultTriangulationSlices). }
90 property Slices: Integer read GetSlices write SetSlices;
91
92 {$endif read_interface}
93
94 {$ifdef read_implementation}
95
96 { TCylinderNode ----------------------------------------------- }
97
98 function TCylinderNode.GetBottom: Boolean;
99 begin
100 Result := FdBottom.Value;
101 end;
102
103 procedure TCylinderNode.SetBottom(const Value: Boolean);
104 begin
105 FdBottom.Send(Value);
106 end;
107
108 function TCylinderNode.GetHeight: Single;
109 begin
110 Result := FdHeight.Value;
111 end;
112
113 procedure TCylinderNode.SetHeight(const Value: Single);
114 begin
115 FdHeight.Send(Value);
116 end;
117
118 function TCylinderNode.GetRadius: Single;
119 begin
120 Result := FdRadius.Value;
121 end;
122
123 procedure TCylinderNode.SetRadius(const Value: Single);
124 begin
125 FdRadius.Send(Value);
126 end;
127
128 function TCylinderNode.GetSide: Boolean;
129 begin
130 Result := FdSide.Value;
131 end;
132
133 procedure TCylinderNode.SetSide(const Value: Boolean);
134 begin
135 FdSide.Send(Value);
136 end;
137
138 function TCylinderNode.GetTop: Boolean;
139 begin
140 Result := FdTop.Value;
141 end;
142
143 procedure TCylinderNode.SetTop(const Value: Boolean);
144 begin
145 FdTop.Send(Value);
146 end;
147
148 function TCylinderNode.GetTexCoord: TX3DNode;
149 begin
150 if FdTexCoord.Value is TX3DNode then
151 Result := TX3DNode(FdTexCoord.Value)
152 else
153 Result := nil;
154 end;
155
156 procedure TCylinderNode.SetTexCoord(const Value: TX3DNode);
157 begin
158 FdTexCoord.Send(Value);
159 end;
160
161 function TCylinderNode.GetSlices: Integer;
162 begin
163 Result := FdSlices.Value;
164 end;
165
166 procedure TCylinderNode.SetSlices(const Value: Integer);
167 begin
168 FdSlices.Send(Value);
169 end;
170
171 class function TCylinderNode.ClassX3DType: String;
172 begin
173 Result := 'Cylinder';
174 end;
175
176 procedure TCylinderNode.CreateNode;
177 begin
178 inherited;
179
180 FFdBottom := TSFBool.Create(Self, False, 'bottom', true);
181 FdBottom.ChangeAlways := chGeometry;
182 AddField(FFdBottom);
183
184 FFdHeight := TSFFloat.Create(Self, False, 'height', 2);
185 FdHeight.ChangeAlways := chGeometry;
186 FdHeight.MustBeNonnegative := true;
187 AddField(FFdHeight);
188
189 FFdRadius := TSFFloat.Create(Self, False, 'radius', 1);
190 FdRadius.ChangeAlways := chGeometry;
191 FdRadius.MustBeNonnegative := true;
192 AddField(FFdRadius);
193
194 FFdSide := TSFBool.Create(Self, False, 'side', true);
195 FdSide.ChangeAlways := chGeometry;
196 AddField(FFdSide);
197
198 FFdSolid := TSFBool.Create(Self, False, 'solid', true);
199 FdSolid.ChangeAlways := chGeometry;
200 AddField(FFdSolid);
201
202 FFdTop := TSFBool.Create(Self, False, 'top', true);
203 FdTop.ChangeAlways := chGeometry;
204 AddField(FFdTop);
205
206 FFdTexCoord := TSFNode.Create(Self, True, 'texCoord', [TTextureCoordinateGeneratorNode, TProjectedTextureCoordinateNode, TMultiGeneratedTextureCoordinateNode]);
207 FdTexCoord.ChangeAlways := chGeometry;
208 FdTexCoord.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations;
209 AddField(FFdTexCoord);
210
211 FFdSlices := TSFInt32.Create(Self, True, 'slices', 0);
212 FdSlices.ChangeAlways := chGeometry;
213 AddField(FFdSlices);
214 end;
215
216 {$endif read_implementation}