manifold-3d
    Preparing search index...

    Variable triangulate

    triangulate: (
        polygons: Polygons,
        epsilon?: number,
        allowConvex?: boolean,
    ) => Vec3[]

    Type declaration

      • (polygons: Polygons, epsilon?: number, allowConvex?: boolean): Vec3[]
      • Triangulates a set of /epsilon-valid polygons.

        Parameters

        • polygons: Polygons

          The set of polygons, wound CCW and representing multiple polygons and/or holes.

        • Optionalepsilon: number

          The value of epsilon, bounding the uncertainty of the input.

        • OptionalallowConvex: boolean

          If true (default), the triangulator will use a fast triangulation if the input is convex, falling back to ear-clipping if not. The triangle quality may be lower, so set to false to disable this optimization.

        Returns Vec3[]

        The triangles, referencing the original polygon points in order.