mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
225 lines
12 KiB
ReStructuredText
225 lines
12 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_GLTFBufferView:
|
||
|
||
GLTFBufferView
|
||
==============
|
||
|
||
**Успадковує:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
Представляє вигляд буфера glTF.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
GLTFBufferView — це структура даних, що представляє ``bufferView`` glTF, який можна знайти в масиві ``"bufferViews"``. Буфер — це блок двійкових даних. Перегляд буфера — це фрагмент буфера, який можна використовувати для ідентифікації та вилучення даних із буфера.
|
||
|
||
Для більшості нестандартних варіантів використання буферів потрібно використовувати лише :ref:`buffer<class_GLTFBufferView_property_buffer>`, :ref:`byte_length<class_GLTFBufferView_property_byte_length>` і :ref:`byte_offset<class_GLTFBufferView_property_byte_offset>`. Властивості :ref:`byte_stride<class_GLTFBufferView_property_byte_stride>` і :ref:`indices<class_GLTFBufferView_property_indices>` призначені для більш розширених випадків використання, таких як перемежовані сітчасті дані, закодовані для GPU.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Посібники
|
||
------------------
|
||
|
||
- `Буфери, BufferViews та Accessors в специфікації Hronos glTF <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__
|
||
|
||
- :doc:`Завантаження та збереження файлів під час виконання <../tutorials/io/runtime_file_loading_and_saving>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`int<class_int>` | :ref:`buffer<class_GLTFBufferView_property_buffer>` | ``-1`` |
|
||
+-------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`int<class_int>` | :ref:`byte_length<class_GLTFBufferView_property_byte_length>` | ``0`` |
|
||
+-------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`int<class_int>` | :ref:`byte_offset<class_GLTFBufferView_property_byte_offset>` | ``0`` |
|
||
+-------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`int<class_int>` | :ref:`byte_stride<class_GLTFBufferView_property_byte_stride>` | ``-1`` |
|
||
+-------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`indices<class_GLTFBufferView_property_indices>` | ``false`` |
|
||
+-------------------------+---------------------------------------------------------------------------+-----------+
|
||
| :ref:`bool<class_bool>` | :ref:`vertex_attributes<class_GLTFBufferView_property_vertex_attributes>` | ``false`` |
|
||
+-------------------------+---------------------------------------------------------------------------+-----------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`GLTFBufferView<class_GLTFBufferView>` | :ref:`from_dictionary<class_GLTFBufferView_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| |
|
||
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`load_buffer_view_data<class_GLTFBufferView_method_load_buffer_view_data>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |const| |
|
||
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFBufferView_method_to_dictionary>`\ (\ ) |const| |
|
||
+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_GLTFBufferView_property_buffer:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **buffer** = ``-1`` :ref:`🔗<class_GLTFBufferView_property_buffer>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_buffer**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_buffer**\ (\ )
|
||
|
||
Індекс буфера цей вид буфера посилюється. Якщо ``-1``, цей буферний вигляд не відноситься до будь-якого буфера.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFBufferView_property_byte_length:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **byte_length** = ``0`` :ref:`🔗<class_GLTFBufferView_property_byte_length>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_byte_length**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_byte_length**\ (\ )
|
||
|
||
Довжина, в байтах, з цього буферного вигляду. Якщо ``0``, цей буферний вигляд порожній.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFBufferView_property_byte_offset:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **byte_offset** = ``0`` :ref:`🔗<class_GLTFBufferView_property_byte_offset>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_byte_offset**\ (\ )
|
||
|
||
Зміщення, в байтах, від початку буфера до початку цього буферного вигляду.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFBufferView_property_byte_stride:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **byte_stride** = ``-1`` :ref:`🔗<class_GLTFBufferView_property_byte_stride>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_byte_stride**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_byte_stride**\ (\ )
|
||
|
||
Стійка, в байтах, між ними. Якщо ``-1``, цей вид буфера не переповнений.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFBufferView_property_indices:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **indices** = ``false`` :ref:`🔗<class_GLTFBufferView_property_indices>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_indices**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_indices**\ (\ )
|
||
|
||
``true``, якщо тип буфера OpenGL GPU GLTFBufferView є ``ELEMENT_ARRAY_BUFFER``, який використовується для індексів вершин (ціла константа ``34963``). ``false``, якщо тип буфера має будь-яке інше значення. Перегляньте `Буфери, BufferViews і Accessors <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__, щоб дізнатися про можливі значення. Ця властивість встановлюється під час імпорту та використовується під час експорту.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFBufferView_property_vertex_attributes:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **vertex_attributes** = ``false`` :ref:`🔗<class_GLTFBufferView_property_vertex_attributes>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_vertex_attributes**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **get_vertex_attributes**\ (\ )
|
||
|
||
``true``, якщо тип буфера OpenGL GPU GLTFBufferView є ``ARRAY_BUFFER``, який використовується для атрибутів вершин (ціла константа ``34962``). ``false``, якщо тип буфера має будь-яке інше значення. Перегляньте `Буфери, BufferViews і Accessors <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__, щоб дізнатися про можливі значення. Ця властивість встановлюється під час імпорту та використовується під час експорту.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_GLTFBufferView_method_from_dictionary:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`GLTFBufferView<class_GLTFBufferView>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFBufferView_method_from_dictionary>`
|
||
|
||
Creates a new GLTFBufferView instance by parsing the given :ref:`Dictionary<class_Dictionary>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFBufferView_method_load_buffer_view_data:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedByteArray<class_PackedByteArray>` **load_buffer_view_data**\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |const| :ref:`🔗<class_GLTFBufferView_method_load_buffer_view_data>`
|
||
|
||
Завантажує дані буфера з буфера, що посилаються цим буфером з огляду на даній :ref:`GLTFState<class_GLTFState>`. Не підтримується цим методом. Дані подаються у вигляді :ref:`PackedByteArray<class_PackedByteArray>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GLTFBufferView_method_to_dictionary:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFBufferView_method_to_dictionary>`
|
||
|
||
Serializes this GLTFBufferView instance into a :ref:`Dictionary<class_Dictionary>`.
|
||
|
||
.. |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 (Значення не повертається.)`
|