Summary
This class encapsulates double-precision polygons.
Constructors
|
Initializes a polygon from a given list of vertices. |
|
Initializes a polygon from a given array of vertices. |
Instance methods
double | |
Determines the area of the current PolygonD. |
BoundingBoxD | | Returns the bounding box of this polygon. |
PointD | | Calculates the centroid of this polygon. |
bool | |
Determines whether the current PolygonD contains the specified point. |
bool | |
Determines whether the current PolygonD contains the specified point. If the point lies exactly
on one of the polygon edges, it is considered to be contained in the polygon. |
bool | |
Determines whether this polygon is convex or concave. Throws if all vertices lie on a straight line, or if
there are 2 or fewer vertices. |
IEnumerable<EdgeD> | | Returns an array containing all the edges of this polygon. |
PointF[] | |
Converts the current PolygonD to an array of PointF structures. Note that this
conversion loses precision. |
Instance properties
IEnumerable<EdgeD> | |
Enumerates the edges of this polygon in vertex order. The enumerable is "live" and reflects any changes to
PolygonD.Vertices immediately. |
List<PointD> | | Returns a list of vertices of the polygon. |