Class GLTFAccessor
Represents a glTF accessor.
- Inheritance
-
GLTFAccessor
Remarks
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 GLTFBufferView). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU.
See Also
Properties
accessor_type
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".
var accessor_type : int = 0
Property Value
Remarks
buffer_view
The index of the buffer view this accessor is referencing. If -1
, this accessor is not referencing any buffer view.
var buffer_view : int = -1
Property Value
Remarks
byte_offset
The offset relative to the start of the buffer view in bytes.
var byte_offset : int = 0
Property Value
Remarks
component_type
The glTF component type as an enum. See 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.
var component_type : int = 0
Property Value
Remarks
count
The number of elements referenced by this accessor.
var count : int = 0
Property Value
Remarks
max
Maximum value of each component in this accessor.
var max : PackedFloat64Array = PackedFloat64Array()
Property Value
Remarks
- void set_max(PackedFloat64Array value)
- PackedFloat64Array get_max
min
Minimum value of each component in this accessor.
var min : PackedFloat64Array = PackedFloat64Array()
Property Value
Remarks
- void set_min(PackedFloat64Array value)
- PackedFloat64Array get_min
normalized
Specifies whether integer data values are normalized before usage.
var normalized : bool = false
Property Value
Remarks
sparse_count
Number of deviating accessor values stored in the sparse array.
var sparse_count : int = 0
Property Value
Remarks
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.
var sparse_indices_buffer_view : int = 0
Property Value
Remarks
sparse_indices_byte_offset
The offset relative to the start of the buffer view in bytes.
var sparse_indices_byte_offset : int = 0
Property Value
Remarks
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".
var sparse_indices_component_type : int = 0
Property Value
Remarks
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.
var sparse_values_buffer_view : int = 0
Property Value
Remarks
sparse_values_byte_offset
The offset relative to the start of the bufferView in bytes.
var sparse_values_byte_offset : int = 0
Property Value
Remarks
type
The glTF accessor type as an enum. Use accessor_type instead.
var type : int