Mesh
Overview
Mesh is a class in Aspose.3D FOSS for Java.
Inherits from: Geometry, Iterable<int[]>.
Mesh.Mesh creates an empty mesh instance.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
polygonCount | int | Read | Provides the current number of polygons |
polygons | List<int[]> | Read | Provides access to the list of polygon index arrays |
edges | List<Integer> | Read | Provides access to the list of mesh edge indices |
manifold | boolean | Read |
Methods
| Signature | Description |
|---|---|
Mesh() | Creates a mesh with the specified name |
Mesh(name: String) | |
addControlPoint(x: double, y: double, z: double) | Adds a 3D point (x,y,z) to the mesh’s control point list |
addControlPoint(x: double, y: double, z: double, w: double) | |
createPolygon(indices: int[]) | Defines a polygon from a sub‑range of an index array |
createPolygon(indices: int[], offset: int, length: int) | |
createPolygon(v1: int, v2: int, v3: int) | |
createPolygon(v1: int, v2: int, v3: int, v4: int) | |
getPolygonCount() → int | Returns the total number of polygons in the mesh |
getPolygonSize(index: int) → int | Returns the number of vertices of the polygon at the given index |
getPolygons() → List<int[]> | Returns a list of index arrays, each representing a polygon |
getEdges() → List<Integer> | Returns a list of edge vertex indices |
isManifold() → boolean | Indicates whether the mesh is manifold |
iterator() → Iterator<int[]> | Provides an iterator over polygon index arrays |
toMesh() → Mesh | Returns a copy of this mesh as a Mesh object |
clone() → Mesh | Creates a deep copy of the mesh |
triangulate() → Mesh | Converts all polygons to triangles and returns the resulting mesh |
optimize(removeVertices: boolean) → Mesh | Reduces mesh complexity with tolerance, threshold, and angle threshold for smoothing |
optimize(removeVertices: boolean, tolerance: float) → Mesh | |
optimize(removeVertices: boolean, tolerance: float, threshold: float) → Mesh | |
optimize(removeVertices: boolean, tolerance: float, threshold: float, angleThreshold: float) → Mesh | |
optimize2(removeVertices: boolean) → Mesh | Performs an alternative optimization, optionally removing vertices |
union(a: Mesh, b: Mesh) → Mesh | Returns a new mesh representing the union of two meshes |
difference(a: Mesh, b: Mesh) → Mesh | Returns a new mesh representing the subtraction of the second mesh from the first |
intersect(a: Mesh, b: Mesh) → Mesh | |
doBoolean(operation: BooleanOperation, a: Mesh, ma: Matrix4, b: Mesh, mb: Matrix4) → Mesh | Performs the specified Boolean operation on two meshes with given transforms |