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
| Name | Type | Access | Description |
|---|---|---|---|
vertexDeclaration | VertexDeclaration | Read | The vertex layout of the TriMesh. |
verticesCount | int | Read | The count of vertices in this TriMesh |
| @return The count of vertices in this TriMesh | |||
| / | |||
indicesCount | int | Read | The count of indices in this TriMesh |
| @return The count of indices in this TriMesh | |||
| / | |||
unmergedVerticesCount | int | Read | The count of unmerged vertices that passed in by beginVertex() and endVertex(). |
capacity | int | Read | The capacity of pre-allocated vertices. |
verticesSizeInBytes | int | Read | The total size of all vertices in bytes |
| @return The total size of all vertices in bytes | |||
| / | |||
parentNode | Node | Read | Gets the parent node. |
parentNodes | ArrayList<Node> | Read | Gets the parent nodes. |
excluded | boolean | Read | Gets the excluded. |
boundingBox | BoundingBox | Read | Gets the bounding box. |
scene | Scene | Read | Gets the scene. |
name | String | Read | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
TriMesh(name: String, declaration: VertexDeclaration) | Initialize an instance of TriMesh |
| @param name The name of this TriMesh | |
| @param declaration The vertex’s declaration | |
| / | |
getVertexDeclaration() → VertexDeclaration | The vertex layout of the TriMesh. |
getVerticesCount() → int | The count of vertices in this TriMesh |
| @return The count of vertices in this TriMesh | |
| / | |
getIndicesCount() → int | The count of indices in this TriMesh |
| @return The count of indices in this TriMesh | |
| / | |
getUnmergedVerticesCount() → int | The count of unmerged vertices that passed in by beginVertex() and endVertex(). |
getCapacity() → int | The capacity of pre-allocated vertices. |
getVerticesSizeInBytes() → int | The total size of all vertices in bytes |
| @return The total size of all vertices in bytes | |
| / | |
fromMesh(declaration: VertexDeclaration, mesh: Mesh) → TriMesh | Not implemented in the FOSS edition — throws at runtime. Create a TriMesh from given mesh object with given vertex layout. |
copyFrom(input: TriMesh, vd: VertexDeclaration) → TriMesh | Not 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) → TriMesh | Not 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) → TriMesh | Not 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() → Vertex | Not implemented in the FOSS edition — throws at runtime. Begin adding vertex |
| @return The reference of internal vertex object in type Vertex | |
| / | |
endVertex() → int | Not 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() → String | Calls toString on this TriMesh instance. |
fromRawData(vd: VertexDeclaration, vertices: byte[], indices: int[], generateVertexMapping: boolean) → TriMesh | Not 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() → Node | Constructor 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() → boolean | The Boolean operator used in the operation to create the result mesh. |
setExcluded(value: boolean) | Sets the excluded value. |
getBoundingBox() → BoundingBox | The first operand of the Boolean operator. |
SceneObject() | Boolean operator allows you to apply Boolean operation on two IMeshConvertible instances. |
getScene() → Scene | Constructor of BooleanOperator. |
A3DObject() | Parameterized Cylinder. It can also be used to represent a cone when one of radiusTop/radiusBottom is zero. |
getName() → String | The segments of the curve. |
setName(name: String) | Constructs a CircleShape profile with specified radius. |
getProperties() → PropertyCollection | Initializes a new instance of Cylinder class. |
findProperty(name: String) → Property | Initializes a new instance of the Bone class. |
getProperty(name: String) → Object | Gets the transform matrix of the node in current pose. |
setProperty(name: String, value: Object) | Gets the width segments. |
removeProperty(name: String) → boolean | Gets flip coordinate system of control points/normal during importing/exporting. |