Files
godot-docs-l10n/classes/zh_Hant/class_gltfaccessor.rst
Rémi Verschelde c3f2364c10 Sync classref with 4.6 branch
Lots of translations invalidated (fuzzied) as we just synced Weblate.
2025-12-19 16:39:51 +01:00

565 lines
26 KiB
ReStructuredText

:github_url: hide
.. _class_GLTFAccessor:
GLTFAccessor
============
**繼承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Represents a glTF accessor.
.. rst-class:: classref-introduction-group
說明
----
GLTFAccessor is a data structure representing a glTF ``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
教學
----
- `Buffers, BufferViews, and Accessors in Khronos glTF specification <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:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` | :ref:`accessor_type<class_GLTFAccessor_property_accessor_type>` | ``0`` |
+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
| :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:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` | :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:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` | :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>` | |
+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
.. rst-class:: classref-reftable-group
方法
----
.. table::
:widths: auto
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`GLTFAccessor<class_GLTFAccessor>` | :ref:`from_dictionary<class_GLTFAccessor_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| |
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFAccessor_method_to_dictionary>`\ (\ ) |const| |
+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
列舉
----
.. _enum_GLTFAccessor_GLTFAccessorType:
.. rst-class:: classref-enumeration
enum **GLTFAccessorType**: :ref:`🔗<enum_GLTFAccessor_GLTFAccessorType>`
.. _class_GLTFAccessor_constant_TYPE_SCALAR:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_SCALAR** = ``0``
Accessor type "SCALAR". For the glTF object model, this can be used to map to a single float, int, or bool value, or a float array.
.. _class_GLTFAccessor_constant_TYPE_VEC2:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_VEC2** = ``1``
Accessor type "VEC2". For the glTF object model, this maps to "float2", represented in the glTF JSON as an array of two floats.
.. _class_GLTFAccessor_constant_TYPE_VEC3:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_VEC3** = ``2``
Accessor type "VEC3". For the glTF object model, this maps to "float3", represented in the glTF JSON as an array of three floats.
.. _class_GLTFAccessor_constant_TYPE_VEC4:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_VEC4** = ``3``
Accessor type "VEC4". For the glTF object model, this maps to "float4", represented in the glTF JSON as an array of four floats.
.. _class_GLTFAccessor_constant_TYPE_MAT2:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_MAT2** = ``4``
Accessor type "MAT2". For the glTF object model, this maps to "float2x2", represented in the glTF JSON as an array of four floats.
.. _class_GLTFAccessor_constant_TYPE_MAT3:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_MAT3** = ``5``
Accessor type "MAT3". For the glTF object model, this maps to "float3x3", represented in the glTF JSON as an array of nine floats.
.. _class_GLTFAccessor_constant_TYPE_MAT4:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_MAT4** = ``6``
Accessor type "MAT4". For the glTF object model, this maps to "float4x4", represented in the glTF JSON as an array of sixteen floats.
.. rst-class:: classref-item-separator
----
.. _enum_GLTFAccessor_GLTFComponentType:
.. rst-class:: classref-enumeration
enum **GLTFComponentType**: :ref:`🔗<enum_GLTFAccessor_GLTFComponentType>`
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_NONE:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_NONE** = ``0``
Component type "NONE". This is not a valid component type, and is used to indicate that the component type is not set.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_BYTE:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_BYTE** = ``5120``
Component type "BYTE". The value is ``0x1400`` which comes from OpenGL. This indicates data is stored in 1-byte or 8-bit signed integers. This is a core part of the glTF specification.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_BYTE:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_BYTE** = ``5121``
Component type "UNSIGNED_BYTE". The value is ``0x1401`` which comes from OpenGL. This indicates data is stored in 1-byte or 8-bit unsigned integers. This is a core part of the glTF specification.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_SHORT:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_SHORT** = ``5122``
Component type "SHORT". The value is ``0x1402`` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit signed integers. This is a core part of the glTF specification.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_SHORT:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_SHORT** = ``5123``
Component type "UNSIGNED_SHORT". The value is ``0x1403`` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit unsigned integers. This is a core part of the glTF specification.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_INT:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_INT** = ``5124``
Component type "INT". The value is ``0x1404`` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit signed integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_INT:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_INT** = ``5125``
Component type "UNSIGNED_INT". The value is ``0x1405`` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit unsigned integers. This is a core part of the glTF specification.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SINGLE_FLOAT:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SINGLE_FLOAT** = ``5126``
Component type "FLOAT". The value is ``0x1406`` which comes from OpenGL. This indicates data is stored in 4-byte or 32-bit floating-point numbers. This is a core part of the glTF specification.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_DOUBLE_FLOAT:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_DOUBLE_FLOAT** = ``5130``
Component type "DOUBLE". The value is ``0x140A`` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit floating-point numbers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_HALF_FLOAT:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_HALF_FLOAT** = ``5131``
Component type "HALF_FLOAT". The value is ``0x140B`` which comes from OpenGL. This indicates data is stored in 2-byte or 16-bit floating-point numbers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_LONG:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_LONG** = ``5134``
Component type "LONG". The value is ``0x140E`` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit signed integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``.
.. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_LONG:
.. rst-class:: classref-enumeration-constant
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_LONG** = ``5135``
Component type "UNSIGNED_LONG". The value is ``0x140F`` which comes from OpenGL. This indicates data is stored in 8-byte or 64-bit unsigned integers. This is NOT a core part of the glTF specification, and may not be supported by all glTF importers. May be used by some extensions including ``KHR_interactivity``.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
屬性說明
--------
.. _class_GLTFAccessor_property_accessor_type:
.. rst-class:: classref-property
:ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **accessor_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_accessor_type>`
.. rst-class:: classref-property-setget
- |void| **set_accessor_type**\ (\ value\: :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>`\ )
- :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **get_accessor_type**\ (\ )
The glTF accessor type, as an enum.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_buffer_view:
.. rst-class:: classref-property
:ref:`int<class_int>` **buffer_view** = ``-1`` :ref:`🔗<class_GLTFAccessor_property_buffer_view>`
.. 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`` :ref:`🔗<class_GLTFAccessor_property_byte_offset>`
.. rst-class:: classref-property-setget
- |void| **set_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_byte_offset**\ (\ )
The offset relative to the start of the buffer view in bytes.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_component_type:
.. rst-class:: classref-property
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **component_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_component_type>`
.. rst-class:: classref-property-setget
- |void| **set_component_type**\ (\ value\: :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>`\ )
- :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **get_component_type**\ (\ )
The glTF component type as an enum. See :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` for possible values. Within the core glTF specification, a value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **count** = ``0`` :ref:`🔗<class_GLTFAccessor_property_count>`
.. rst-class:: classref-property-setget
- |void| **set_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_count**\ (\ )
The number of elements referenced by this accessor.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_max:
.. rst-class:: classref-property
:ref:`PackedFloat64Array<class_PackedFloat64Array>` **max** = ``PackedFloat64Array()`` :ref:`🔗<class_GLTFAccessor_property_max>`
.. rst-class:: classref-property-setget
- |void| **set_max**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ )
- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_max**\ (\ )
Maximum value of each component in this accessor.
**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat64Array<class_PackedFloat64Array>` for more details.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_min:
.. rst-class:: classref-property
:ref:`PackedFloat64Array<class_PackedFloat64Array>` **min** = ``PackedFloat64Array()`` :ref:`🔗<class_GLTFAccessor_property_min>`
.. rst-class:: classref-property-setget
- |void| **set_min**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ )
- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_min**\ (\ )
Minimum value of each component in this accessor.
**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat64Array<class_PackedFloat64Array>` for more details.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_normalized:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **normalized** = ``false`` :ref:`🔗<class_GLTFAccessor_property_normalized>`
.. rst-class:: classref-property-setget
- |void| **set_normalized**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_normalized**\ (\ )
Specifies whether integer data values are normalized before usage.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_sparse_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **sparse_count** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_count>`
.. rst-class:: classref-property-setget
- |void| **set_sparse_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_sparse_count**\ (\ )
Number of deviating accessor values stored in the sparse array.
.. 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`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_buffer_view>`
.. 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**\ (\ )
The index of the buffer view with sparse indices. The referenced buffer view MUST NOT have its target or byteStride properties defined. The buffer view and the optional byteOffset MUST be aligned to the componentType byte length.
.. 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`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_byte_offset>`
.. 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**\ (\ )
The offset relative to the start of the buffer view in bytes.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_sparse_indices_component_type:
.. rst-class:: classref-property
:ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **sparse_indices_component_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_component_type>`
.. rst-class:: classref-property-setget
- |void| **set_sparse_indices_component_type**\ (\ value\: :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>`\ )
- :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **get_sparse_indices_component_type**\ (\ )
The indices component data type as an enum. Possible values are 5121 for "UNSIGNED_BYTE", 5123 for "UNSIGNED_SHORT", and 5125 for "UNSIGNED_INT".
.. 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`` :ref:`🔗<class_GLTFAccessor_property_sparse_values_buffer_view>`
.. 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**\ (\ )
The index of the bufferView with sparse values. The referenced buffer view MUST NOT have its target or byteStride properties defined.
.. 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`` :ref:`🔗<class_GLTFAccessor_property_sparse_values_byte_offset>`
.. 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**\ (\ )
The offset relative to the start of the bufferView in bytes.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_property_type:
.. rst-class:: classref-property
:ref:`int<class_int>` **type** :ref:`🔗<class_GLTFAccessor_property_type>`
.. rst-class:: classref-property-setget
- |void| **set_type**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_type**\ (\ )
**已棄用:** Use :ref:`accessor_type<class_GLTFAccessor_property_accessor_type>` instead.
The glTF accessor type, as an :ref:`int<class_int>`. Possible values are ``0`` for "SCALAR", ``1`` for "VEC2", ``2`` for "VEC3", ``3`` for "VEC4", ``4`` for "MAT2", ``5`` for "MAT3", and ``6`` for "MAT4".
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
方法說明
--------
.. _class_GLTFAccessor_method_from_dictionary:
.. rst-class:: classref-method
:ref:`GLTFAccessor<class_GLTFAccessor>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFAccessor_method_from_dictionary>`
Creates a new GLTFAccessor instance by parsing the given :ref:`Dictionary<class_Dictionary>`.
.. rst-class:: classref-item-separator
----
.. _class_GLTFAccessor_method_to_dictionary:
.. rst-class:: classref-method
:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFAccessor_method_to_dictionary>`
Serializes this GLTFAccessor 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 (無回傳值。)`