Module org.dyn4j

Interface Triangulator

  • All Known Implementing Classes:
    EarClipping, SweepLine

    public interface Triangulator
    Represents an algorithm to triangulate a given polygon (as a list of points) into Triangles.
    Since:
    3.1.9
    Version:
    3.1.9
    Author:
    William Bittle
    • Method Detail

      • triangulate

        java.util.List<Triangle> triangulate​(Vector2... points)
        Performs the triangulation on the given polygon returning a list of Triangles.
        Parameters:
        points - the polygon vertices
        Returns:
        List<Triangle>
        Throws:
        java.lang.NullPointerException - if points is null or contains null points
        java.lang.IllegalArgumentException - if points contains less than 4 points