public class TriMesh extends Entity
Modifier | Constructor and Description |
---|---|
protected |
TriMesh(java.lang.String name)
Initialize a
TriMesh |
|
TriMesh(java.lang.String name,
VertexDeclaration declaration)
Initialize an instance of
TriMesh |
Modifier and Type | Method and Description |
---|---|
Vertex |
beginVertex()
Begin adding vertex
|
void |
endVertex()
End adding vertex
|
static TriMesh |
fromMesh(Mesh mesh)
Create a TriMesh from given mesh object, the vertex declaration are based on the input mesh's structure.
|
static TriMesh |
fromMesh(Mesh mesh,
boolean useFloat)
Create a TriMesh from given mesh object, the vertex declaration are based on the input mesh's structure.
|
static TriMesh |
fromMesh(VertexDeclaration declaration,
Mesh mesh)
Create a TriMesh from given mesh object with given vertex layout.
|
int |
getCapacity()
The capacity of preallocated vertices.
|
int |
getIndicesCount()
The count of indices in this
TriMesh |
int |
getUnmergedVerticesCount()
The count of unmerged vertices that passed in by
beginVertex() and endVertex() . |
VertexDeclaration |
getVertexDeclaration()
The vertex layout of the
TriMesh . |
int |
getVerticesCount()
The count of vertices in this
TriMesh |
int |
getVerticesSizeInBytes()
The total size of all vertices in bytes
|
void |
indicesToArray(int[][] result)
Convert the indices to 32bit integer array
|
void |
indicesToArray(short[][] result)
Convert the indices to 16bit integer array
|
java.lang.String |
toString()
Gets the string representation of
TriMesh |
byte[] |
verticesToArray()
Convert the vertices data to byte array
|
void |
write16bIndicesTo(com.aspose.threed.Stream stream)
Write the indices data as 16bit integer to the stream
|
void |
write32bIndicesTo(com.aspose.threed.Stream stream)
Write the indices data as 32bit integer to the stream
|
void |
writeVerticesTo(com.aspose.threed.Stream stream)
Write vertices data to the specified stream
|
createRenderableResource, getBoundingBox, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
protected TriMesh(java.lang.String name)
TriMesh
public TriMesh(java.lang.String name, VertexDeclaration declaration)
TriMesh
name
- The name of this TriMeshdeclaration
- The vertex's declarationpublic VertexDeclaration getVertexDeclaration()
TriMesh
.public int getVerticesCount()
TriMesh
public int getIndicesCount()
TriMesh
public int getUnmergedVerticesCount()
beginVertex()
and endVertex()
.public int getCapacity()
public int getVerticesSizeInBytes()
public static TriMesh fromMesh(VertexDeclaration declaration, Mesh mesh)
declaration
- mesh
- public static TriMesh fromMesh(Mesh mesh, boolean useFloat)
public static TriMesh fromMesh(Mesh mesh)
public Vertex beginVertex()
Vertex
public void endVertex()
public void writeVerticesTo(com.aspose.threed.Stream stream) throws java.io.IOException
stream
- The stream that the vertices data will be written tojava.io.IOException
public void write16bIndicesTo(com.aspose.threed.Stream stream) throws java.io.IOException
stream
- java.io.IOException
public void write32bIndicesTo(com.aspose.threed.Stream stream) throws java.io.IOException
stream
- java.io.IOException
public byte[] verticesToArray()
public void indicesToArray(short[][] result)
result
- public void indicesToArray(int[][] result)
result
- public java.lang.String toString()
TriMesh
toString
in class java.lang.Object