public class AccessorDatas
extends java.lang.Object
null.| Modifier and Type | Method and Description |
|---|---|
static java.lang.Number[] |
computeMax(AccessorData accessorData)
Compute the the maximum component values of the given
AccessorData |
static java.lang.Number[] |
computeMin(AccessorData accessorData)
Compute the the minimum component values of the given
AccessorData |
static AccessorData |
create(AccessorModel accessorModel)
Create the
AccessorData for the given AccessorModel |
static AccessorData |
create(AccessorModel accessorModel,
java.nio.ByteBuffer byteBuffer)
Create the
AccessorData for the given AccessorModel
that refers to the data from the given buffer. |
static AccessorData |
create(int componentType,
java.nio.ByteBuffer bufferViewData,
int byteOffset,
int count,
ElementType elementType,
java.lang.Integer byteStride)
Create an
AccessorData depending on the given component type. |
static AccessorFloatData |
createFloat(AccessorModel accessorModel)
Creates an
AccessorFloatData for the given AccessorModel |
static java.lang.String |
createString(AccessorData accessorData,
int elementsPerRow)
Creates a (possibly large!)
|
static boolean |
isByteType(int type)
Returns whether the given constant is
GL_BYTE or
GL_UNSIGNED_BYTE. |
static boolean |
isFloatType(int type)
Returns whether the given constant is
GL_FLOAT. |
static boolean |
isIntType(int type)
Returns whether the given constant is
GL_INT or
GL_UNSIGNED_INT. |
static boolean |
isShortType(int type)
Returns whether the given constant is
GL_SHORT or
GL_UNSIGNED_SHORT. |
public static AccessorData create(AccessorModel accessorModel)
AccessorData for the given AccessorModelaccessorModel - The AccessorModelAccessorDatapublic static AccessorData create(AccessorModel accessorModel, java.nio.ByteBuffer byteBuffer)
AccessorData for the given AccessorModel
that refers to the data from the given buffer.accessorModel - The AccessorModelbyteBuffer - The byte buffer containing the dataAccessorDatapublic static AccessorData create(int componentType, java.nio.ByteBuffer bufferViewData, int byteOffset, int count, ElementType elementType, java.lang.Integer byteStride)
AccessorData depending on the given component type.
This will return an AccessorByteData, AccessorShortData,
AccessorIntData or AccessorFloatDatacomponentType - The component type, as a GL constant (for example,
GL_UNSIGNED_SHORT or GL_FLOAT)bufferViewData - The buffer view data that the accessor refers tobyteOffset - The byte offset for the accessorcount - The count (number of elements) for the accessorelementType - The ElementType
For example, if the accessor type is "VEC3", then this
will be 3byteStride - The optional byte stride for the accessor dataAccessorDatajava.lang.IllegalArgumentException - If the given component type is
not a valid GL constantpublic static boolean isByteType(int type)
GL_BYTE or
GL_UNSIGNED_BYTE.type - The type constantbyte typepublic static boolean isShortType(int type)
GL_SHORT or
GL_UNSIGNED_SHORT.type - The type constantshort typepublic static boolean isIntType(int type)
GL_INT or
GL_UNSIGNED_INT.type - The type constantint typepublic static boolean isFloatType(int type)
GL_FLOAT.type - The type constantfloat typepublic static AccessorFloatData createFloat(AccessorModel accessorModel)
AccessorFloatData for the given AccessorModelaccessorModel - The AccessorModelAccessorFloatDatajava.lang.IllegalArgumentException - If the
component type of the given
accessorModel is not GL_FLOATpublic static java.lang.Number[] computeMin(AccessorData accessorData)
AccessorDataaccessorData - The AccessorDatajava.lang.IllegalArgumentException - If the given model has an unknown typepublic static java.lang.Number[] computeMax(AccessorData accessorData)
AccessorDataaccessorData - The AccessorDatajava.lang.IllegalArgumentException - If the given model has an unknown typepublic static java.lang.String createString(AccessorData accessorData, int elementsPerRow)
AccessorData, by calling
AccessorByteData.createString(Locale, String, int),
AccessorShortData.createString(Locale, String, int),
AccessorIntData.createString(Locale, String, int) or
AccessorFloatData.createString(Locale, String, int),
depending on the type of the given data, with an unspecified
format string.accessorData - The AccessorDataelementsPerRow - The number of elements per rowCopyright © 2022. All Rights Reserved.