public enum ElementType extends java.lang.Enum<ElementType>
| Enum Constant and Description |
|---|
MAT2
The 2x2 matrix type
|
MAT3
The 3x3 matrix type
|
MAT4
The 4x4 matrix type
|
SCALAR
The scalar type
|
VEC2
The 2D vector type
|
VEC3
The 3D vector type
|
VEC4
The 4D vector type
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(java.lang.String s)
Returns whether the given string is a valid element type name, and may be
passed to
ElementType.valueOf without causing an exception. |
static ElementType |
forString(java.lang.String string)
Returns the element type for the given string.
|
int |
getByteStride(int componentType)
Obtains the byte stride that is implied for this element type with
the given component type, including any padding bytes that
may have to be inserted for matrix types.
|
int |
getNumComponents()
Returns the number of components that one element consists of
|
static ElementType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ElementType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ElementType SCALAR
public static final ElementType VEC2
public static final ElementType VEC3
public static final ElementType VEC4
public static final ElementType MAT2
public static final ElementType MAT3
public static final ElementType MAT4
public static ElementType[] values()
for (ElementType c : ElementType.values()) System.out.println(c);
public static ElementType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int getNumComponents()
public int getByteStride(int componentType)
componentType - The component typepublic static boolean contains(java.lang.String s)
ElementType.valueOf without causing an exception.s - The stringpublic static ElementType forString(java.lang.String string)
null or does not describe a valid element type,
then null is returnedstring - The stringCopyright © 2022. All Rights Reserved.