public final class VertexDeclaration extends java.lang.Object implements java.lang.Iterable<VertexField>, java.lang.Comparable<VertexDeclaration>
| 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
|
VertexField |
addField(int dataType,
VertexFieldSemantic semantic,
int index,
java.lang.String alias)
Add a new vertex field
|
void |
clear()
Clear all fields.
|
int |
compareTo(VertexDeclaration other)
Compares this instance to a specified object and returns an indication of their relative values.
|
boolean |
equals(java.lang.Object obj)
Determines whether this instance and a specified object, which must also be a
VertexDeclaration object, have the same value. |
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.
|
int |
hashCode()
Returns the hash code for this string.
|
java.util.Iterator<VertexField> |
iterator()
Gets an enumerator to walk through all vertex fields in this instance.
|
java.lang.String |
toString()
String representation of
VertexDeclaration |
public boolean getSealed()
VertexDeclaration will be sealed when its been used by TriMesh, no more modifications is allowed.VertexDeclaration will be sealed when its been used by TriMesh, no more modifications is allowed.public int getCount()
VertexDeclarationVertexDeclarationpublic VertexField get(int index)
VertexField by indexVertexField by indexpublic void clear()
public VertexField addField(int dataType, VertexFieldSemantic semantic, int index, java.lang.String alias)
dataType - The data type of the vertex fieldsemantic - How will this field used forindex - The index for same field semantic, -1 for auto-generationalias - The alias name of the fieldpublic VertexField addField(int dataType, VertexFieldSemantic semantic)
dataType - The data type of the vertex fieldsemantic - How will this field used forpublic VertexField addField(int dataType, VertexFieldSemantic semantic, int index)
dataType - The data type of the vertex fieldsemantic - How will this field used forindex - The index for same field semantic, -1 for auto-generationpublic static VertexDeclaration fromGeometry(Geometry geometry, boolean useFloat)
VertexDeclaration based on a Geometry's layout.useFloat - Use float instead of double typepublic int getSize()
public int compareTo(VertexDeclaration other)
compareTo in interface java.lang.Comparable<VertexDeclaration>public java.lang.String toString()
VertexDeclarationtoString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
VertexDeclaration object, have the same value.equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.Iterator<VertexField> iterator()
iterator in interface java.lang.Iterable<VertexField>