Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_contour2d.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 public
27 { Create node fields and events. }
28 procedure CreateNode; override;
29 class function ClassX3DType: String; override;
30
31 strict private FEventAddChildren: TMFNodeEvent;
32 { }
33 public property EventAddChildren: TMFNodeEvent read FEventAddChildren;
34
35 strict private FEventRemoveChildren: TMFNodeEvent;
36 { }
37 public property EventRemoveChildren: TMFNodeEvent read FEventRemoveChildren;
38
39 strict private FFdChildren: TMFNode;
40 { Internal wrapper for property @code(Children). This wrapper API may change, we advise to access simpler @code(Children) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
41 public property FdChildren: TMFNode read FFdChildren;
42 { }
43 procedure SetChildren(const Value: array of TX3DNode);
44
45 {$endif read_interface}
46
47 {$ifdef read_implementation}
48
49 { TContour2DNode ----------------------------------------------- }
50
51 procedure TContour2DNode.SetChildren(const Value: array of TX3DNode);
52 var
53 L: Integer;
54 A: array of TX3DNode;
55 begin
56 L := High(Value) + 1;
57 SetLength(A, L);
58 if L > 0 then
59 Move(Value[0], A[0], L * SizeOf(TX3DNode));
60 FdChildren.Send(A);
61 end;
62
63 class function TContour2DNode.ClassX3DType: String;
64 begin
65 Result := 'Contour2D';
66 end;
67
68 procedure TContour2DNode.CreateNode;
69 begin
70 inherited;
71
72 FEventAddChildren := TMFNodeEvent.Create(Self, 'addChildren', true);
73 AddEvent(FEventAddChildren);
74
75 FEventRemoveChildren := TMFNodeEvent.Create(Self, 'removeChildren', true);
76 AddEvent(FEventRemoveChildren);
77
78 FFdChildren := TMFNode.Create(Self, True, 'children', [TNurbsCurve2DNode, TContourPolyline2DNode]);
79 FdChildren.ChangeAlways := chEverything;
80 AddField(FFdChildren);
81
82 DefaultContainerField := 'trimmingContour';
83 end;
84
85 {$endif read_implementation}