mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
220 lines
9.7 KiB
ReStructuredText
220 lines
9.7 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_GLTFCamera:
|
||
|
||
GLTFCamera
|
||
==========
|
||
|
||
**Hérite de :** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
Représente une caméra glTF.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Description
|
||
-----------
|
||
|
||
Représente une caméra telle que définie par la spécification glTF de base.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Tutoriels
|
||
------------------
|
||
|
||
- :doc:`Chargement et sauvegarde de fichiers durant l’exécution <../tutorials/io/runtime_file_loading_and_saving>`
|
||
|
||
- `Spécification détaillée de la caméra glTF <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera>`__
|
||
|
||
- `Spécification de la caméra glTF et fichier exemple <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md>`__
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Propriétés
|
||
--------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------+-----------------------------------------------------------+---------------+
|
||
| :ref:`float<class_float>` | :ref:`depth_far<class_GLTFCamera_property_depth_far>` | ``4000.0`` |
|
||
+---------------------------+-----------------------------------------------------------+---------------+
|
||
| :ref:`float<class_float>` | :ref:`depth_near<class_GLTFCamera_property_depth_near>` | ``0.05`` |
|
||
+---------------------------+-----------------------------------------------------------+---------------+
|
||
| :ref:`float<class_float>` | :ref:`fov<class_GLTFCamera_property_fov>` | ``1.3089969`` |
|
||
+---------------------------+-----------------------------------------------------------+---------------+
|
||
| :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`` |
|
||
+---------------------------+-----------------------------------------------------------+---------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Méthodes
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_dictionary<class_GLTFCamera_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| |
|
||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_node<class_GLTFCamera_method_from_node>`\ (\ camera_node\: :ref:`Camera3D<class_Camera3D>`\ ) |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| |
|
||
+-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descriptions des propriétés
|
||
------------------------------------------------------
|
||
|
||
.. _class_GLTFCamera_property_depth_far:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **depth_far** = ``4000.0`` :ref:`🔗<class_GLTFCamera_property_depth_far>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_depth_far**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_depth_far**\ (\ )
|
||
|
||
La distance jusqu'à la limite de culling lointain pour cette caméra par rapport à son axe Z local, en mètres. Ceci est associé à la propriété ``zfar`` du glTF.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFCamera_property_depth_near:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **depth_near** = ``0.05`` :ref:`🔗<class_GLTFCamera_property_depth_near>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_depth_near**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_depth_near**\ (\ )
|
||
|
||
La distance jusqu'à la limite de culling proche pour cette caméra par rapport à son axe Z local, en mètres. Ceci est associé à la propriété ``znear`` du glTF.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFCamera_property_fov:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **fov** = ``1.3089969`` :ref:`🔗<class_GLTFCamera_property_fov>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_fov**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_fov**\ (\ )
|
||
|
||
Le champ de vision de la caméra. Cette classe et le glTF définissent le champ de vision en radians, tandis que Godot utilise des degrés. Ceci est associé à la propriété ``yfov`` du glTF. Cette valeur n'est utilisée que pour les caméras de perspective, lorsque :ref:`perspective<class_GLTFCamera_property_perspective>` vaut ``true``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFCamera_property_perspective:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **perspective** = ``true`` :ref:`🔗<class_GLTFCamera_property_perspective>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_perspective**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_perspective**\ (\ )
|
||
|
||
Si ``true``, la caméra est en mode perspective. Sinon, la caméra est en mode orthographique/orthogonal. Ceci est associé à la propriété ``type`` du glTF. Voir :ref:`Camera3D.projection<class_Camera3D_property_projection>` et la spécification glTF pour plus d'informations.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFCamera_property_size_mag:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **size_mag** = ``0.5`` :ref:`🔗<class_GLTFCamera_property_size_mag>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_size_mag**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_size_mag**\ (\ )
|
||
|
||
La taille de la caméra. Cette classe et le glTF définissent la magnitude de la taille de la caméra comme un rayon en mètres, tandis que Godot la définit comme un diamètre en mètres. Ceci est associé à la propriété ``ymag`` du glTF. Cette valeur n'est utilisée que pour les caméras orthographiques/orthogonales, lorsque :ref:`perspective<class_GLTFCamera_property_perspective>` vaut ``false``.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descriptions des méthodes
|
||
--------------------------------------------------
|
||
|
||
.. _class_GLTFCamera_method_from_dictionary:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`GLTFCamera<class_GLTFCamera>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFCamera_method_from_dictionary>`
|
||
|
||
Crée une nouvelle instance GLTFCamera en parsant le :ref:`Dictionary<class_Dictionary>` donné.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFCamera_method_from_node:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`GLTFCamera<class_GLTFCamera>` **from_node**\ (\ camera_node\: :ref:`Camera3D<class_Camera3D>`\ ) |static| :ref:`🔗<class_GLTFCamera_method_from_node>`
|
||
|
||
Crée une nouvelle instance GLTFCamera depuis le nœud :ref:`Camera3D<class_Camera3D>` de Godot donné.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFCamera_method_to_dictionary:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFCamera_method_to_dictionary>`
|
||
|
||
Sérialise cette instance GLTFCamera en un :ref:`Dictionary<class_Dictionary>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFCamera_method_to_node:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Camera3D<class_Camera3D>` **to_node**\ (\ ) |const| :ref:`🔗<class_GLTFCamera_method_to_node>`
|
||
|
||
Convertit cette instance GLTFCamera en un nœud :ref:`Camera3D<class_Camera3D>` de Godot.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Cette méthode doit typiquement être redéfinie par l'utilisateur pour avoir un effet.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Cette méthode n'a pas d'effets de bord. Elle ne modifie aucune des variables membres de l'instance.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Cette méthode accepte n'importe quel nombre d'arguments après ceux décris ici.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Cette méthode est utilisée pour construire un type.)`
|
||
.. |static| replace:: :abbr:`static (Cette méthode n'a pas besoin d'instance pour être appelée, elle peut donc être directement appelée en utilisant le nom de la classe.)`
|
||
.. |operator| replace:: :abbr:`operator (Cette méthode décrit un opérateur valide à utiliser avec ce type en tant qu'opérande gauche.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Cette valeur est un nombre entier composé d'un masque de bits des options suivantes.)`
|
||
.. |void| replace:: :abbr:`void (Aucune valeur de retour.)`
|