Debian Codegraph @

src/scene/x3d/auto_generated_node_helpers/x3dnodes_abstractvrml1camera_1.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 GetPosition: TVector3;
28 procedure SetPosition(const Value: TVector3);
29 function GetFocalDistance: Single;
30 procedure SetFocalDistance(const Value: Single);
31 function GetNearDistance: Single;
32 procedure SetNearDistance(const Value: Single);
33 function GetFarDistance: Single;
34 procedure SetFarDistance(const Value: Single);
35 public
36 { Create node fields and events. }
37 procedure CreateNode; override;
38 class function ClassX3DType: String; override;
39 class function ForVRMLVersion(const Version: TX3DVersion): Boolean; override;
40
41 strict private FFdPosition: TSFVec3f;
42 { 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). }
43 public property FdPosition: TSFVec3f read FFdPosition;
44 { }
45 property Position: TVector3 read GetPosition write SetPosition;
46
47 strict private FFdFocalDistance: TSFFloat;
48 { Internal wrapper for property @code(FocalDistance). This wrapper API may change, we advise to access simpler @code(FocalDistance) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
49 public property FdFocalDistance: TSFFloat read FFdFocalDistance;
50 { }
51 property FocalDistance: Single read GetFocalDistance write SetFocalDistance;
52
53 strict private FFdNearDistance: TSFFloat;
54 { Internal wrapper for property @code(NearDistance). This wrapper API may change, we advise to access simpler @code(NearDistance) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
55 public property FdNearDistance: TSFFloat read FFdNearDistance;
56 { Ignored. Unknown extension to VRML 1.0 spec, found on models in http://www-vrl.umich.edu/sel_prj/EECS498/ . }
57 property NearDistance: Single read GetNearDistance write SetNearDistance;
58
59 strict private FFdFarDistance: TSFFloat;
60 { Internal wrapper for property @code(FarDistance). This wrapper API may change, we advise to access simpler @code(FarDistance) instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart). }
61 public property FdFarDistance: TSFFloat read FFdFarDistance;
62 { Ignored. Unknown extension to VRML 1.0 spec, found on models in http://www-vrl.umich.edu/sel_prj/EECS498/ . }
63 property FarDistance: Single read GetFarDistance write SetFarDistance;
64
65 {$endif read_interface}
66
67 {$ifdef read_implementation}
68
69 { TAbstractCameraNode_1 ----------------------------------------------- }
70
71 function TAbstractCameraNode_1.GetPosition: TVector3;
72 begin
73 Result := FdPosition.Value;
74 end;
75
76 procedure TAbstractCameraNode_1.SetPosition(const Value: TVector3);
77 begin
78 FdPosition.Send(Value);
79 end;
80
81 function TAbstractCameraNode_1.GetFocalDistance: Single;
82 begin
83 Result := FdFocalDistance.Value;
84 end;
85
86 procedure TAbstractCameraNode_1.SetFocalDistance(const Value: Single);
87 begin
88 FdFocalDistance.Send(Value);
89 end;
90
91 function TAbstractCameraNode_1.GetNearDistance: Single;
92 begin
93 Result := FdNearDistance.Value;
94 end;
95
96 procedure TAbstractCameraNode_1.SetNearDistance(const Value: Single);
97 begin
98 FdNearDistance.Send(Value);
99 end;
100
101 function TAbstractCameraNode_1.GetFarDistance: Single;
102 begin
103 Result := FdFarDistance.Value;
104 end;
105
106 procedure TAbstractCameraNode_1.SetFarDistance(const Value: Single);
107 begin
108 FdFarDistance.Send(Value);
109 end;
110
111 class function TAbstractCameraNode_1.ForVRMLVersion(const Version: TX3DVersion): Boolean;
112 begin
113 Result := Version.Major <= 1; // parse this node only in VRML 1.0 and Inventor files
114 end;
115
116 class function TAbstractCameraNode_1.ClassX3DType: String;
117 begin
118 Result := 'AbstractVrml1Camera';
119 end;
120
121 procedure TAbstractCameraNode_1.CreateNode;
122 begin
123 inherited;
124
125 FFdPosition := TSFVec3f.Create(Self, True, 'position', Vector3(0, 0, 1));
126 FdPosition.ChangeAlways := chViewpointVectors;
127 AddField(FFdPosition);
128
129 FFdFocalDistance := TSFFloat.Create(Self, True, 'focalDistance', 5);
130 FdFocalDistance.ChangeAlways := chVisibleNonGeometry;
131 FdFocalDistance.MustBeNonnegative := true;
132 AddField(FFdFocalDistance);
133
134 FFdNearDistance := TSFFloat.Create(Self, True, 'nearDistance', 0);
135 FdNearDistance.ChangeAlways := chViewpointVectors;
136 AddField(FFdNearDistance);
137
138 FFdFarDistance := TSFFloat.Create(Self, True, 'farDistance', 0);
139 FdFarDistance.ChangeAlways := chViewpointVectors;
140 AddField(FFdFarDistance);
141 end;
142
143 {$endif read_implementation}