Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_x3dinterpolatornode.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 GetInterpolation: TInterpolation;
28 procedure SetInterpolation(const Value: TInterpolation);
29 public
30 { Create node fields and events. }
31 procedure CreateNode; override;
32 class function ClassX3DType: String; override;
33
34 strict private FEventSet_fraction: TSFFloatEvent;
35 { }
36 public property EventSet_fraction: TSFFloatEvent read FEventSet_fraction;
37
38 strict private FFdKey: TMFFloat;
39 { Internal wrapper for property @code(Key). This wrapper API may change, we advise to access simpler @code(Key) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
40 public property FdKey: TMFFloat read FFdKey;
41 { }
42 procedure SetKey(const Value: array of Single); overload;
43 { }
44 procedure SetKey(const Value: TSingleList); overload;
45
46 strict private FFdInterpolation: TSFStringEnum;
47 { Internal wrapper for property @code(Interpolation). This wrapper API may change, we advise to access simpler @code(Interpolation) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdInterpolation: TSFStringEnum read FFdInterpolation;
49 { }
50 property Interpolation: TInterpolation read GetInterpolation write SetInterpolation;
51
52 {$endif read_interface}
53
54 {$ifdef read_implementation}
55
56 { TAbstractInterpolatorNode ----------------------------------------------- }
57
58 procedure TAbstractInterpolatorNode.SetKey(const Value: array of Single);
59 begin
60 FdKey.Send(Value);
61 end;
62
63 procedure TAbstractInterpolatorNode.SetKey(const Value: TSingleList);
64 begin
65 FdKey.Send(Value);
66 end;
67
68 function TAbstractInterpolatorNode.GetInterpolation: TInterpolation;
69 begin
70 Result := TInterpolation(FdInterpolation.EnumValue);
71 end;
72
73 procedure TAbstractInterpolatorNode.SetInterpolation(const Value: TInterpolation);
74 begin
75 FdInterpolation.SendEnumValue(Ord(Value));
76 end;
77
78 class function TAbstractInterpolatorNode.ClassX3DType: String;
79 begin
80 Result := 'X3DInterpolatorNode';
81 end;
82
83 procedure TAbstractInterpolatorNode.CreateNode;
84 begin
85 inherited;
86
87 FEventSet_fraction := TSFFloatEvent.Create(Self, 'set_fraction', true);
88 AddEvent(FEventSet_fraction);
89
90 FFdKey := TMFFloat.Create(Self, True, 'key', []);
91 FdKey.ChangeAlways := chNone;
92 AddField(FFdKey);
93
94 FFdInterpolation := TSFStringEnum.Create(Self, True, 'interpolation', @InterpolationNames, Ord(High(InterpolationNames)) + 1, Ord(inLinear));
95 FdInterpolation.ChangeAlways := chNone;
96 AddField(FFdInterpolation);
97 end;
98
99 {$endif read_implementation}