class_gltfaccessor.rst 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/gltf/doc_classes/GLTFAccessor.xml.
  6. .. _class_GLTFAccessor:
  7. GLTFAccessor
  8. ============
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Represents a glTF accessor.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. 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.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - `Buffers, BufferViews, and Accessors in Khronos glTF specification <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__
  20. - :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  27. | :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` | :ref:`accessor_type<class_GLTFAccessor_property_accessor_type>` | ``0`` |
  28. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  29. | :ref:`int<class_int>` | :ref:`buffer_view<class_GLTFAccessor_property_buffer_view>` | ``-1`` |
  30. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  31. | :ref:`int<class_int>` | :ref:`byte_offset<class_GLTFAccessor_property_byte_offset>` | ``0`` |
  32. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  33. | :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` | :ref:`component_type<class_GLTFAccessor_property_component_type>` | ``0`` |
  34. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  35. | :ref:`int<class_int>` | :ref:`count<class_GLTFAccessor_property_count>` | ``0`` |
  36. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  37. | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`max<class_GLTFAccessor_property_max>` | ``PackedFloat64Array()`` |
  38. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  39. | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`min<class_GLTFAccessor_property_min>` | ``PackedFloat64Array()`` |
  40. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`normalized<class_GLTFAccessor_property_normalized>` | ``false`` |
  42. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  43. | :ref:`int<class_int>` | :ref:`sparse_count<class_GLTFAccessor_property_sparse_count>` | ``0`` |
  44. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  45. | :ref:`int<class_int>` | :ref:`sparse_indices_buffer_view<class_GLTFAccessor_property_sparse_indices_buffer_view>` | ``0`` |
  46. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  47. | :ref:`int<class_int>` | :ref:`sparse_indices_byte_offset<class_GLTFAccessor_property_sparse_indices_byte_offset>` | ``0`` |
  48. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  49. | :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` | :ref:`sparse_indices_component_type<class_GLTFAccessor_property_sparse_indices_component_type>` | ``0`` |
  50. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  51. | :ref:`int<class_int>` | :ref:`sparse_values_buffer_view<class_GLTFAccessor_property_sparse_values_buffer_view>` | ``0`` |
  52. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  53. | :ref:`int<class_int>` | :ref:`sparse_values_byte_offset<class_GLTFAccessor_property_sparse_values_byte_offset>` | ``0`` |
  54. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  55. | :ref:`int<class_int>` | :ref:`type<class_GLTFAccessor_property_type>` | |
  56. +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+
  57. .. rst-class:: classref-reftable-group
  58. Methods
  59. -------
  60. .. table::
  61. :widths: auto
  62. +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`GLTFAccessor<class_GLTFAccessor>` | :ref:`from_dictionary<class_GLTFAccessor_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| |
  64. +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFAccessor_method_to_dictionary>`\ (\ ) |const| |
  66. +-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  67. .. rst-class:: classref-section-separator
  68. ----
  69. .. rst-class:: classref-descriptions-group
  70. Enumerations
  71. ------------
  72. .. _enum_GLTFAccessor_GLTFAccessorType:
  73. .. rst-class:: classref-enumeration
  74. enum **GLTFAccessorType**: :ref:`🔗<enum_GLTFAccessor_GLTFAccessorType>`
  75. .. _class_GLTFAccessor_constant_TYPE_SCALAR:
  76. .. rst-class:: classref-enumeration-constant
  77. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_SCALAR** = ``0``
  78. 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.
  79. .. _class_GLTFAccessor_constant_TYPE_VEC2:
  80. .. rst-class:: classref-enumeration-constant
  81. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_VEC2** = ``1``
  82. Accessor type "VEC2". For the glTF object model, this maps to "float2", represented in the glTF JSON as an array of two floats.
  83. .. _class_GLTFAccessor_constant_TYPE_VEC3:
  84. .. rst-class:: classref-enumeration-constant
  85. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_VEC3** = ``2``
  86. Accessor type "VEC3". For the glTF object model, this maps to "float3", represented in the glTF JSON as an array of three floats.
  87. .. _class_GLTFAccessor_constant_TYPE_VEC4:
  88. .. rst-class:: classref-enumeration-constant
  89. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_VEC4** = ``3``
  90. Accessor type "VEC4". For the glTF object model, this maps to "float4", represented in the glTF JSON as an array of four floats.
  91. .. _class_GLTFAccessor_constant_TYPE_MAT2:
  92. .. rst-class:: classref-enumeration-constant
  93. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_MAT2** = ``4``
  94. Accessor type "MAT2". For the glTF object model, this maps to "float2x2", represented in the glTF JSON as an array of four floats.
  95. .. _class_GLTFAccessor_constant_TYPE_MAT3:
  96. .. rst-class:: classref-enumeration-constant
  97. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_MAT3** = ``5``
  98. Accessor type "MAT3". For the glTF object model, this maps to "float3x3", represented in the glTF JSON as an array of nine floats.
  99. .. _class_GLTFAccessor_constant_TYPE_MAT4:
  100. .. rst-class:: classref-enumeration-constant
  101. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **TYPE_MAT4** = ``6``
  102. Accessor type "MAT4". For the glTF object model, this maps to "float4x4", represented in the glTF JSON as an array of sixteen floats.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _enum_GLTFAccessor_GLTFComponentType:
  106. .. rst-class:: classref-enumeration
  107. enum **GLTFComponentType**: :ref:`🔗<enum_GLTFAccessor_GLTFComponentType>`
  108. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_NONE:
  109. .. rst-class:: classref-enumeration-constant
  110. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_NONE** = ``0``
  111. Component type "NONE". This is not a valid component type, and is used to indicate that the component type is not set.
  112. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_BYTE:
  113. .. rst-class:: classref-enumeration-constant
  114. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_BYTE** = ``5120``
  115. 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.
  116. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_BYTE:
  117. .. rst-class:: classref-enumeration-constant
  118. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_BYTE** = ``5121``
  119. 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.
  120. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_SHORT:
  121. .. rst-class:: classref-enumeration-constant
  122. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_SHORT** = ``5122``
  123. 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.
  124. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_SHORT:
  125. .. rst-class:: classref-enumeration-constant
  126. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_SHORT** = ``5123``
  127. 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.
  128. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_INT:
  129. .. rst-class:: classref-enumeration-constant
  130. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_INT** = ``5124``
  131. 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``.
  132. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_INT:
  133. .. rst-class:: classref-enumeration-constant
  134. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_INT** = ``5125``
  135. 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.
  136. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_SINGLE_FLOAT:
  137. .. rst-class:: classref-enumeration-constant
  138. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SINGLE_FLOAT** = ``5126``
  139. 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.
  140. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_DOUBLE_FLOAT:
  141. .. rst-class:: classref-enumeration-constant
  142. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_DOUBLE_FLOAT** = ``5130``
  143. 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``.
  144. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_HALF_FLOAT:
  145. .. rst-class:: classref-enumeration-constant
  146. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_HALF_FLOAT** = ``5131``
  147. 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``.
  148. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_SIGNED_LONG:
  149. .. rst-class:: classref-enumeration-constant
  150. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_SIGNED_LONG** = ``5134``
  151. 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``.
  152. .. _class_GLTFAccessor_constant_COMPONENT_TYPE_UNSIGNED_LONG:
  153. .. rst-class:: classref-enumeration-constant
  154. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **COMPONENT_TYPE_UNSIGNED_LONG** = ``5135``
  155. 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``.
  156. .. rst-class:: classref-section-separator
  157. ----
  158. .. rst-class:: classref-descriptions-group
  159. Property Descriptions
  160. ---------------------
  161. .. _class_GLTFAccessor_property_accessor_type:
  162. .. rst-class:: classref-property
  163. :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **accessor_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_accessor_type>`
  164. .. rst-class:: classref-property-setget
  165. - |void| **set_accessor_type**\ (\ value\: :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>`\ )
  166. - :ref:`GLTFAccessorType<enum_GLTFAccessor_GLTFAccessorType>` **get_accessor_type**\ (\ )
  167. The glTF accessor type, as an enum.
  168. .. rst-class:: classref-item-separator
  169. ----
  170. .. _class_GLTFAccessor_property_buffer_view:
  171. .. rst-class:: classref-property
  172. :ref:`int<class_int>` **buffer_view** = ``-1`` :ref:`🔗<class_GLTFAccessor_property_buffer_view>`
  173. .. rst-class:: classref-property-setget
  174. - |void| **set_buffer_view**\ (\ value\: :ref:`int<class_int>`\ )
  175. - :ref:`int<class_int>` **get_buffer_view**\ (\ )
  176. The index of the buffer view this accessor is referencing. If ``-1``, this accessor is not referencing any buffer view.
  177. .. rst-class:: classref-item-separator
  178. ----
  179. .. _class_GLTFAccessor_property_byte_offset:
  180. .. rst-class:: classref-property
  181. :ref:`int<class_int>` **byte_offset** = ``0`` :ref:`🔗<class_GLTFAccessor_property_byte_offset>`
  182. .. rst-class:: classref-property-setget
  183. - |void| **set_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
  184. - :ref:`int<class_int>` **get_byte_offset**\ (\ )
  185. The offset relative to the start of the buffer view in bytes.
  186. .. rst-class:: classref-item-separator
  187. ----
  188. .. _class_GLTFAccessor_property_component_type:
  189. .. rst-class:: classref-property
  190. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **component_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_component_type>`
  191. .. rst-class:: classref-property-setget
  192. - |void| **set_component_type**\ (\ value\: :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>`\ )
  193. - :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **get_component_type**\ (\ )
  194. 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.
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_GLTFAccessor_property_count:
  198. .. rst-class:: classref-property
  199. :ref:`int<class_int>` **count** = ``0`` :ref:`🔗<class_GLTFAccessor_property_count>`
  200. .. rst-class:: classref-property-setget
  201. - |void| **set_count**\ (\ value\: :ref:`int<class_int>`\ )
  202. - :ref:`int<class_int>` **get_count**\ (\ )
  203. The number of elements referenced by this accessor.
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_GLTFAccessor_property_max:
  207. .. rst-class:: classref-property
  208. :ref:`PackedFloat64Array<class_PackedFloat64Array>` **max** = ``PackedFloat64Array()`` :ref:`🔗<class_GLTFAccessor_property_max>`
  209. .. rst-class:: classref-property-setget
  210. - |void| **set_max**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ )
  211. - :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_max**\ (\ )
  212. Maximum value of each component in this accessor.
  213. **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.
  214. .. rst-class:: classref-item-separator
  215. ----
  216. .. _class_GLTFAccessor_property_min:
  217. .. rst-class:: classref-property
  218. :ref:`PackedFloat64Array<class_PackedFloat64Array>` **min** = ``PackedFloat64Array()`` :ref:`🔗<class_GLTFAccessor_property_min>`
  219. .. rst-class:: classref-property-setget
  220. - |void| **set_min**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ )
  221. - :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_min**\ (\ )
  222. Minimum value of each component in this accessor.
  223. **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.
  224. .. rst-class:: classref-item-separator
  225. ----
  226. .. _class_GLTFAccessor_property_normalized:
  227. .. rst-class:: classref-property
  228. :ref:`bool<class_bool>` **normalized** = ``false`` :ref:`🔗<class_GLTFAccessor_property_normalized>`
  229. .. rst-class:: classref-property-setget
  230. - |void| **set_normalized**\ (\ value\: :ref:`bool<class_bool>`\ )
  231. - :ref:`bool<class_bool>` **get_normalized**\ (\ )
  232. Specifies whether integer data values are normalized before usage.
  233. .. rst-class:: classref-item-separator
  234. ----
  235. .. _class_GLTFAccessor_property_sparse_count:
  236. .. rst-class:: classref-property
  237. :ref:`int<class_int>` **sparse_count** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_count>`
  238. .. rst-class:: classref-property-setget
  239. - |void| **set_sparse_count**\ (\ value\: :ref:`int<class_int>`\ )
  240. - :ref:`int<class_int>` **get_sparse_count**\ (\ )
  241. Number of deviating accessor values stored in the sparse array.
  242. .. rst-class:: classref-item-separator
  243. ----
  244. .. _class_GLTFAccessor_property_sparse_indices_buffer_view:
  245. .. rst-class:: classref-property
  246. :ref:`int<class_int>` **sparse_indices_buffer_view** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_buffer_view>`
  247. .. rst-class:: classref-property-setget
  248. - |void| **set_sparse_indices_buffer_view**\ (\ value\: :ref:`int<class_int>`\ )
  249. - :ref:`int<class_int>` **get_sparse_indices_buffer_view**\ (\ )
  250. 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.
  251. .. rst-class:: classref-item-separator
  252. ----
  253. .. _class_GLTFAccessor_property_sparse_indices_byte_offset:
  254. .. rst-class:: classref-property
  255. :ref:`int<class_int>` **sparse_indices_byte_offset** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_byte_offset>`
  256. .. rst-class:: classref-property-setget
  257. - |void| **set_sparse_indices_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
  258. - :ref:`int<class_int>` **get_sparse_indices_byte_offset**\ (\ )
  259. The offset relative to the start of the buffer view in bytes.
  260. .. rst-class:: classref-item-separator
  261. ----
  262. .. _class_GLTFAccessor_property_sparse_indices_component_type:
  263. .. rst-class:: classref-property
  264. :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **sparse_indices_component_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_component_type>`
  265. .. rst-class:: classref-property-setget
  266. - |void| **set_sparse_indices_component_type**\ (\ value\: :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>`\ )
  267. - :ref:`GLTFComponentType<enum_GLTFAccessor_GLTFComponentType>` **get_sparse_indices_component_type**\ (\ )
  268. The indices component data type as an enum. Possible values are 5121 for "UNSIGNED_BYTE", 5123 for "UNSIGNED_SHORT", and 5125 for "UNSIGNED_INT".
  269. .. rst-class:: classref-item-separator
  270. ----
  271. .. _class_GLTFAccessor_property_sparse_values_buffer_view:
  272. .. rst-class:: classref-property
  273. :ref:`int<class_int>` **sparse_values_buffer_view** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_values_buffer_view>`
  274. .. rst-class:: classref-property-setget
  275. - |void| **set_sparse_values_buffer_view**\ (\ value\: :ref:`int<class_int>`\ )
  276. - :ref:`int<class_int>` **get_sparse_values_buffer_view**\ (\ )
  277. The index of the bufferView with sparse values. The referenced buffer view MUST NOT have its target or byteStride properties defined.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _class_GLTFAccessor_property_sparse_values_byte_offset:
  281. .. rst-class:: classref-property
  282. :ref:`int<class_int>` **sparse_values_byte_offset** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_values_byte_offset>`
  283. .. rst-class:: classref-property-setget
  284. - |void| **set_sparse_values_byte_offset**\ (\ value\: :ref:`int<class_int>`\ )
  285. - :ref:`int<class_int>` **get_sparse_values_byte_offset**\ (\ )
  286. The offset relative to the start of the bufferView in bytes.
  287. .. rst-class:: classref-item-separator
  288. ----
  289. .. _class_GLTFAccessor_property_type:
  290. .. rst-class:: classref-property
  291. :ref:`int<class_int>` **type** :ref:`🔗<class_GLTFAccessor_property_type>`
  292. .. rst-class:: classref-property-setget
  293. - |void| **set_type**\ (\ value\: :ref:`int<class_int>`\ )
  294. - :ref:`int<class_int>` **get_type**\ (\ )
  295. **Deprecated:** Use :ref:`accessor_type<class_GLTFAccessor_property_accessor_type>` instead.
  296. 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".
  297. .. rst-class:: classref-section-separator
  298. ----
  299. .. rst-class:: classref-descriptions-group
  300. Method Descriptions
  301. -------------------
  302. .. _class_GLTFAccessor_method_from_dictionary:
  303. .. rst-class:: classref-method
  304. :ref:`GLTFAccessor<class_GLTFAccessor>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFAccessor_method_from_dictionary>`
  305. Creates a new GLTFAccessor instance by parsing the given :ref:`Dictionary<class_Dictionary>`.
  306. .. rst-class:: classref-item-separator
  307. ----
  308. .. _class_GLTFAccessor_method_to_dictionary:
  309. .. rst-class:: classref-method
  310. :ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFAccessor_method_to_dictionary>`
  311. Serializes this GLTFAccessor instance into a :ref:`Dictionary<class_Dictionary>`.
  312. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  313. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  314. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  315. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  316. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  317. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  318. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  319. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  320. .. |void| replace:: :abbr:`void (No return value.)`