Interface Triangulator


  • public interface Triangulator
    Interface to the triangulation algorithms provided A triangulation of 2D outlines where you can provides an easy one or more outlines to be triangulated example usage: addCurve(o1); addCurve(o2); addCurve(o3); generate(); reset();
    See Also:
    Outline, Triangulation
    • Method Detail

      • setComplexShape

        void setComplexShape​(boolean complex)
        Mark the to be triangulated shape complex or non-complex.

        Complex shapes may cause further processing costs, e.g. intersection tests to overcome self-intersecting shapes.

        Default is assuming a simple non-complex shape.

      • addCurve

        void addCurve​(List<Triangle> sink,
                      Outline outline,
                      float sharpness)
        Add a curve to the list of Outlines describing the shape
        Parameters:
        sink - list where the generated triangles will be added
        outline - a bounding Outline
        sharpness - TODO
      • generate

        void generate​(List<Triangle> sink)
        Generate the triangulation of the provided List of Outlines
        Parameters:
        sink - list where the generated triangles will be added
      • reset

        void reset()
        Reset the triangulation to initial state Clearing cached data