Mesh
Overview
Mesh is a class in Aspose.3D FOSS for Java.
Inherits from: Geometry, Iterable<int[]>.
Mesh.Mesh creates an empty mesh with default name.
This class provides 18 methods for working with Mesh objects in Java programs.
Available methods include: Mesh, addControlPoint, clone, createPolygon, difference, doBoolean, getEdges, getPolygonCount, getPolygonSize, getPolygons, intersect, isManifold, and 6 additional methods.
All exported members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: edges, manifold, polygonCount, polygons.
Description
Mesh is a class in the Aspose.3D FOSS library for Java that exposes 54 methods and 19 properties for programmatic use. It extends Geometry and implements Iterable<int[]>, inheriting shared functionality from its parent type.
Core capabilities include: list<int[]>; list<integer>; boolean. These operations enable developers to integrate mesh functionality directly into Java applications.
The class also provides the polygonCount property (gets the polygon count), the polygons property (gets the polygons), the edges property (gets the edges).
The class offers 6 constructor overloads, allowing flexible initialization depending on the calling context.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
polygonCount | int | Read | Gets the polygon count. |
polygons | List<int[]> | Read | Gets the polygons. |
edges | List<Integer> | Read | Gets the edges. |
manifold | boolean | Read | Gets the manifold. |
Methods
| Signature | Description |
|---|---|
Mesh() | Creates an empty mesh with default name |
Mesh(name: String) | |
addControlPoint(x: double, y: double, z: double) | Adds a weighted 4D control point |
addControlPoint(x: double, y: double, z: double, w: double) | |
createPolygon(indices: int[]) | Creates a quadrilateral polygon from four vertex indices |
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 polygon count. |
getPolygonSize(index: int) → int | Returns the number of vertices of the polygon at the given index |
getPolygons() → List<int[]> | Returns the polygons. |
getEdges() → List<Integer> | Returns the edges. |
isManifold() → boolean | Returns true if manifold is set. |
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 new mesh |
optimize(removeVertices: boolean) → Mesh | Simplifies geometry considering tolerance, threshold, and angle deviation |
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 on the mesh |
union(a: Mesh, b: Mesh) → Mesh | Returns a mesh representing the union of two meshes |
difference(a: Mesh, b: Mesh) → Mesh | |
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 transformed meshes |