Enum Class MeshFormat
- All Implemented Interfaces:
Serializable, Comparable<MeshFormat>, Constable
The vertex layouts behind the sinks, one per sink type, each with its own shader.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionQuadSink: position (3 floats) and colour (4 bytes); 16 bytes.LineSink: both end points (6 floats), the corner (along, side), the width and the colour; 40 bytes.TexturedSink: position, texture coordinates, normal (3 signed bytes and a pad) and colour; 28 bytes. -
Method Summary
Modifier and TypeMethodDescriptionintstride()Returns the bytes per vertex.static MeshFormatReturns the enum constant of this class with the specified name.static MeshFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COLOR
QuadSink: position (3 floats) and colour (4 bytes); 16 bytes. -
LINE
LineSink: both end points (6 floats), the corner (along, side), the width and the colour; 40 bytes. -
TEXTURED
TexturedSink: position, texture coordinates, normal (3 signed bytes and a pad) and colour; 28 bytes.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
stride
public int stride()Returns the bytes per vertex.- Returns:
- the stride
-