Public Member Functions | |
| unsigned int | NumTotalVertices () const |
| bool | ComputeExtents (DRECT &rect) const |
| bool | ContainsPoint (const DPoint2 &p) const |
| void | GetAsDLine2 (DLine2 &dline) const |
| int | WhichRing (int &iVtxNum) const |
| void | NearestPoint (const DPoint2 &Point, int &iIndex, double &dist) const |
| bool | NearestSegment (const DPoint2 &Point, int &iIndex, double &dist, DPoint2 &Intersection) const |
| void | Add (const DPoint2 &p) |
| void | Mult (double factor) |
| void | ReverseOrder () |
| void | InsertPointAfter (int iInsertAfter, const DPoint2 &Point) |
| void | RemovePoint (int N) |
| int | RemoveDegeneratePoints (double dEpsilon) |
In most usage, there should be a consistency in the vertex ordering: the 'outside' ring should be counter-clockwise, and the 'inside' ring(s) should be clockwise.
|
|
Add the given amount to all coordinates of the polygon. Spatially, this offsets the location of the polygon. |
|
|
Normally the polygon is stored as a series of rings. Sometimes it is necessary to access the polygon as a single array of points instead. This method fills a provided DLine2 with all the points of all rings of the polygon. |
|
||||||||||||
|
The insertion point can be on the outer ring, or any inner ring. |
|
|
Multiplies (scales) all the coordinates of the polygon. |
|
||||||||||||||||
|
Return the nearest point (of the points which make up the line). This is not the same as the closest place on the line, which may lie between the defining points; use NearestSegment to find that.
|
|
||||||||||||||||||||
|
Returns the location of the closest point on the polygon to a given point.
|
|
|
The Nth point can be on the outer ring, or any inner ring. |
1.4.5