Class Clipper | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Clipper

    Inheritance
    System.Object
    ClipperBase
    Clipper
    Inherited Members
    ClipperBase.loRange
    ClipperBase.hiRange
    ClipperBase.PreserveCollinear
    ClipperBase.Swap(Int64, Int64)
    ClipperBase.Clear()
    ClipperBase.AddPath(List<IntPoint>, PolyType, Boolean)
    ClipperBase.AddPaths(List<List<IntPoint>>, PolyType, Boolean)
    ClipperBase.GetBounds(List<List<IntPoint>>)
    Namespace: UnityEngine.U2D.SpriteShapeClipperLib
    Syntax
    public class Clipper : ClipperBase

    Constructors

    Clipper(Int32)

    Declaration
    public Clipper(int InitOptions = 0)
    Parameters
    Type Name Description
    System.Int32 InitOptions

    Fields

    ioPreserveCollinear

    Declaration
    public const int ioPreserveCollinear = 4
    Field Value
    Type Description
    System.Int32

    ioReverseSolution

    Declaration
    public const int ioReverseSolution = 1
    Field Value
    Type Description
    System.Int32

    ioStrictlySimple

    Declaration
    public const int ioStrictlySimple = 2
    Field Value
    Type Description
    System.Int32

    Properties

    ReverseSolution

    Declaration
    public bool ReverseSolution { get; set; }
    Property Value
    Type Description
    System.Boolean

    StrictlySimple

    Declaration
    public bool StrictlySimple { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Area(List<IntPoint>)

    Declaration
    public static double Area(List<IntPoint> poly)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IntPoint> poly
    Returns
    Type Description
    System.Double

    CleanPolygon(List<IntPoint>, Double)

    Declaration
    public static List<IntPoint> CleanPolygon(List<IntPoint> path, double distance = 1.415)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IntPoint> path
    System.Double distance
    Returns
    Type Description
    System.Collections.Generic.List<IntPoint>

    CleanPolygons(List<List<IntPoint>>, Double)

    Declaration
    public static List<List<IntPoint>> CleanPolygons(List<List<IntPoint>> polys, double distance = 1.415)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>> polys
    System.Double distance
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    ClosedPathsFromPolyTree(PolyTree)

    Declaration
    public static List<List<IntPoint>> ClosedPathsFromPolyTree(PolyTree polytree)
    Parameters
    Type Name Description
    PolyTree polytree
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    Execute(ClipType, List<List<IntPoint>>, PolyFillType)

    Declaration
    public bool Execute(ClipType clipType, List<List<IntPoint>> solution, PolyFillType FillType = PolyFillType.pftEvenOdd)
    Parameters
    Type Name Description
    ClipType clipType
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>> solution
    PolyFillType FillType
    Returns
    Type Description
    System.Boolean

    Execute(ClipType, List<List<IntPoint>>, PolyFillType, PolyFillType)

    Declaration
    public bool Execute(ClipType clipType, List<List<IntPoint>> solution, PolyFillType subjFillType, PolyFillType clipFillType)
    Parameters
    Type Name Description
    ClipType clipType
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>> solution
    PolyFillType subjFillType
    PolyFillType clipFillType
    Returns
    Type Description
    System.Boolean

    Execute(ClipType, PolyTree, PolyFillType)

    Declaration
    public bool Execute(ClipType clipType, PolyTree polytree, PolyFillType FillType = PolyFillType.pftEvenOdd)
    Parameters
    Type Name Description
    ClipType clipType
    PolyTree polytree
    PolyFillType FillType
    Returns
    Type Description
    System.Boolean

    Execute(ClipType, PolyTree, PolyFillType, PolyFillType)

    Declaration
    public bool Execute(ClipType clipType, PolyTree polytree, PolyFillType subjFillType, PolyFillType clipFillType)
    Parameters
    Type Name Description
    ClipType clipType
    PolyTree polytree
    PolyFillType subjFillType
    PolyFillType clipFillType
    Returns
    Type Description
    System.Boolean

    MinkowskiDiff(List<IntPoint>, List<IntPoint>)

    Declaration
    public static List<List<IntPoint>> MinkowskiDiff(List<IntPoint> poly1, List<IntPoint> poly2)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IntPoint> poly1
    System.Collections.Generic.List<IntPoint> poly2
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    MinkowskiSum(List<IntPoint>, List<List<IntPoint>>, Boolean)

    Declaration
    public static List<List<IntPoint>> MinkowskiSum(List<IntPoint> pattern, List<List<IntPoint>> paths, bool pathIsClosed)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IntPoint> pattern
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>> paths
    System.Boolean pathIsClosed
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    MinkowskiSum(List<IntPoint>, List<IntPoint>, Boolean)

    Declaration
    public static List<List<IntPoint>> MinkowskiSum(List<IntPoint> pattern, List<IntPoint> path, bool pathIsClosed)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IntPoint> pattern
    System.Collections.Generic.List<IntPoint> path
    System.Boolean pathIsClosed
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    OpenPathsFromPolyTree(PolyTree)

    Declaration
    public static List<List<IntPoint>> OpenPathsFromPolyTree(PolyTree polytree)
    Parameters
    Type Name Description
    PolyTree polytree
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    Orientation(List<IntPoint>)

    Declaration
    public static bool Orientation(List<IntPoint> poly)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IntPoint> poly
    Returns
    Type Description
    System.Boolean

    PointInPolygon(IntPoint, List<IntPoint>)

    Declaration
    public static int PointInPolygon(IntPoint pt, List<IntPoint> path)
    Parameters
    Type Name Description
    IntPoint pt
    System.Collections.Generic.List<IntPoint> path
    Returns
    Type Description
    System.Int32

    PolyTreeToPaths(PolyTree)

    Declaration
    public static List<List<IntPoint>> PolyTreeToPaths(PolyTree polytree)
    Parameters
    Type Name Description
    PolyTree polytree
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    ReversePaths(List<List<IntPoint>>)

    Declaration
    public static void ReversePaths(List<List<IntPoint>> polys)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>> polys

    SimplifyPolygon(List<IntPoint>, PolyFillType)

    Declaration
    public static List<List<IntPoint>> SimplifyPolygon(List<IntPoint> poly, PolyFillType fillType = PolyFillType.pftEvenOdd)
    Parameters
    Type Name Description
    System.Collections.Generic.List<IntPoint> poly
    PolyFillType fillType
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>

    SimplifyPolygons(List<List<IntPoint>>, PolyFillType)

    Declaration
    public static List<List<IntPoint>> SimplifyPolygons(List<List<IntPoint>> polys, PolyFillType fillType = PolyFillType.pftEvenOdd)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>> polys
    PolyFillType fillType
    Returns
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<IntPoint>>
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023