Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_viewpoint.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 GetFieldOfView: Single;
28 procedure SetFieldOfView(const Value: Single);
29 function GetFieldOfViewForceVertical: Boolean;
30 procedure SetFieldOfViewForceVertical(const Value: Boolean);
31 public
32 { Create node fields and events. }
33 procedure CreateNode; override;
34 class function ClassX3DType: String; override;
35
36 strict private FFdFieldOfView: TSFFloat;
37 { Internal wrapper for property @code(FieldOfView). This wrapper API may change, we advise to access simpler @code(FieldOfView) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
38 public property FdFieldOfView: TSFFloat read FFdFieldOfView;
39 { }
40 property FieldOfView: Single read GetFieldOfView write SetFieldOfView;
41
42 strict private FFdPosition: TSFVec3f;
43 { Internal wrapper for property @code(Position). This wrapper API may change, we advise to access simpler @code(Position) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
44 public property FdPosition: TSFVec3f read FFdPosition;
45
46 strict private FFdFieldOfViewForceVertical: TSFBool;
47 { Internal wrapper for property @code(FieldOfViewForceVertical). This wrapper API may change, we advise to access simpler @code(FieldOfViewForceVertical) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
48 public property FdFieldOfViewForceVertical: TSFBool read FFdFieldOfViewForceVertical;
49 { }
50 property FieldOfViewForceVertical: Boolean read GetFieldOfViewForceVertical write SetFieldOfViewForceVertical;
51
52 {$endif read_interface}
53
54 {$ifdef read_implementation}
55
56 { TViewpointNode ----------------------------------------------- }
57
58 function TViewpointNode.GetFieldOfView: Single;
59 begin
60 Result := FdFieldOfView.Value;
61 end;
62
63 procedure TViewpointNode.SetFieldOfView(const Value: Single);
64 begin
65 FdFieldOfView.Send(Value);
66 end;
67
68 function TViewpointNode.GetFieldOfViewForceVertical: Boolean;
69 begin
70 Result := FdFieldOfViewForceVertical.Value;
71 end;
72
73 procedure TViewpointNode.SetFieldOfViewForceVertical(const Value: Boolean);
74 begin
75 FdFieldOfViewForceVertical.Send(Value);
76 end;
77
78 class function TViewpointNode.ClassX3DType: String;
79 begin
80 Result := 'Viewpoint';
81 end;
82
83 procedure TViewpointNode.CreateNode;
84 begin
85 inherited;
86
87 FFdFieldOfView := TSFFloat.Create(Self, True, 'fieldOfView', Pi/4);
88 FdFieldOfView.ChangeAlways := chViewpointProjection;
89 AddField(FFdFieldOfView);
90
91 FFdPosition := TSFVec3f.Create(Self, True, 'position', Vector3(0, 0, 10));
92 FdPosition.ChangeAlways := chViewpointVectors;
93 AddField(FFdPosition);
94
95 FFdFieldOfViewForceVertical := TSFBool.Create(Self, True, 'fieldOfViewForceVertical', false);
96 FdFieldOfViewForceVertical.ChangeAlways := chViewpointProjection;
97 AddField(FFdFieldOfViewForceVertical);
98 end;
99
100 {$endif read_implementation}