summaryrefslogtreecommitdiff
path: root/doc/classes/Camera.xml
blob: 2302c39e35c4e6d9fb7268bc5b84136e4f291918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Camera" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
	<brief_description>
		Camera node, displays from a point of view.
	</brief_description>
	<description>
		Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
	</description>
	<tutorials>
	</tutorials>
	<demos>
	</demos>
	<methods>
		<method name="clear_current">
			<return type="void">
			</return>
			<description>
			</description>
		</method>
		<method name="get_camera_transform" qualifiers="const">
			<return type="Transform">
			</return>
			<description>
				Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform.
			</description>
		</method>
		<method name="get_cull_mask" qualifiers="const">
			<return type="int">
			</return>
			<description>
			</description>
		</method>
		<method name="get_doppler_tracking" qualifiers="const">
			<return type="int" enum="Camera.DopplerTracking">
			</return>
			<description>
			</description>
		</method>
		<method name="get_environment" qualifiers="const">
			<return type="Environment">
			</return>
			<description>
			</description>
		</method>
		<method name="get_fov" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_h_offset" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_keep_aspect_mode" qualifiers="const">
			<return type="int" enum="Camera.KeepAspect">
			</return>
			<description>
			</description>
		</method>
		<method name="get_projection" qualifiers="const">
			<return type="int" enum="Camera.Projection">
			</return>
			<description>
			</description>
		</method>
		<method name="get_size" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_v_offset" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_zfar" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="get_znear" qualifiers="const">
			<return type="float">
			</return>
			<description>
			</description>
		</method>
		<method name="is_current" qualifiers="const">
			<return type="bool">
			</return>
			<description>
				Return whether the Camera is the current one in the [Viewport], or plans to become current (if outside the scene tree).
			</description>
		</method>
		<method name="is_position_behind" qualifiers="const">
			<return type="bool">
			</return>
			<argument index="0" name="world_point" type="Vector3">
			</argument>
			<description>
			</description>
		</method>
		<method name="make_current">
			<return type="void">
			</return>
			<description>
				Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
			</description>
		</method>
		<method name="project_local_ray_normal" qualifiers="const">
			<return type="Vector3">
			</return>
			<argument index="0" name="screen_point" type="Vector2">
			</argument>
			<description>
			</description>
		</method>
		<method name="project_position" qualifiers="const">
			<return type="Vector3">
			</return>
			<argument index="0" name="screen_point" type="Vector2">
			</argument>
			<description>
			</description>
		</method>
		<method name="project_ray_normal" qualifiers="const">
			<return type="Vector3">
			</return>
			<argument index="0" name="screen_point" type="Vector2">
			</argument>
			<description>
				Return a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
			</description>
		</method>
		<method name="project_ray_origin" qualifiers="const">
			<return type="Vector3">
			</return>
			<argument index="0" name="screen_point" type="Vector2">
			</argument>
			<description>
				Return a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin,normal) for object intersection or picking.
			</description>
		</method>
		<method name="set_cull_mask">
			<return type="void">
			</return>
			<argument index="0" name="mask" type="int">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_doppler_tracking">
			<return type="void">
			</return>
			<argument index="0" name="mode" type="int" enum="Camera.DopplerTracking">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_environment">
			<return type="void">
			</return>
			<argument index="0" name="env" type="Environment">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_h_offset">
			<return type="void">
			</return>
			<argument index="0" name="ofs" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_keep_aspect_mode">
			<return type="void">
			</return>
			<argument index="0" name="mode" type="int" enum="Camera.KeepAspect">
			</argument>
			<description>
			</description>
		</method>
		<method name="set_orthogonal">
			<return type="void">
			</return>
			<argument index="0" name="size" type="float">
			</argument>
			<argument index="1" name="z_near" type="float">
			</argument>
			<argument index="2" name="z_far" type="float">
			</argument>
			<description>
				Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
			</description>
		</method>
		<method name="set_perspective">
			<return type="void">
			</return>
			<argument index="0" name="fov" type="float">
			</argument>
			<argument index="1" name="z_near" type="float">
			</argument>
			<argument index="2" name="z_far" type="float">
			</argument>
			<description>
				Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units.
			</description>
		</method>
		<method name="set_v_offset">
			<return type="void">
			</return>
			<argument index="0" name="ofs" type="float">
			</argument>
			<description>
			</description>
		</method>
		<method name="unproject_position" qualifiers="const">
			<return type="Vector2">
			</return>
			<argument index="0" name="world_point" type="Vector3">
			</argument>
			<description>
				Return how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle.
			</description>
		</method>
	</methods>
	<constants>
		<constant name="PROJECTION_PERSPECTIVE" value="0">
			Perspective Projection (object's size on the screen becomes smaller when far away).
		</constant>
		<constant name="PROJECTION_ORTHOGONAL" value="1">
			Orthogonal Projection (objects remain the same size on the screen no matter how far away they are).
		</constant>
		<constant name="KEEP_WIDTH" value="0">
		</constant>
		<constant name="KEEP_HEIGHT" value="1">
		</constant>
		<constant name="DOPPLER_TRACKING_DISABLED" value="0">
		</constant>
		<constant name="DOPPLER_TRACKING_IDLE_STEP" value="1">
		</constant>
		<constant name="DOPPLER_TRACKING_FIXED_STEP" value="2">
		</constant>
	</constants>
</class>