2021-01-04 13:33:44 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "GLTFAccessor" inherits= "Resource" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../../../doc/class.xsd" >
2021-01-04 13:33:44 +00:00
<brief_description >
2024-08-15 17:32:42 +00:00
Represents a glTF accessor.
2021-01-04 13:33:44 +00:00
</brief_description>
<description >
2024-08-15 17:32:42 +00:00
GLTFAccessor is a data structure representing a glTF [code]accessor[/code] that would be found in the [code]"accessors"[/code] 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 [GLTFBufferView]). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU.
2021-01-04 13:33:44 +00:00
</description>
<tutorials >
2024-01-10 22:08:25 +00:00
<link title= "Buffers, BufferViews, and Accessors in Khronos glTF specification" > https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md</link>
2023-11-13 13:37:27 +00:00
<link title= "Runtime file loading and saving" > $DOCS_URL/tutorials/io/runtime_file_loading_and_saving.html</link>
2021-01-04 13:33:44 +00:00
</tutorials>
<members >
2024-07-04 02:57:17 +00:00
<member name= "accessor_type" type= "int" setter= "set_accessor_type" getter= "get_accessor_type" enum= "GLTFAccessor.GLTFAccessorType" default= "0" >
2024-08-15 17:32:42 +00:00
The glTF accessor type as an enum. 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".
2024-04-12 04:29:51 +00:00
</member>
2023-05-09 10:29:00 +00:00
<member name= "buffer_view" type= "int" setter= "set_buffer_view" getter= "get_buffer_view" default= "-1" >
2024-01-10 22:08:25 +00:00
The index of the buffer view this accessor is referencing. If [code]-1[/code], this accessor is not referencing any buffer view.
2021-01-04 13:33:44 +00:00
</member>
<member name= "byte_offset" type= "int" setter= "set_byte_offset" getter= "get_byte_offset" default= "0" >
2024-04-12 04:29:51 +00:00
The offset relative to the start of the buffer view in bytes.
2021-01-04 13:33:44 +00:00
</member>
<member name= "component_type" type= "int" setter= "set_component_type" getter= "get_component_type" default= "0" >
2024-08-15 17:32:42 +00:00
The glTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices.
2021-01-04 13:33:44 +00:00
</member>
<member name= "count" type= "int" setter= "set_count" getter= "get_count" default= "0" >
2024-04-12 04:29:51 +00:00
The number of elements referenced by this accessor.
2021-01-04 13:33:44 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "max" type= "PackedFloat64Array" setter= "set_max" getter= "get_max" default= "PackedFloat64Array()" >
2024-04-12 04:29:51 +00:00
Maximum value of each component in this accessor.
2021-01-04 13:33:44 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "min" type= "PackedFloat64Array" setter= "set_min" getter= "get_min" default= "PackedFloat64Array()" >
2024-04-12 04:29:51 +00:00
Minimum value of each component in this accessor.
2021-01-04 13:33:44 +00:00
</member>
<member name= "normalized" type= "bool" setter= "set_normalized" getter= "get_normalized" default= "false" >
2024-04-12 04:29:51 +00:00
Specifies whether integer data values are normalized before usage.
2021-01-04 13:33:44 +00:00
</member>
<member name= "sparse_count" type= "int" setter= "set_sparse_count" getter= "get_sparse_count" default= "0" >
2024-04-12 04:29:51 +00:00
Number of deviating accessor values stored in the sparse array.
2021-01-04 13:33:44 +00:00
</member>
<member name= "sparse_indices_buffer_view" type= "int" setter= "set_sparse_indices_buffer_view" getter= "get_sparse_indices_buffer_view" default= "0" >
2024-04-12 04:29:51 +00:00
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.
2021-01-04 13:33:44 +00:00
</member>
<member name= "sparse_indices_byte_offset" type= "int" setter= "set_sparse_indices_byte_offset" getter= "get_sparse_indices_byte_offset" default= "0" >
2024-04-12 04:29:51 +00:00
The offset relative to the start of the buffer view in bytes.
2021-01-04 13:33:44 +00:00
</member>
<member name= "sparse_indices_component_type" type= "int" setter= "set_sparse_indices_component_type" getter= "get_sparse_indices_component_type" default= "0" >
2024-04-12 04:29:51 +00:00
The indices component data type as an enum. Possible values are 5121 for "UNSIGNED_BYTE", 5123 for "UNSIGNED_SHORT", and 5125 for "UNSIGNED_INT".
2021-01-04 13:33:44 +00:00
</member>
<member name= "sparse_values_buffer_view" type= "int" setter= "set_sparse_values_buffer_view" getter= "get_sparse_values_buffer_view" default= "0" >
2024-04-12 04:29:51 +00:00
The index of the bufferView with sparse values. The referenced buffer view MUST NOT have its target or byteStride properties defined.
2021-01-04 13:33:44 +00:00
</member>
<member name= "sparse_values_byte_offset" type= "int" setter= "set_sparse_values_byte_offset" getter= "get_sparse_values_byte_offset" default= "0" >
2024-04-12 04:29:51 +00:00
The offset relative to the start of the bufferView in bytes.
2021-01-04 13:33:44 +00:00
</member>
2024-07-04 02:57:17 +00:00
<member name= "type" type= "int" setter= "set_type" getter= "get_type" deprecated= "Use [member accessor_type] instead." >
2024-08-15 17:32:42 +00:00
The glTF accessor type as an enum. Use [member accessor_type] instead.
2021-01-04 13:33:44 +00:00
</member>
</members>
2024-07-04 02:57:17 +00:00
<constants >
<constant name= "TYPE_SCALAR" value= "0" enum= "GLTFAccessorType" >
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.
</constant>
<constant name= "TYPE_VEC2" value= "1" enum= "GLTFAccessorType" >
Accessor type "VEC2". For the glTF object model, this maps to "float2", represented in the glTF JSON as an array of two floats.
</constant>
<constant name= "TYPE_VEC3" value= "2" enum= "GLTFAccessorType" >
Accessor type "VEC3". For the glTF object model, this maps to "float3", represented in the glTF JSON as an array of three floats.
</constant>
<constant name= "TYPE_VEC4" value= "3" enum= "GLTFAccessorType" >
Accessor type "VEC4". For the glTF object model, this maps to "float4", represented in the glTF JSON as an array of four floats.
</constant>
<constant name= "TYPE_MAT2" value= "4" enum= "GLTFAccessorType" >
Accessor type "MAT2". For the glTF object model, this maps to "float2x2", represented in the glTF JSON as an array of four floats.
</constant>
<constant name= "TYPE_MAT3" value= "5" enum= "GLTFAccessorType" >
Accessor type "MAT3". For the glTF object model, this maps to "float3x3", represented in the glTF JSON as an array of nine floats.
</constant>
<constant name= "TYPE_MAT4" value= "6" enum= "GLTFAccessorType" >
Accessor type "MAT4". For the glTF object model, this maps to "float4x4", represented in the glTF JSON as an array of sixteen floats.
</constant>
</constants>
2021-01-04 13:33:44 +00:00
</class>