GltfAccessorReader class final
Reads accessors out of the resolved glTF buffers.
The awkward parts of the format all live here: element stride may be declared on the buffer view rather than implied, integer components may be normalized to floats with a signed-specific rule, sparse accessors patch a subset of elements after the fact, and an accessor may have no buffer view at all (meaning all zeros, which is legal and used by sparse accessors).
Constructors
Properties
- accessorCount → int
-
How many accessors the file declared.
no setter
-
buffers
→ List<
Uint8List> -
Buffers already resolved by GlbContainer.resolveBuffers, indexed the same
way the glTF
buffersarray is.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bytesOfBufferView(
int index) → Uint8List -
The bytes
bufferViews[index]spans — for an extension that points at a buffer view directly rather than through an accessor, which is howKHR_draco_mesh_compressionnames its payload. -
componentTypeOf(
int accessorIndex) → GltfComponentType -
countOf(
int accessorIndex) → int - Number of elements in an accessor (not components).
-
hasBufferView(
int accessorIndex) → bool -
Whether accessors
accessorIndexnames abufferView. -
hasData(
int accessorIndex) → bool -
Whether reading accessors
accessorIndexreads something — a buffer view of its own, or data handed to supplyDecoded. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readAsFloats(
int accessorIndex) → Float32List - Reads an accessor as floats, applying the normalization rule when set.
-
readAsUint32(
int accessorIndex) → Uint32List - Reads an accessor as unsigned integers, for indices and joint references.
-
supplyDecoded(
int accessorIndex, {Float32List? floats, List< int> ? integers}) → void -
Gives accessors
accessorIndexits elements from outside the buffers. -
toString(
) → String -
A string representation of this object.
inherited
-
typeOf(
int accessorIndex) → GltfAccessorType
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited