public class TriMesh extends Entity
Modifier | Constructor and Description |
---|---|
protected |
TriMesh(String name)
Initialize a
TriMesh |
|
TriMesh(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
|
String |
toString()
Gets the string representation of
TriMesh |
byte[] |
verticesToArray()
Convert the vertices data to byte array
|
void |
write16bIndicesTo(com.aspose.csporter.helpers.Stream stream)
Write the indices data as 16bit integer to the stream
|
void |
write32bIndicesTo(com.aspose.csporter.helpers.Stream stream)
Write the indices data as 32bit integer to the stream
|
void |
writeVerticesTo(com.aspose.csporter.helpers.Stream stream)
Write vertices data to the specified stream
|
getBoundingBox, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
findProperty, getName, getProperty, removeProperty, removeProperty, setName, setProperty
public TriMesh(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) throws IllegalAccessException
mesh
- useFloat
- Use float type instead of double type for each vertex element component.TriMesh
generated from given Mesh
IllegalAccessException
public static TriMesh fromMesh(Mesh mesh) throws IllegalAccessException
mesh
- TriMesh
generated from given Mesh
IllegalAccessException
public Vertex beginVertex()
Vertex
public void endVertex()
public void writeVerticesTo(com.aspose.csporter.helpers.Stream stream) throws IOException
stream
- The stream that the vertices data will be written toIOException
public void write16bIndicesTo(com.aspose.csporter.helpers.Stream stream) throws IOException
stream
- IOException
public void write32bIndicesTo(com.aspose.csporter.helpers.Stream stream) throws IOException
stream
- IOException
public byte[] verticesToArray()
public void indicesToArray(short[][] result)
result
- public void indicesToArray(int[][] result)
result
- Copyright © 2018. All rights reserved.