public interface AccessorModel extends NamedModelElement
| Modifier and Type | Method and Description |
|---|---|
AccessorData |
getAccessorData()
Returns the
AccessorData for this accessor. |
BufferViewModel |
getBufferViewModel()
Returns the
BufferViewModel for the data that this accessor
provides access to. |
int |
getByteOffset()
Returns the byte offset of this accessor referring to its
BufferViewModel |
int |
getByteStride()
Returns the byte stride between the starts of two consecutive elements
of this accessor.
|
java.lang.Class<?> |
getComponentDataType()
Returns the data type of the components of this accessor.
|
int |
getComponentSizeInBytes()
Returns the size of one component, in bytes
|
int |
getComponentType()
Returns the component type of this accessor, as a GL constant.
|
int |
getCount()
Returns the number of elements that this accessor provides access to
|
int |
getElementSizeInBytes()
Returns the size of one element, in bytes.
|
ElementType |
getElementType()
Returns the
ElementType that this accessor provides access to |
java.lang.Number[] |
getMax()
Returns the maximum components of the
AccessorData. |
java.lang.Number[] |
getMin()
Returns the minimum components of the
AccessorData. |
int |
getPaddedElementSizeInBytes()
Obtain the padded size of one element, in bytes.
|
boolean |
isNormalized()
Returns whether this accessor contains normalized data
|
getNamegetExtensions, getExtrasBufferViewModel getBufferViewModel()
BufferViewModel for the data that this accessor
provides access to. Typed access to the data is possible by obtaining
the AccessorData using getAccessorData().BufferViewModelint getComponentType()
GL_FLOAT or GL_UNSIGNED_SHORTjava.lang.Class<?> getComponentDataType()
float.class or short.class.boolean isNormalized()
int getComponentSizeInBytes()
int getElementSizeInBytes()
getPaddedElementSizeInBytes() can be used.int getPaddedElementSizeInBytes()
ElementType elementType = accessorModel.getElementType();
int componentType = accessorModel.getComponentType();
int sizeWithPadding = elementType.getByteStride(componentType);
See ElementType.getByteStride(int).int getByteOffset()
BufferViewModelint getCount()
ElementType getElementType()
ElementType that this accessor provides access toElementTypeint getByteStride()
element
size. Note that for glTF 2.0, the byte stride for vertex attributes
must be a multiple 4. Callers must check whether the returned value
is 0 or not a multiple of 4 accordingly.AccessorData getAccessorData()
AccessorData for this accessor. The exact type
of the returned AccessorData object will depend on the
component data type. It will be
AccessorByteData, AccessorShortData,
AccessorIntData or AccessorFloatData for a component
data type of byte.class, short.class,
int.class or float.class, respectively,
and can be safely cast to the respective type.AccessorDatajava.lang.Number[] getMin()
AccessorData. The
returned array will be a clone of the array that is stored internally,
and have a length that matches the number of components per element.java.lang.Number[] getMax()
AccessorData. The
returned array will be a clone of the array that is stored internally,
and have a length that matches the number of components per element.Copyright © 2022. All Rights Reserved.