Class GltfAccessor
- Namespace
- Godot
- Assembly
- GodotSharp.dll
GLTFAccessor is a data structure representing GLTF a 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.
[GodotClassName("GLTFAccessor")]
public class GltfAccessor : Resource, IDisposable
- Inheritance
-
GltfAccessor
- Implements
- Inherited Members
Constructors
GltfAccessor()
public GltfAccessor()
Properties
AccessorType
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".
public GltfAccessor.GltfAccessorType AccessorType { get; set; }
Property Value
BufferView
The index of the buffer view this accessor is referencing. If -1
, this accessor is not referencing any buffer view.
public int BufferView { get; set; }
Property Value
ByteOffset
The offset relative to the start of the buffer view in bytes.
public int ByteOffset { get; set; }
Property Value
ComponentType
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.
public int ComponentType { get; set; }
Property Value
Count
The number of elements referenced by this accessor.
public int Count { get; set; }
Property Value
Max
Maximum value of each component in this accessor.
public double[] Max { get; set; }
Property Value
- double[]
Min
Minimum value of each component in this accessor.
public double[] Min { get; set; }
Property Value
- double[]
Normalized
Specifies whether integer data values are normalized before usage.
public bool Normalized { get; set; }
Property Value
SparseCount
Number of deviating accessor values stored in the sparse array.
public int SparseCount { get; set; }
Property Value
SparseIndicesBufferView
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.
public int SparseIndicesBufferView { get; set; }
Property Value
SparseIndicesByteOffset
The offset relative to the start of the buffer view in bytes.
public int SparseIndicesByteOffset { get; set; }
Property Value
SparseIndicesComponentType
The indices component data type as an enum. Possible values are 5121 for "UNSIGNED_BYTE", 5123 for "UNSIGNED_SHORT", and 5125 for "UNSIGNED_INT".
public int SparseIndicesComponentType { get; set; }
Property Value
SparseValuesBufferView
The index of the bufferView with sparse values. The referenced buffer view MUST NOT have its target or byteStride properties defined.
public int SparseValuesBufferView { get; set; }
Property Value
SparseValuesByteOffset
The offset relative to the start of the bufferView in bytes.
public int SparseValuesByteOffset { get; set; }
Property Value
Type
The GLTF accessor type as an enum. Use AccessorType instead.
[Obsolete("Use 'Godot.GltfAccessor.AccessorType' instead.")]
public int Type { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.