Class Delaunay
java.lang.Object
com.j3d.engine.scene.nodes.util.tri.TriangulationMethod
com.j3d.engine.scene.nodes.util.tri.Delaunay
Constrained Delaunay Triangulation for 3D planar polygons.
Generates an initial valid triangulation inside the polygon boundary and applies Lawson's edge flip algorithm on internal diagonals to maximize the minimum angles, satisfying the Delaunay empty-circumcircle criterion. Includes co-circular angle/length tie-breaking to dissolve symmetric fans.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static final recordNested classes/interfaces inherited from class TriangulationMethod
TriangulationMethod.InvalidTriangulationException, TriangulationMethod.Tri, TriangulationMethod.Triangulated -
Field Summary
Fields inherited from class TriangulationMethod
COPLANAR_TOLERANCE, Fetch -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddEdge(Map<Delaunay.EdgeKey, List<Integer>> edgeToTris, int a, int b, int triIdx) private voidcheckAndQueueEdge(Map<Delaunay.EdgeKey, List<Integer>> edgeToTris, Deque<Delaunay.EdgeKey> queue, int a, int b) private TriangulationMethod.TricreateTri(int a, int b, int c, boolean targetCCW, ArrayList<CartesianPoint> pts2d, ArrayList<GPoint> gPoints) private doubledistSq(CartesianPoint p1, CartesianPoint p2) private doubleprivate doubleprivate voidremoveEdge(Map<Delaunay.EdgeKey, List<Integer>> edgeToTris, int a, int b, int triIdx) private booleanprivate doublesignedArea(List<CartesianPoint> pts) Methods inherited from class TriangulationMethod
verifyCoplanar
-
Constructor Details
-
Delaunay
public Delaunay()
-
-
Method Details
-
apply
@NotNull public TriangulationMethod.Triangulated apply(@NotNull ArrayList<GPoint> gPoints) throws TriangulationMethod.InvalidTriangulationException - Specified by:
applyin classTriangulationMethod- Throws:
TriangulationMethod.InvalidTriangulationException
-
createTri
@NotNull @Contract("_, _, _, _, _, _ -> new") private TriangulationMethod.Tri createTri(int a, int b, int c, boolean targetCCW, @NotNull ArrayList<CartesianPoint> pts2d, @NotNull ArrayList<GPoint> gPoints) -
addEdge
private void addEdge(@NotNull Map<Delaunay.EdgeKey, List<Integer>> edgeToTris, int a, int b, int triIdx) -
removeEdge
private void removeEdge(@NotNull Map<Delaunay.EdgeKey, List<Integer>> edgeToTris, int a, int b, int triIdx) -
checkAndQueueEdge
private void checkAndQueueEdge(@NotNull Map<Delaunay.EdgeKey, List<Integer>> edgeToTris, Deque<Delaunay.EdgeKey> queue, int a, int b) -
minAngle
-
distSq
-
signedArea
-
segmentsStrictlyIntersect
private boolean segmentsStrictlyIntersect(CartesianPoint a, CartesianPoint b, CartesianPoint c, CartesianPoint d) -
orient2d
@Contract(pure=true) private double orient2d(@NotNull CartesianPoint a, @NotNull CartesianPoint b, @NotNull CartesianPoint c)
-