Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Sealed class: RT.Util.Geometry.PolygonD

Summary

This class encapsulates double-precision polygons.

Constructors

PolygonD(IEnumerable<PointD> vertices)
Initializes a polygon from a given list of vertices.
PolygonD(params PointD[] vertices)
Initializes a polygon from a given array of vertices.

Instance methods

double Determines the area of the current PolygonD.
BoundingBoxDReturns the bounding box of this polygon.
PointDCalculates the centroid of this polygon.
bool
ContainsPoint(Point point)
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.