classref: Sync with current master branch (46a568e0a)

This commit is contained in:
Rémi Verschelde
2022-08-31 15:18:54 +02:00
parent b08b95d4f5
commit 465dd176b6
378 changed files with 17124 additions and 13692 deletions
+94 -10
View File
@@ -12,7 +12,19 @@ GLTFCamera
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Represents a GLTF camera.
Description
-----------
Represents a camera as defined by the base GLTF spec.
Tutorials
---------
- `GLTF camera detailed specification <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera>`__
- `GLTF camera spec and example file <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md>`__
Properties
----------
@@ -22,10 +34,25 @@ Properties
+---------------------------+-----------------------------------------------------------+------------+
| :ref:`float<class_float>` | :ref:`depth_near<class_GLTFCamera_property_depth_near>` | ``0.05`` |
+---------------------------+-----------------------------------------------------------+------------+
| :ref:`float<class_float>` | :ref:`fov_size<class_GLTFCamera_property_fov_size>` | ``75.0`` |
| :ref:`float<class_float>` | :ref:`fov<class_GLTFCamera_property_fov>` | ``1.309`` |
+---------------------------+-----------------------------------------------------------+------------+
| :ref:`bool<class_bool>` | :ref:`perspective<class_GLTFCamera_property_perspective>` | ``true`` |
+---------------------------+-----------------------------------------------------------+------------+
| :ref:`float<class_float>` | :ref:`size_mag<class_GLTFCamera_property_size_mag>` | ``0.5`` |
+---------------------------+-----------------------------------------------------------+------------+
Methods
-------
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_dictionary<class_GLTFCamera_method_from_dictionary>` **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_node<class_GLTFCamera_method_from_node>` **(** :ref:`Camera3D<class_Camera3D>` camera_node **)** |static| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFCamera_method_to_dictionary>` **(** **)** |const| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Camera3D<class_Camera3D>` | :ref:`to_node<class_GLTFCamera_method_to_node>` **(** **)** |const| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+
Property Descriptions
---------------------
@@ -42,6 +69,8 @@ Property Descriptions
| *Getter* | get_depth_far() |
+-----------+----------------------+
The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``zfar`` property.
----
.. _class_GLTFCamera_property_depth_near:
@@ -56,19 +85,23 @@ Property Descriptions
| *Getter* | get_depth_near() |
+-----------+-----------------------+
The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``znear`` property.
----
.. _class_GLTFCamera_property_fov_size:
.. _class_GLTFCamera_property_fov:
- :ref:`float<class_float>` **fov_size**
- :ref:`float<class_float>` **fov**
+-----------+---------------------+
| *Default* | ``75.0`` |
+-----------+---------------------+
| *Setter* | set_fov_size(value) |
+-----------+---------------------+
| *Getter* | get_fov_size() |
+-----------+---------------------+
+-----------+----------------+
| *Default* | ``1.309`` |
+-----------+----------------+
| *Setter* | set_fov(value) |
+-----------+----------------+
| *Getter* | get_fov() |
+-----------+----------------+
The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's ``yfov`` property. This value is only used for perspective cameras, when :ref:`perspective<class_GLTFCamera_property_perspective>` is true.
----
@@ -84,6 +117,57 @@ Property Descriptions
| *Getter* | get_perspective() |
+-----------+------------------------+
Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera ``type`` property. See :ref:`Camera3D.projection<class_Camera3D_property_projection>` and the GLTF spec for more information.
----
.. _class_GLTFCamera_property_size_mag:
- :ref:`float<class_float>` **size_mag**
+-----------+---------------------+
| *Default* | ``0.5`` |
+-----------+---------------------+
| *Setter* | set_size_mag(value) |
+-----------+---------------------+
| *Getter* | get_size_mag() |
+-----------+---------------------+
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 ``ymag`` property. This value is only used for orthographic/orthogonal cameras, when :ref:`perspective<class_GLTFCamera_property_perspective>` is false.
Method Descriptions
-------------------
.. _class_GLTFCamera_method_from_dictionary:
- :ref:`GLTFCamera<class_GLTFCamera>` **from_dictionary** **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static|
Creates a new GLTFCamera instance by parsing the given :ref:`Dictionary<class_Dictionary>`.
----
.. _class_GLTFCamera_method_from_node:
- :ref:`GLTFCamera<class_GLTFCamera>` **from_node** **(** :ref:`Camera3D<class_Camera3D>` camera_node **)** |static|
Create a new GLTFCamera instance from the given Godot :ref:`Camera3D<class_Camera3D>` node.
----
.. _class_GLTFCamera_method_to_dictionary:
- :ref:`Dictionary<class_Dictionary>` **to_dictionary** **(** **)** |const|
Serializes this GLTFCamera instance into a :ref:`Dictionary<class_Dictionary>`.
----
.. _class_GLTFCamera_method_to_node:
- :ref:`Camera3D<class_Camera3D>` **to_node** **(** **)** |const|
Converts this GLTFCamera instance into a Godot :ref:`Camera3D<class_Camera3D>` node.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`