Modifier and Type | Field and Description |
---|---|
boolean |
bitangent
When true, the vertex has a bitangent attribute (normalized), which is used for tangent-space effects like bump mapping.
32-bit floating-point. 3 components per attribute.
|
boolean |
color
When true, the vertex has an RGB color attribute.
8-bit unsigned byte. 3 components per attribute.
|
boolean |
normal
When true, the vertex has a normal attribute (normalized), which is commonly used for lighting.
32-bit floating-point. 3 components per attribute.
|
boolean |
position
When true, the vertex has a 3D position attribute.
64-bit floating-point (for precision). 3 components per attribute.
|
boolean |
st
When true, the vertex has a 2D texture coordinate attribute.
32-bit floating-point. 2 components per attribute
Default: false
|
boolean |
tangent
When true, the vertex has a tangent attribute (normalized), which is used for tangent-space effects like bump mapping.
32-bit floating-point. 3 components per attribute.
|
Constructor and Description |
---|
VertexFormat()
A vertex format defines what attributes make up a vertex.
|
VertexFormat(VertexFormatOptions options)
A vertex format defines what attributes make up a vertex.
|
Modifier and Type | Method and Description |
---|---|
static VertexFormat |
clone(VertexFormat cartesian)
Duplicates a VertexFormat instance.
|
static VertexFormat |
clone(VertexFormat cartesian,
VertexFormat result)
Duplicates a VertexFormat instance.
|
static VertexFormat |
DEFAULT()
An immutable vertex format with position, normal, and st attributes.
|
static double[] |
pack(VertexFormat value,
double[] array)
Stores the provided instance into the provided array.
|
static double[] |
pack(VertexFormat value,
double[] array,
int startingIndex)
Stores the provided instance into the provided array.
|
static int |
packedLength()
The number of elements used to pack the object into an array.
|
static VertexFormat |
POSITION_AND_COLOR()
An immutable vertex format with position and color attributes.
|
static VertexFormat |
POSITION_AND_NORMAL()
An immutable vertex format with position and normal attributes.
|
static VertexFormat |
POSITION_AND_ST()
An immutable vertex format with position and st attributes.
|
static VertexFormat |
POSITION_NORMAL_AND_ST()
An immutable vertex format with position, normal, and st attributes.
|
static VertexFormat |
POSITION_ONLY()
An immutable vertex format with only a position attribute.
|
static VertexFormat |
unpack(double[] array)
Retrieves an instance from a packed array.
|
static VertexFormat |
unpack(double[] array,
int startingIndex)
Retrieves an instance from a packed array.
|
static VertexFormat |
unpack(double[] array,
int startingIndex,
VertexFormat result)
Retrieves an instance from a packed array.
|
@JsProperty public boolean bitangent
@JsProperty public boolean color
@JsProperty public boolean normal
@JsProperty public boolean position
@JsProperty public boolean st
@JsProperty public boolean tangent
@JsConstructor public VertexFormat()
@JsConstructor public VertexFormat(VertexFormatOptions options)
options
- Options@JsProperty(name="DEFAULT") public static VertexFormat DEFAULT()
@JsProperty(name="packedLength") public static int packedLength()
@JsProperty(name="POSITION_AND_COLOR") public static VertexFormat POSITION_AND_COLOR()
@JsProperty(name="POSITION_AND_NORMAL") public static VertexFormat POSITION_AND_NORMAL()
@JsProperty(name="POSITION_AND_ST") public static VertexFormat POSITION_AND_ST()
@JsProperty(name="POSITION_NORMAL_AND_ST") public static VertexFormat POSITION_NORMAL_AND_ST()
@JsProperty(name="POSITION_ONLY") public static VertexFormat POSITION_ONLY()
position
@JsMethod public static VertexFormat clone(VertexFormat cartesian)
cartesian
- The vertex format to duplicate.@JsMethod public static VertexFormat clone(VertexFormat cartesian, VertexFormat result)
cartesian
- The vertex format to duplicate.result
- The object onto which to store the result.@JsMethod public static double[] pack(VertexFormat value, double[] array)
value
- The value to pack.array
- The array to pack into.@JsMethod public static double[] pack(VertexFormat value, double[] array, int startingIndex)
value
- The value to pack.array
- The array to pack into.startingIndex
- The index into the array at which to start packing the elements.@JsMethod public static VertexFormat unpack(double[] array)
array
- The packed array.@JsMethod public static VertexFormat unpack(double[] array, int startingIndex)
array
- The packed array.startingIndex
- The starting index of the element to be unpacked.@JsMethod public static VertexFormat unpack(double[] array, int startingIndex, VertexFormat result)
array
- The packed array.startingIndex
- The starting index of the element to be unpacked.result
- The object into which to store the result.Copyright © 2019. All rights reserved.