Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_box.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 GetSize: TVector3;
28 procedure SetSize(const Value: TVector3);
29 function GetCcw: Boolean;
30 procedure SetCcw(const Value: Boolean);
31 function GetTexCoord: TX3DNode;
32 procedure SetTexCoord(const Value: TX3DNode);
33 public
34 { Create node fields and events. }
35 procedure CreateNode; override;
36 class function ClassX3DType: String; override;
37
38 strict private FFdSize: TSFVec3f;
39 { Internal wrapper for property @code(Size). This wrapper API may change, we advise to access simpler @code(Size) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
40 public property FdSize: TSFVec3f read FFdSize;
41 { }
42 property Size: TVector3 read GetSize write SetSize;
43
44 strict private FFdSolid: TSFBool;
45 { 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). }
46 public property FdSolid: TSFBool read FFdSolid;
47
48 strict private FFdCcw: TSFBool;
49 { Internal wrapper for property @code(Ccw). This wrapper API may change, we advise to access simpler @code(Ccw) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
50 public property FdCcw: TSFBool read FFdCcw;
51 { }
52 property Ccw: Boolean read GetCcw write SetCcw;
53
54 strict private FFdTexCoord: TSFNode;
55 { 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). }
56 public property FdTexCoord: TSFNode read FFdTexCoord;
57 { }
58 property TexCoord: TX3DNode read GetTexCoord write SetTexCoord;
59
60 {$endif read_interface}
61
62 {$ifdef read_implementation}
63
64 { TBoxNode ----------------------------------------------- }
65
66 function TBoxNode.GetSize: TVector3;
67 begin
68 Result := FdSize.Value;
69 end;
70
71 procedure TBoxNode.SetSize(const Value: TVector3);
72 begin
73 FdSize.Send(Value);
74 end;
75
76 function TBoxNode.GetCcw: Boolean;
77 begin
78 Result := FdCcw.Value;
79 end;
80
81 procedure TBoxNode.SetCcw(const Value: Boolean);
82 begin
83 FdCcw.Send(Value);
84 end;
85
86 function TBoxNode.GetTexCoord: TX3DNode;
87 begin
88 if FdTexCoord.Value is TX3DNode then
89 Result := TX3DNode(FdTexCoord.Value)
90 else
91 Result := nil;
92 end;
93
94 procedure TBoxNode.SetTexCoord(const Value: TX3DNode);
95 begin
96 FdTexCoord.Send(Value);
97 end;
98
99 class function TBoxNode.ClassX3DType: String;
100 begin
101 Result := 'Box';
102 end;
103
104 procedure TBoxNode.CreateNode;
105 begin
106 inherited;
107
108 FFdSize := TSFVec3f.Create(Self, False, 'size', Vector3(2, 2, 2));
109 FdSize.ChangeAlways := chGeometry;
110 AddField(FFdSize);
111
112 FFdSolid := TSFBool.Create(Self, False, 'solid', true);
113 FdSolid.ChangeAlways := chGeometry;
114 AddField(FFdSolid);
115
116 FFdCcw := TSFBool.Create(Self, False, 'ccw', true);
117 FdCcw.ChangeAlways := chGeometry;
118 AddField(FFdCcw);
119
120 FFdTexCoord := TSFNode.Create(Self, True, 'texCoord', [TTextureCoordinateGeneratorNode, TProjectedTextureCoordinateNode, TMultiGeneratedTextureCoordinateNode]);
121 FdTexCoord.ChangeAlways := chGeometry;
122 FdTexCoord.OnBeforeValueChange := {$ifdef FPC}@{$endif}MoveShapeAssociations;
123 AddField(FFdTexCoord);
124 end;
125
126 {$endif read_implementation}