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 44 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 26 additional methods. All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package. Properties: boundingBox, capacity, excluded, indicesCount, name, parentNode, and 7 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.
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()NURBS curve is a curve represented by NURBS(Non-uniform rational basis spline), A NURBS curve is defined by its getOrder(), a set of weighted Geometry.getControlPoints() and a getKnotVectors() The w component in control point is used as control point’s weight, whatever it is a CurveDimension.TWO_DIMENSIONAL or CurveDimension.THREE_DIMENSIONAL
getParentNode()NodeConstructor of instance.
setParentNode(value: Node)The Boolean operator used in the operation to create the result mesh.
getParentNodes()ArrayList<Node>Protected constructor to allow derived classes to set name.
getExcluded()booleanThe Boolean operator used in the operation to create the result mesh.
setExcluded(value: boolean)Sets the excluded value.
getBoundingBox()BoundingBoxThe first operand of the Boolean operator.
SceneObject()Boolean operator allows you to apply Boolean operation on two IMeshConvertible instances.
getScene()SceneConstructor of BooleanOperator.
A3DObject()Parameterized Cylinder. It can also be used to represent a cone when one of radiusTop/radiusBottom is zero.
getName()StringThe segments of the curve.
setName(name: String)Constructs a CircleShape profile with specified radius.
getProperties()PropertyCollectionInitializes a new instance of Cylinder class.
findProperty(name: String)PropertyInitializes a new instance of the Bone class.
getProperty(name: String)ObjectGets the transform matrix of the node in current pose.
setProperty(name: String, value: Object)Gets the width segments.
removeProperty(name: String)booleanGets flip coordinate system of control points/normal during importing/exporting.

See Also

 English