TriMesh

Overview

TriMesh is a class in Aspose.3D FOSS for Java. Inherits from: Entity, Iterable<Vertex>.

A TriMesh contains raw data that can be used by GPU directly.

This class provides 48 methods for working with TriMesh objects in Java programs. Available methods include: A3DObject, Entity, SceneObject, TriMesh, addTriangle, beginVertex, copyFrom, endVertex, findProperty, fromMesh, fromRawData, getBoundingBox, and 27 additional methods. All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package. Properties: boundingBox, capacity, entityRendererKey, excluded, indicesCount, name, and 8 more.

Properties

NameTypeAccessDescription
vertexDeclarationVertexDeclarationReadThe vertex layout of the TriMesh.
verticesCountintReadThe count of vertices in this TriMesh
@return The count of vertices in this TriMesh
/
indicesCountintReadThe count of indices in this TriMesh
@return The count of indices in this TriMesh
/
unmergedVerticesCountintReadThe count of unmerged vertices that passed in by beginVertex() and endVertex().
capacityintReadThe capacity of pre-allocated vertices.
verticesSizeInBytesintReadThe total size of all vertices in bytes
@return The total size of all vertices in bytes
/
parentNodeNodeReadGets the parent node.
parentNodesArrayList<Node>ReadGets the parent nodes.
excludedbooleanReadGets the excluded.
boundingBoxBoundingBoxReadGets the bounding box.
entityRendererKeyEntityRendererKeyReadGets the entity renderer key.
sceneSceneReadGets the scene.
nameStringReadGets the name.
propertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
TriMesh(name: String, declaration: VertexDeclaration)Initialize an instance of TriMesh
@param name The name of this TriMesh
@param declaration The vertex’s declaration
/
getVertexDeclaration()VertexDeclarationThe vertex layout of the TriMesh.
getVerticesCount()intThe count of vertices in this TriMesh
@return The count of vertices in this TriMesh
/
getIndicesCount()intThe count of indices in this TriMesh
@return The count of indices in this TriMesh
/
getUnmergedVerticesCount()intThe count of unmerged vertices that passed in by beginVertex() and endVertex().
getCapacity()intThe capacity of pre-allocated vertices.
getVerticesSizeInBytes()intThe total size of all vertices in bytes
@return The total size of all vertices in bytes
/
fromMesh(declaration: VertexDeclaration, mesh: Mesh)TriMeshNot implemented in the FOSS edition — throws at runtime. Create a TriMesh from given mesh object with given vertex layout.
copyFrom(input: TriMesh, vd: VertexDeclaration)TriMeshNot implemented in the FOSS edition — throws at runtime. Copy the TriMesh from input with new vertex layout
@param input The input TriMesh for copying
@param vd The new vertex declaration of the output TriMesh
@return A new TriMesh instance with new vertex declaration.
fromMesh(mesh: Mesh, useFloat: boolean)TriMeshNot implemented in the FOSS edition — throws at runtime. Create a TriMesh from given mesh object, the vertex declaration are based on the input mesh’s structure.
fromMesh(mesh: Mesh)TriMeshNot implemented in the FOSS edition — throws at runtime. Create a TriMesh from given mesh object, the vertex declaration are based on the input mesh’s structure.
beginVertex()VertexNot implemented in the FOSS edition — throws at runtime. Begin adding vertex
@return The reference of internal vertex object in type Vertex
/
endVertex()intNot implemented in the FOSS edition — throws at runtime. End adding vertex
/
writeVerticesTo(stream: Stream)Not implemented in the FOSS edition — throws at runtime. Write vertices data to the specified stream
/
write16bIndicesTo(stream: Stream)Not implemented in the FOSS edition — throws at runtime. Write the indices data as 16bit integer to the stream
/
write32bIndicesTo(stream: Stream)Not implemented in the FOSS edition — throws at runtime. Write the indices data as 32bit integer to the stream
/
writeVerticesTo(stream: OutputStream)Not implemented in the FOSS edition — throws at runtime. Write vertices to an OutputStream
/
write16bIndicesTo(stream: OutputStream)Not implemented in the FOSS edition — throws at runtime. Write 16-bit indices to an OutputStream
/
write32bIndicesTo(stream: OutputStream)Not implemented in the FOSS edition — throws at runtime. Write 32-bit indices to an OutputStream
/
verticesToArray()byte[]Not implemented in the FOSS edition — throws at runtime. Vertices data as byte array
@return Vertices data
/
indicesToArray(result: short[])Not implemented in the FOSS edition — throws at runtime. Indices data as short array
@param result Result array
/
indicesToArray(result: int[])Not implemented in the FOSS edition — throws at runtime. Indices data as int array
@param result Result array
/
toString()StringCalls toString on this TriMesh instance.
fromRawData(vd: VertexDeclaration, vertices: byte[], indices: int[], generateVertexMapping: boolean)TriMeshNot implemented in the FOSS edition — throws at runtime. Create a TriMesh from raw data
@param vd Vertex declaration
@param vertices Vertices data
@param indices Indices data
@param generateVertexMapping Generate vertex mapping
@return TriMesh instance
loadVerticesFromBytes(verticesInBytes: byte[])Not implemented in the FOSS edition — throws at runtime. Load vertices from byte array
@param verticesInBytes Vertices data
/
addTriangle(a: int, b: int, c: int)Add a triangle
@param a First vertex index
@param b Second vertex index
@param c Third vertex index
/
iterator()java.util.Iterator<Vertex>Not implemented in the FOSS edition — throws at runtime. Calls iterator on this TriMesh instance.
Entity(name: String)Calls Entity(name) on this TriMesh instance.
getParentNode()NodeReturns the parent node.
setParentNode(value: Node)Sets the parent node value.
getParentNodes()ArrayList<Node>Returns the parent nodes.
getExcluded()booleanReturns the excluded.
setExcluded(value: boolean)Sets the excluded value.
getBoundingBox()BoundingBoxReturns the bounding box.
getEntityRendererKey()EntityRendererKeyReturns the entity renderer key.
SceneObject()Calls SceneObject on this TriMesh instance.
SceneObject(name: String)Calls SceneObject(name) on this TriMesh instance.
getScene()SceneReturns the scene.
A3DObject()Calls A3DObject on this TriMesh instance.
A3DObject(name: String)Calls A3DObject(name) on this TriMesh instance.
getName()StringReturns the name.
setName(name: String)Initialize an instance of TriMesh
getProperties()PropertyCollectionReturns the properties.
findProperty(name: String)PropertyCalls findProperty(name) on this TriMesh instance.
getProperty(name: String)ObjectCalls getProperty(name) on this TriMesh instance.
setProperty(name: String, value: Object)Sets the property value.
removeProperty(name: String)booleanCalls removeProperty(name) on this TriMesh instance.
removeProperty(property: Property)booleanCalls removeProperty(property) on this TriMesh instance.

See Also

 English