Module org.dyn4j

Class MonotonePolygon<E>

  • Type Parameters:
    E - the vertex data type

    final class MonotonePolygon<E>
    extends java.lang.Object
    Represents a monotone polygon.

    A monotone polygon can be triangulated in O(n) time. Algorithms within this package may decompose a polygon into monotone pieces, which are then used to decompose into triangles.

    Since:
    2.2.0
    Version:
    3.2.0
    Author:
    William Bittle
    • Constructor Detail

      • MonotonePolygon

        public MonotonePolygon​(MonotonePolygonType type,
                               java.util.List<MonotoneVertex<E>> vertices)
        Full constructor.
        Parameters:
        type - the monotone polygon type
        vertices - the sorted array of vertices; descending order
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object