public final class MeshPrimitiveBuilder
extends java.lang.Object
MeshPrimitiveModel instances.| Modifier and Type | Method and Description |
|---|---|
MeshPrimitiveBuilder |
addAttribute(java.lang.String attributeName,
DefaultAccessorModel attribute)
Add the given
AccessorModel as an attribute to the
MeshPrimitiveModel that is currently being built. |
MeshPrimitiveBuilder |
addNormals3D(java.nio.FloatBuffer data)
Add the given data as the "NORMAL" attribute of the mesh primitive.
|
MeshPrimitiveBuilder |
addNormals4D(java.nio.FloatBuffer data)
Add the given data as the "NORMAL" attribute of the mesh primitive.
|
MeshPrimitiveBuilder |
addPositions3D(java.nio.FloatBuffer data)
Add the given data as the "POSITION" attribute of the mesh primitive.
|
MeshPrimitiveBuilder |
addPositions4D(java.nio.FloatBuffer data)
Add the given data as the "POSITION" attribute of the mesh primitive.
|
MeshPrimitiveBuilder |
addTangents3D(java.nio.FloatBuffer data)
Add the given data as the "TANGENT" attribute of the mesh primitive.
|
MeshPrimitiveBuilder |
addTangents4D(java.nio.FloatBuffer data)
Add the given data as the "TANGENT" attribute of the mesh primitive.
|
MeshPrimitiveBuilder |
addTexCoords02D(java.nio.FloatBuffer data)
Add the given data as the "TEXCOORD_0" attribute of the mesh primitive.
|
DefaultMeshPrimitiveModel |
build()
Create the
MeshPrimitiveModel containing the indices and
attributes that have been added. |
static MeshPrimitiveBuilder |
create()
Create a new
MeshPrimitiveBuilder |
MeshPrimitiveBuilder |
setByteIndices(java.nio.ByteBuffer indices)
Set the given indices as the indices for the mesh primitive.
|
MeshPrimitiveBuilder |
setIndices(DefaultAccessorModel indices)
Set the indices of the currently built
MeshPrimitiveModel
to the given AccessorModel |
MeshPrimitiveBuilder |
setIndicesAs(java.nio.IntBuffer indices,
int componentType)
Set the given indices as the indices for the mesh primitive.
|
MeshPrimitiveBuilder |
setIntIndices(java.nio.IntBuffer indices)
Set the given indices as the indices for the mesh primitive.
|
MeshPrimitiveBuilder |
setIntIndicesAsByte(java.nio.IntBuffer indices)
Set the given indices as the indices for the mesh primitive.
|
MeshPrimitiveBuilder |
setIntIndicesAsShort(java.nio.IntBuffer indices)
Set the given indices as the indices for the mesh primitive.
|
MeshPrimitiveBuilder |
setLines()
Set the
rendering mode to
"lines" |
MeshPrimitiveBuilder |
setPoints()
Set the
rendering mode to
"points" |
MeshPrimitiveBuilder |
setShortIndices(java.nio.ShortBuffer indices)
Set the given indices as the indices for the mesh primitive.
|
MeshPrimitiveBuilder |
setTriangles()
Set the
rendering mode to
"triangles" |
public static MeshPrimitiveBuilder create()
MeshPrimitiveBuilderMeshPrimitiveBuilderpublic MeshPrimitiveBuilder setTriangles()
rendering mode to
"triangles"public MeshPrimitiveBuilder setLines()
rendering mode to
"lines"public MeshPrimitiveBuilder setPoints()
rendering mode to
"points"public MeshPrimitiveBuilder setIntIndices(java.nio.IntBuffer indices)
indices - The indicespublic MeshPrimitiveBuilder setIntIndicesAsShort(java.nio.IntBuffer indices)
indices - The indicespublic MeshPrimitiveBuilder setIntIndicesAsByte(java.nio.IntBuffer indices)
indices - The indicespublic MeshPrimitiveBuilder setShortIndices(java.nio.ShortBuffer indices)
indices - The indicespublic MeshPrimitiveBuilder setByteIndices(java.nio.ByteBuffer indices)
indices - The indicespublic MeshPrimitiveBuilder setIndicesAs(java.nio.IntBuffer indices, int componentType)
GL_UNSIGNED_BYTE,
GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT,
and the given indices will be casted to the given component type
if necessary.indices - The indicescomponentType - The component typejava.lang.IllegalArgumentException - If the component type is not one
of the valid types listed abovepublic MeshPrimitiveBuilder setIndices(DefaultAccessorModel indices)
MeshPrimitiveModel
to the given AccessorModelindices - The AccessorModel for the indicespublic MeshPrimitiveBuilder addPositions3D(java.nio.FloatBuffer data)
data - The datapublic MeshPrimitiveBuilder addPositions4D(java.nio.FloatBuffer data)
data - The datapublic MeshPrimitiveBuilder addNormals3D(java.nio.FloatBuffer data)
data - The datapublic MeshPrimitiveBuilder addNormals4D(java.nio.FloatBuffer data)
data - The datapublic MeshPrimitiveBuilder addTexCoords02D(java.nio.FloatBuffer data)
data - The datapublic MeshPrimitiveBuilder addTangents3D(java.nio.FloatBuffer data)
data - The datapublic MeshPrimitiveBuilder addTangents4D(java.nio.FloatBuffer data)
data - The datapublic MeshPrimitiveBuilder addAttribute(java.lang.String attributeName, DefaultAccessorModel attribute)
AccessorModel as an attribute to the
MeshPrimitiveModel that is currently being built.attributeName - The attribute name, e.g. "POSITION"attribute - The AccessorModel with the attribute datapublic DefaultMeshPrimitiveModel build()
MeshPrimitiveModel containing the indices and
attributes that have been added.MeshPrimitiveModelCopyright © 2022. All Rights Reserved.