Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_cylinder_1.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 GetRadius: Single;
28 procedure SetRadius(const Value: Single);
29 function GetHeight: Single;
30 procedure SetHeight(const Value: Single);
31 public
32 { Create node fields and events. }
33 procedure CreateNode; override;
34 class function ClassX3DType: String; override;
35 class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override;
36
37 strict private FFdParts: TSFBitMask;
38 { Internal wrapper for property @code(Parts). This wrapper API may change, we advise to access simpler @code(Parts) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
39 public property FdParts: TSFBitMask read FFdParts;
40
41 strict private FFdRadius: TSFFloat;
42 { 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). }
43 public property FdRadius: TSFFloat read FFdRadius;
44 { }
45 property Radius: Single read GetRadius write SetRadius;
46
47 strict private FFdHeight: TSFFloat;
48 { 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). }
49 public property FdHeight: TSFFloat read FFdHeight;
50 { }
51 property Height: Single read GetHeight write SetHeight;
52
53 {$endif read_interface}
54
55 {$ifdef read_implementation}
56
57 { TCylinderNode_1 ----------------------------------------------- }
58
59 function TCylinderNode_1.GetRadius: Single;
60 begin
61 Result := FdRadius.Value;
62 end;
63
64 procedure TCylinderNode_1.SetRadius(const Value: Single);
65 begin
66 FdRadius.Send(Value);
67 end;
68
69 function TCylinderNode_1.GetHeight: Single;
70 begin
71 Result := FdHeight.Value;
72 end;
73
74 procedure TCylinderNode_1.SetHeight(const Value: Single);
75 begin
76 FdHeight.Send(Value);
77 end;
78
79 class function TCylinderNode_1.ForVRMLVersion(const Version: TX3DVersion): Boolean;
80 begin
81 Result := Version.Major <= 1; // parse this node only in VRML 1.0 and Inventor files
82 end;
83
84 class function TCylinderNode_1.ClassX3DType: String;
85 begin
86 Result := 'Cylinder';
87 end;
88
89 procedure TCylinderNode_1.CreateNode;
90 begin
91 inherited;
92
93 FFdParts := TSFBitMask.Create(Self, True, 'parts', ['SIDES', 'TOP', 'BOTTOM'], 'NONE', 'ALL', [true, true, true]);
94 FdParts.ChangeAlways := chGeometry;
95 AddField(FFdParts);
96
97 FFdRadius := TSFFloat.Create(Self, True, 'radius', 1);
98 FdRadius.ChangeAlways := chGeometry;
99 FdRadius.MustBeNonnegative := true;
100 AddField(FFdRadius);
101
102 FFdHeight := TSFFloat.Create(Self, True, 'height', 2);
103 FdHeight.ChangeAlways := chGeometry;
104 FdHeight.MustBeNonnegative := true;
105 AddField(FFdHeight);
106 end;
107
108 {$endif read_implementation}