Files
godot-docs-l10n/classes/uk/class_gltfcamera.rst

220 lines
11 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_GLTFCamera:
GLTFCamera
==========
**Успадковує:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Представляє камеру glTF.
.. rst-class:: classref-introduction-group
Опис
--------
Представляє камеру, як визначено базовою специфікацією glTF.
.. rst-class:: classref-introduction-group
Посібники
------------------
- :doc:`Завантаження та збереження файлів під час виконання <../tutorials/io/runtime_file_loading_and_saving>`
- `детальна специфікація камери glTF <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera>`__
- `Специфікація камери glTF і файл прикладу <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md>`__
.. rst-class:: classref-reftable-group
Властивості
----------------------
.. 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
Методи
------------
.. 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
Описи властивостей
------------------------------------
.. _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**\ (\ )
Відстань до дальньої межі вибракування для цієї камери відносно її локальної осі Z, у метрах. Це відображається на властивості ``zfar`` 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**\ (\ )
Відстань до найближчої межі вибракування для цієї камери відносно її локальної осі Z, у метрах. Це відображається на властивості ``znear`` 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**\ (\ )
Поле огляду камери. Цей клас і glTF визначають поле зору камери в радіанах, тоді як Godot використовує градуси. Це відображається на властивості ``yfov`` glTF. Це значення використовується лише для перспективних камер, якщо :ref:`perspective<class_GLTFCamera_property_perspective>` має значення ``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**\ (\ )
Якщо ``true``, камера перебуває в режимі перспективи. В іншому випадку камера працює в ортографічному/ортогональному режимі. Це відображається на властивості ``type`` камери glTF. Для отримання додаткової інформації перегляньте :ref:`Camera3D.projection<class_Camera3D_property_projection>` і специфікацію glTF.
.. 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**\ (\ )
Розмір камери. Цей клас і glTF визначають величину розміру камери як радіус у метрах, тоді як Godot визначає її як діаметр у метрах. Це відображається на властивості ``ymag`` glTF. Це значення використовується лише для ортографічних/ортогональних камер, якщо :ref:`perspective<class_GLTFCamera_property_perspective>` має значення ``false``.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи методів
--------------------------
.. _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>`
Створює новий екземпляр GLTFCamera за допомогою парсингу :ref:`Dictionary<class_Dictionary>`.
.. 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>`
Створіть новий екземпляр GLTFCamera з даної Godot :ref:`Camera3D<class_Camera3D>`.
.. 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>`
Сфералізує цей екземпляр GLTFCamera в ``Дикаторія``.
.. 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>`
Перетворення цієї GLTFCamera екземпляр в вузол Godot :ref:`Camera3D<class_Camera3D>`.
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
.. |void| replace:: :abbr:`void (Значення не повертається.)`