Module org.dyn4j

Class Bayazit

  • All Implemented Interfaces:
    Decomposer

    public class Bayazit
    extends Object
    implements Decomposer
    Implementation of the Bayazit convex decomposition algorithm for simple polygons.

    This algorithm is a O(nr) complexity algorithm where n is the number of input vertices and r is the number of output convex polygons. This algorithm can achieve optimal decompositions, however this is not guaranteed.

    Since:
    2.2.0
    Version:
    3.1.10
    Author:
    William Bittle
    See Also:
    Bayazit
    • Constructor Detail

      • Bayazit

        public Bayazit()
    • Method Detail

      • decompose

        public List<Convex> decompose​(Vector2... points)
        Description copied from interface: Decomposer
        Performs the decomposition on the given polygon returning a list of Convex shapes.
        Specified by:
        decompose in interface Decomposer
        Parameters:
        points - the polygon vertices
        Returns:
        List<Convex>