Skip to content
0.2.0-dev Download ZIP
59 lines ·3.4 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="GLTFCamera" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
3 <brief_description>
4 Represents a glTF camera.
5 </brief_description>
6 <description>
7 Represents a camera as defined by the base glTF spec.
8 </description>
9 <tutorials>
10 <link title="Runtime file loading and saving">$DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
11 <link title="glTF camera detailed specification">https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera</link>
12 <link title="glTF camera spec and example file">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md</link>
13 </tutorials>
14 <methods>
15 <method name="from_dictionary" qualifiers="static">
16 <return type="GLTFCamera" />
17 <param index="0" name="dictionary" type="Dictionary" />
18 <description>
19 Creates a new GLTFCamera instance by parsing the given [Dictionary].
20 </description>
21 </method>
22 <method name="from_node" qualifiers="static">
23 <return type="GLTFCamera" />
24 <param index="0" name="camera_node" type="Camera3D" />
25 <description>
26 Create a new GLTFCamera instance from the given Godot [Camera3D] node.
27 </description>
28 </method>
29 <method name="to_dictionary" qualifiers="const">
30 <return type="Dictionary" />
31 <description>
32 Serializes this GLTFCamera instance into a [Dictionary].
33 </description>
34 </method>
35 <method name="to_node" qualifiers="const">
36 <return type="Camera3D" />
37 <description>
38 Converts this GLTFCamera instance into a Godot [Camera3D] node.
39 </description>
40 </method>
41 </methods>
42 <members>
43 <member name="depth_far" type="float" setter="set_depth_far" getter="get_depth_far" default="4000.0">
44 The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's [code]zfar[/code] property.
45 </member>
46 <member name="depth_near" type="float" setter="set_depth_near" getter="get_depth_near" default="0.05">
47 The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's [code]znear[/code] property.
48 </member>
49 <member name="fov" type="float" setter="set_fov" getter="get_fov" default="1.3089969">
50 The FOV of the camera. This class and glTF define the camera FOV in radians, while Godot uses degrees. This maps to glTF's [code]yfov[/code] property. This value is only used for perspective cameras, when [member perspective] is [code]true[/code].
51 </member>
52 <member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
53 If [code]true[/code], the camera is in perspective mode. Otherwise, the camera is in orthographic/orthogonal mode. This maps to glTF's camera [code]type[/code] property. See [member Camera3D.projection] and the glTF spec for more information.
54 </member>
55 <member name="size_mag" type="float" setter="set_size_mag" getter="get_size_mag" default="0.5">
56 The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to glTF's [code]ymag[/code] property. This value is only used for orthographic/orthogonal cameras, when [member perspective] is [code]false[/code].
57 </member>
58 </members>
59</class>