public final class VertexDeclaration extends Object implements Iterable<VertexField>
Constructor and Description |
---|
VertexDeclaration() |
Modifier and Type | Method and Description |
---|---|
VertexField |
addField(int dataType,
VertexFieldSemantic semantic)
Add a new vertex field
|
VertexField |
addField(int dataType,
VertexFieldSemantic semantic,
int index)
Add a new vertex field
|
void |
clear()
Clear all fields.
|
static VertexDeclaration |
fromGeometry(Geometry geometry,
boolean useFloat)
Create a
VertexDeclaration based on a Geometry 's layout. |
VertexField |
get(int index)
Gets the
VertexField by index |
int |
getCount()
Gets the count of all fields defined in this
VertexDeclaration |
boolean |
getSealed()
A
VertexDeclaration will be sealed when its been used by TriMesh , no more modifications is allowed. |
int |
getSize()
The size in byte of the vertex structure.
|
Iterator<VertexField> |
iterator()
Gets an enumerator to walk through all vertex fields in this instance.
|
String |
toString()
String representation of
VertexDeclaration |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public boolean getSealed()
VertexDeclaration
will be sealed when its been used by TriMesh
, no more modifications is allowed.public int getCount()
VertexDeclaration
public VertexField get(int index)
VertexField
by indexindex
- public void clear()
public VertexField addField(int dataType, VertexFieldSemantic semantic, int index) throws IllegalAccessException
dataType
- The data type of the vertex fieldsemantic
- How will this field used forindex
- The index for same field semanticIllegalAccessException
public VertexField addField(int dataType, VertexFieldSemantic semantic) throws IllegalAccessException
dataType
- The data type of the vertex fieldsemantic
- How will this field used forIllegalAccessException
public static VertexDeclaration fromGeometry(Geometry geometry, boolean useFloat) throws IllegalAccessException
VertexDeclaration
based on a Geometry
's layout.geometry
- useFloat
- Use float instead of double typeIllegalAccessException
public int getSize()
public String toString()
VertexDeclaration
public Iterator<VertexField> iterator()
iterator
in interface Iterable<VertexField>
Copyright © 2018. All rights reserved.