Mesh Triangulation

Mesh Triangulation — Aspose.3D FOSS for Java

Overview

The PolygonModifier utility class is not available in the Java edition of Aspose.3D FOSS. There are no static PolygonModifier.triangulate() methods.

Mesh triangulation is available via the instance method Mesh.triangulate(). However, this method is currently a stub that returns a clone of the original mesh rather than performing actual fan triangulation.

import com.aspose.threed.*;

Mesh.triangulate()

Returns a new Mesh instance. In the current implementation, the returned mesh is a clone of the original — no polygon splitting is performed. This method exists as a forward-compatible API point; actual triangulation logic is not yet implemented.

Returns: Mesh — a clone of the original mesh (stub behaviour).

import com.aspose.threed.*;

Mesh mesh = new Mesh();
mesh.getControlPoints().add(new Vector4(0, 0, 0, 1.0));
mesh.getControlPoints().add(new Vector4(1, 0, 0, 1.0));
mesh.getControlPoints().add(new Vector4(1, 1, 0, 1.0));
mesh.getControlPoints().add(new Vector4(0, 1, 0, 1.0));
mesh.createPolygon(0, 1, 2, 3);   // quad

Mesh result = mesh.triangulate();
// Note: result is currently a clone (stub), not a triangulated mesh
System.out.println(result.getPolygonCount());

See Also