mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
350 lines
15 KiB
ReStructuredText
350 lines
15 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/master/modules/gltf/doc_classes/GLTFAccessor.xml.
|
|
|
|
.. _class_GLTFAccessor:
|
|
|
|
GLTFAccessor
|
|
============
|
|
|
|
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Represents a GLTF accessor.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
GLTFAccessor is a data structure representing GLTF a ``accessor`` that would be found in the ``"accessors"`` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer. An accessor is a typed interpretation of the data in a buffer view.
|
|
|
|
Most custom data stored in GLTF does not need accessors, only buffer views (see :ref:`GLTFBufferView<class_GLTFBufferView>`). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- `Buffers, BufferViews, and Accessors in Khronos glTF specification <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__
|
|
|
|
- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Properties
|
|
----------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`buffer_view<class_GLTFAccessor_property_buffer_view>` | ``-1`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`byte_offset<class_GLTFAccessor_property_byte_offset>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`component_type<class_GLTFAccessor_property_component_type>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`count<class_GLTFAccessor_property_count>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`max<class_GLTFAccessor_property_max>` | ``PackedFloat64Array()`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`min<class_GLTFAccessor_property_min>` | ``PackedFloat64Array()`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`normalized<class_GLTFAccessor_property_normalized>` | ``false`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`sparse_count<class_GLTFAccessor_property_sparse_count>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`sparse_indices_buffer_view<class_GLTFAccessor_property_sparse_indices_buffer_view>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`sparse_indices_byte_offset<class_GLTFAccessor_property_sparse_indices_byte_offset>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`sparse_indices_component_type<class_GLTFAccessor_property_sparse_indices_component_type>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`sparse_values_buffer_view<class_GLTFAccessor_property_sparse_values_buffer_view>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`sparse_values_byte_offset<class_GLTFAccessor_property_sparse_values_byte_offset>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
| :ref:`int<class_int>` | :ref:`type<class_GLTFAccessor_property_type>` | ``0`` |
|
|
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_GLTFAccessor_property_buffer_view:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **buffer_view** = ``-1``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_buffer_view**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_buffer_view**\ (\ )
|
|
|
|
The index of the buffer view this accessor is referencing. If ``-1``, this accessor is not referencing any buffer view.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_byte_offset:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **byte_offset** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_byte_offset**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_component_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **component_type** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_component_type**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_component_type**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_count:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **count** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_count**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_count**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_max:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`PackedFloat64Array<class_PackedFloat64Array>` **max** = ``PackedFloat64Array()``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_max**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ )
|
|
- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_max**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_min:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`PackedFloat64Array<class_PackedFloat64Array>` **min** = ``PackedFloat64Array()``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_min**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ )
|
|
- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_min**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_normalized:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **normalized** = ``false``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_normalized**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_normalized**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_sparse_count:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sparse_count** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_sparse_count**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_sparse_count**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_sparse_indices_buffer_view:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sparse_indices_buffer_view** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_sparse_indices_buffer_view**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_sparse_indices_buffer_view**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_sparse_indices_byte_offset:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sparse_indices_byte_offset** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_sparse_indices_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_sparse_indices_byte_offset**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_sparse_indices_component_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sparse_indices_component_type** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_sparse_indices_component_type**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_sparse_indices_component_type**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_sparse_values_buffer_view:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sparse_values_buffer_view** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_sparse_values_buffer_view**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_sparse_values_buffer_view**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_sparse_values_byte_offset:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sparse_values_byte_offset** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_sparse_values_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_sparse_values_byte_offset**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_GLTFAccessor_property_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **type** = ``0``
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_type**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_type**\ (\ )
|
|
|
|
.. container:: contribute
|
|
|
|
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
|
|
|
.. |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.)`
|
|
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
|
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
|
.. |void| replace:: :abbr:`void (No return value.)`
|