// ----------------------------------------------------------------------- // // Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- namespace UnityEngine.U2D.Animation.TriangleNet .Geometry { using System; using System.Collections.Generic; /// /// Polygon interface. /// internal interface IPolygon { /// /// Gets the vertices of the polygon. /// List Points { get; } /// /// Gets the segments of the polygon. /// List Segments { get; } /// /// Gets a list of points defining the holes of the polygon. /// List Holes { get; } /// /// Gets a list of pointers defining the regions of the polygon. /// List Regions { get; } /// /// Gets or sets a value indicating whether the vertices have marks or not. /// bool HasPointMarkers { get; set; } /// /// Gets or sets a value indicating whether the segments have marks or not. /// bool HasSegmentMarkers { get; set; } [Obsolete("Use polygon.Add(contour) method instead.")] void AddContour(IEnumerable points, int marker, bool hole, bool convex); [Obsolete("Use polygon.Add(contour) method instead.")] void AddContour(IEnumerable points, int marker, Point hole); /// /// Compute the bounds of the polygon. /// /// Rectangle defining an axis-aligned bounding box. Rectangle Bounds(); /// /// Add a vertex to the polygon. /// /// The vertex to insert. void Add(Vertex vertex); /// /// Add a segment to the polygon. /// /// The segment to insert. /// If true, both endpoints will be added to the points list. void Add(ISegment segment, bool insert = false); /// /// Add a segment to the polygon. /// /// The segment to insert. /// The index of the segment endpoint to add to the points list (must be 0 or 1). void Add(ISegment segment, int index); /// /// Add a contour to the polygon. /// /// The contour to insert. /// Treat contour as a hole. void Add(Contour contour, bool hole = false); /// /// Add a contour to the polygon. /// /// The contour to insert. /// Point inside the contour, making it a hole. void Add(Contour contour, Point hole); } }