Package com.aspose.threed
Class VertexDeclaration
- java.lang.Object
-
- com.aspose.threed.VertexDeclaration
-
- All Implemented Interfaces:
java.lang.Comparable<VertexDeclaration>
,java.lang.Iterable<VertexField>
public final class VertexDeclaration extends java.lang.Object implements java.lang.Iterable<VertexField>, java.lang.Comparable<VertexDeclaration>
The declaration of a custom defined vertex's structure
-
-
Constructor Summary
Constructors Constructor Description VertexDeclaration()
-
Method Summary
Modifier and Type Method Description VertexField
addField(int dataType, VertexFieldSemantic semantic)
Add a new vertex fieldVertexField
addField(int dataType, VertexFieldSemantic semantic, int index)
Add a new vertex fieldvoid
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 aVertexDeclaration
object, have the same value.static VertexDeclaration
fromGeometry(Geometry geometry, boolean useFloat)
Create aVertexDeclaration
based on aGeometry
's layout.VertexField
get(int index)
Gets theVertexField
by indexint
getCount()
Gets the count of all fields defined in thisVertexDeclaration
boolean
getSealed()
AVertexDeclaration
will be sealed when its been used byTriMesh
, 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 ofVertexDeclaration
-
-
-
Method Detail
-
getSealed
public boolean getSealed()
AVertexDeclaration
will be sealed when its been used byTriMesh
, no more modifications is allowed.
-
getCount
public int getCount()
Gets the count of all fields defined in thisVertexDeclaration
-
get
public VertexField get(int index)
Gets theVertexField
by index- Parameters:
index
-
-
clear
public void clear()
Clear all fields.
-
addField
public VertexField addField(int dataType, VertexFieldSemantic semantic, int index)
Add a new vertex field- Parameters:
dataType
- The data type of the vertex fieldsemantic
- How will this field used forindex
- The index for same field semantic
-
addField
public VertexField addField(int dataType, VertexFieldSemantic semantic)
Add a new vertex field- Parameters:
dataType
- The data type of the vertex fieldsemantic
- How will this field used for
-
fromGeometry
public static VertexDeclaration fromGeometry(Geometry geometry, boolean useFloat)
Create aVertexDeclaration
based on aGeometry
's layout.- Parameters:
geometry
-useFloat
- Use float instead of double type
-
getSize
public int getSize()
The size in byte of the vertex structure.
-
compareTo
public int compareTo(VertexDeclaration other)
Compares this instance to a specified object and returns an indication of their relative values.- Specified by:
compareTo
in interfacejava.lang.Comparable<VertexDeclaration>
-
toString
public java.lang.String toString()
String representation ofVertexDeclaration
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Determines whether this instance and a specified object, which must also be aVertexDeclaration
object, have the same value.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Returns the hash code for this string.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A 32-bit signed integer hash code.
-
iterator
public java.util.Iterator<VertexField> iterator()
Gets an enumerator to walk through all vertex fields in this instance.- Specified by:
iterator
in interfacejava.lang.Iterable<VertexField>
- Returns:
- Enumerator
-
-