Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_disk2d.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 GetInnerRadius: Single;
28 procedure SetInnerRadius(const Value: Single);
29 function GetOuterRadius: Single;
30 procedure SetOuterRadius(const Value: Single);
31 function GetSlices: Integer;
32 procedure SetSlices(const Value: Integer);
33 public
34 { Create node fields and events. }
35 procedure CreateNode; override;
36 class function ClassX3DType: String; override;
37
38 strict private FFdInnerRadius: TSFFloat;
39 { Internal wrapper for property @code(InnerRadius). This wrapper API may change, we advise to access simpler @code(InnerRadius) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
40 public property FdInnerRadius: TSFFloat read FFdInnerRadius;
41 { }
42 property InnerRadius: Single read GetInnerRadius write SetInnerRadius;
43
44 strict private FFdOuterRadius: TSFFloat;
45 { Internal wrapper for property @code(OuterRadius). This wrapper API may change, we advise to access simpler @code(OuterRadius) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
46 public property FdOuterRadius: TSFFloat read FFdOuterRadius;
47 { }
48 property OuterRadius: Single read GetOuterRadius write SetOuterRadius;
49
50 strict private FFdSolid: TSFBool;
51 { 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). }
52 public property FdSolid: TSFBool read FFdSolid;
53
54 strict private FFdSlices: TSFInt32;
55 { 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). }
56 public property FdSlices: TSFInt32 read FFdSlices;
57 { How much to subdivide the circles (both inner and outer circles of the disk). Larger values result in a shape that looks smoother, but also mean that we need to render more triangles. The default value, 0 means to use the global @link(DefaultTriangulationSlices) parameter. }
58 property Slices: Integer read GetSlices write SetSlices;
59
60 {$endif read_interface}
61
62 {$ifdef read_implementation}
63
64 { TDisk2DNode ----------------------------------------------- }
65
66 function TDisk2DNode.GetInnerRadius: Single;
67 begin
68 Result := FdInnerRadius.Value;
69 end;
70
71 procedure TDisk2DNode.SetInnerRadius(const Value: Single);
72 begin
73 FdInnerRadius.Send(Value);
74 end;
75
76 function TDisk2DNode.GetOuterRadius: Single;
77 begin
78 Result := FdOuterRadius.Value;
79 end;
80
81 procedure TDisk2DNode.SetOuterRadius(const Value: Single);
82 begin
83 FdOuterRadius.Send(Value);
84 end;
85
86 function TDisk2DNode.GetSlices: Integer;
87 begin
88 Result := FdSlices.Value;
89 end;
90
91 procedure TDisk2DNode.SetSlices(const Value: Integer);
92 begin
93 FdSlices.Send(Value);
94 end;
95
96 class function TDisk2DNode.ClassX3DType: String;
97 begin
98 Result := 'Disk2D';
99 end;
100
101 procedure TDisk2DNode.CreateNode;
102 begin
103 inherited;
104
105 FFdInnerRadius := TSFFloat.Create(Self, False, 'innerRadius', 0);
106 FdInnerRadius.ChangeAlways := chGeometry;
107 FdInnerRadius.MustBeNonnegative := true;
108 AddField(FFdInnerRadius);
109
110 FFdOuterRadius := TSFFloat.Create(Self, False, 'outerRadius', 1);
111 FdOuterRadius.ChangeAlways := chGeometry;
112 FdOuterRadius.MustBeNonnegative := true;
113 AddField(FFdOuterRadius);
114
115 FFdSolid := TSFBool.Create(Self, False, 'solid', false);
116 FdSolid.ChangeAlways := chGeometry;
117 AddField(FFdSolid);
118
119 FFdSlices := TSFInt32.Create(Self, True, 'slices', 0);
120 FdSlices.ChangeAlways := chGeometry;
121 AddField(FFdSlices);
122 end;
123
124 {$endif read_implementation}