mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
175 lines
9.9 KiB
ReStructuredText
175 lines
9.9 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_GLTFMesh:
|
||
|
||
GLTFMesh
|
||
========
|
||
|
||
**Наследует:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
GLTFMesh представляет собой сетку glTF.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Описание
|
||
----------------
|
||
|
||
GLTFMesh обрабатывает данные 3D-сетки, импортированные из файлов glTF. Он включает свойства для каналов смешивания, весов смешивания, материалов экземпляров и самой сетки.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Обучающие материалы
|
||
--------------------------------------
|
||
|
||
- :doc:`Загрузка и сохранение файла времени выполнения <../tutorials/io/runtime_file_loading_and_saving>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Свойства
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+
|
||
| :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`blend_weights<class_GLTFMesh_property_blend_weights>` | ``PackedFloat32Array()`` |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] | :ref:`instance_materials<class_GLTFMesh_property_instance_materials>` | ``[]`` |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+
|
||
| :ref:`ImporterMesh<class_ImporterMesh>` | :ref:`mesh<class_GLTFMesh_property_mesh>` | |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+
|
||
| :ref:`String<class_String>` | :ref:`original_name<class_GLTFMesh_property_original_name>` | ``""`` |
|
||
+--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методы
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFMesh_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_additional_data<class_GLTFMesh_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) |
|
||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания свойств
|
||
--------------------------------
|
||
|
||
.. _class_GLTFMesh_property_blend_weights:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`PackedFloat32Array<class_PackedFloat32Array>` **blend_weights** = ``PackedFloat32Array()`` :ref:`🔗<class_GLTFMesh_property_blend_weights>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_blend_weights**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ )
|
||
- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_blend_weights**\ (\ )
|
||
|
||
Массив чисел с плавающей точкой, представляющий веса смешивания сетки.
|
||
|
||
**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array<class_PackedFloat32Array>` for more details.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFMesh_property_instance_materials:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] **instance_materials** = ``[]`` :ref:`🔗<class_GLTFMesh_property_instance_materials>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_instance_materials**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\]\ )
|
||
- :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] **get_instance_materials**\ (\ )
|
||
|
||
Массив объектов Material, представляющих материалы, используемые в сетке.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFMesh_property_mesh:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`ImporterMesh<class_ImporterMesh>` **mesh** :ref:`🔗<class_GLTFMesh_property_mesh>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_mesh**\ (\ value\: :ref:`ImporterMesh<class_ImporterMesh>`\ )
|
||
- :ref:`ImporterMesh<class_ImporterMesh>` **get_mesh**\ (\ )
|
||
|
||
Объект :ref:`ImporterMesh<class_ImporterMesh>`, представляющий саму сетку.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFMesh_property_original_name:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`String<class_String>` **original_name** = ``""`` :ref:`🔗<class_GLTFMesh_property_original_name>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_original_name**\ (\ value\: :ref:`String<class_String>`\ )
|
||
- :ref:`String<class_String>` **get_original_name**\ (\ )
|
||
|
||
Оригинальное название сетки.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания метода
|
||
------------------------------
|
||
|
||
.. _class_GLTFMesh_method_get_additional_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFMesh_method_get_additional_data>`
|
||
|
||
Получает дополнительные произвольные данные в этом экземпляре **GLTFMesh**. Это можно использовать для хранения данных о состоянии по узлам в классах :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`, что важно, поскольку они не имеют состояния.
|
||
|
||
Аргументом должно быть имя :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` (не обязательно совпадать с именем расширения в файле glTF), а возвращаемое значение может быть любым, которое вы задали. Если ничего не было задано, возвращаемое значение равно ``null``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFMesh_method_set_additional_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFMesh_method_set_additional_data>`
|
||
|
||
Устанавливает дополнительные произвольные данные в этом экземпляре **GLTFMesh**. Это можно использовать для хранения данных о состоянии каждого узла в классах :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`, что важно, поскольку они не имеют состояния.
|
||
|
||
Первым аргументом должно быть имя :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` (не обязательно совпадать с именем расширения в файле glTF), а вторым аргументом может быть все, что угодно.
|
||
|
||
.. |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 (Нет возвращаемого значения.)`
|