Module org.dyn4j

Interface Decomposer

  • All Known Implementing Classes:
    Bayazit, EarClipping, SweepLine

    public interface Decomposer
    Represents an algorithm to decompose a given polygon (as a list of points) into Convex pieces.
    Since:
    2.2.0
    Version:
    2.2.3
    Author:
    William Bittle
    • Method Detail

      • decompose

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