Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_orientationinterpolator.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 GetKeyValueQuaternions: Boolean;
28 procedure SetKeyValueQuaternions(const Value: Boolean);
29 public
30 { Create node fields and events. }
31 procedure CreateNode; override;
32 class function ClassX3DType: String; override;
33
34 strict private FFdKeyValue: TMFRotation;
35 { Internal wrapper for property @code(KeyValue). This wrapper API may change, we advise to access simpler @code(KeyValue) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
36 public property FdKeyValue: TMFRotation read FFdKeyValue;
37 { }
38 procedure SetKeyValue(const Value: array of TVector4); overload;
39 { }
40 procedure SetKeyValue(const Value: TVector4List); overload;
41
42 strict private FEventValue_changed: TSFRotationEvent;
43 { }
44 public property EventValue_changed: TSFRotationEvent read FEventValue_changed;
45
46 strict private FFdKeyValueQuaternions: TSFBool;
47 { Internal wrapper for property @code(KeyValueQuaternions). This wrapper API may change, we advise to access simpler @code(KeyValueQuaternions) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdKeyValueQuaternions: TSFBool read FFdKeyValueQuaternions;
49 { When @true, key values are provided as unit quaternions. By default (when @false) they have to be axis angle rotations. This allows extra optimization in case your input data is in quaternions, which is true in case of glTF. It is then most efficient to just put quternions in TOrientationInterpolatorNode.FdKeyValue and set this to @true. Otherwise, you would 1. needlessly convert quaternion -> axisangle when reading glTF file, 2. needlessly convert axisangle -> quaternion as a first step of SLerp. }
50 property KeyValueQuaternions: Boolean read GetKeyValueQuaternions write SetKeyValueQuaternions;
51
52 {$endif read_interface}
53
54 {$ifdef read_implementation}
55
56 { TOrientationInterpolatorNode ----------------------------------------------- }
57
58 procedure TOrientationInterpolatorNode.SetKeyValue(const Value: array of TVector4);
59 begin
60 FdKeyValue.Send(Value);
61 end;
62
63 procedure TOrientationInterpolatorNode.SetKeyValue(const Value: TVector4List);
64 begin
65 FdKeyValue.Send(Value);
66 end;
67
68 function TOrientationInterpolatorNode.GetKeyValueQuaternions: Boolean;
69 begin
70 Result := FdKeyValueQuaternions.Value;
71 end;
72
73 procedure TOrientationInterpolatorNode.SetKeyValueQuaternions(const Value: Boolean);
74 begin
75 FdKeyValueQuaternions.Send(Value);
76 end;
77
78 class function TOrientationInterpolatorNode.ClassX3DType: String;
79 begin
80 Result := 'OrientationInterpolator';
81 end;
82
83 procedure TOrientationInterpolatorNode.CreateNode;
84 begin
85 inherited;
86
87 FFdKeyValue := TMFRotation.Create(Self, True, 'keyValue', []);
88 FdKeyValue.ChangeAlways := chNone;
89 AddField(FFdKeyValue);
90
91 FEventValue_changed := TSFRotationEvent.Create(Self, 'value_changed', false);
92 AddEvent(FEventValue_changed);
93
94 FFdKeyValueQuaternions := TSFBool.Create(Self, True, 'keyValueQuaternions', false);
95 FdKeyValueQuaternions.ChangeAlways := chNone;
96 AddField(FFdKeyValueQuaternions);
97 end;
98
99 {$endif read_implementation}