public class Accessors
extends java.lang.Object
null.| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<?> |
getDataTypeForAccessorComponentType(int componentType)
Returns the data type for the given accessor component type.
|
static int |
getNumBytesForAccessorComponentType(int componentType)
Returns the number of bytes that one component with the given
accessor component type consists of.
|
static int |
getNumComponentsForAccessorType(java.lang.String accessorType)
Returns the number of components that one element has for the given
accessor type.
|
public static int getNumComponentsForAccessorType(java.lang.String accessorType)
"SCALAR" : 1
"VEC2" : 2
"VEC3" : 3
"VEC4" : 4
"MAT2" : 4
"MAT3" : 9
"MAT4" : 16
accessorType - The accessor type.java.lang.IllegalArgumentException - If the given type is none of the
valid parameterspublic static int getNumBytesForAccessorComponentType(int componentType)
GL_BYTE : 1
GL_UNSIGNED_BYTE : 1
GL_SHORT : 2
GL_UNSIGNED_SHORT : 2
GL_INT : 4
GL_UNSIGNED_INT : 4
GL_FLOAT : 4
componentType - The component typejava.lang.IllegalArgumentException - If the given type is none of the
valid parameterspublic static java.lang.Class<?> getDataTypeForAccessorComponentType(int componentType)
GL_BYTE : byte.class
GL_UNSIGNED_BYTE : byte.class
GL_SHORT : short.class
GL_UNSIGNED_SHORT : short.class
GL_INT : int.class
GL_UNSIGNED_INT : int.class
GL_FLOAT : float.class
componentType - The component typejava.lang.IllegalArgumentException - If the given type is none of the
valid parametersCopyright © 2022. All Rights Reserved.