
Public Member Functions | |
| DLine2 (int size) | |
| DLine2 (const DLine2 &ref) | |
| DLine2 & | operator= (const DLine2 &v) |
| DLine2 & | operator= (const FLine2 &v) |
| void | Add (const DPoint2 &p) |
| Add a given offset to all points. | |
| void | Mult (double factor) |
| Multiply all points by a given factor. | |
| void | InsertPointAfter (int iInsertAfter, const DPoint2 &Point) |
| void | RemovePoint (int i) |
| void | ReverseOrder () |
| int | RemoveDegeneratePoints (double dEpsilon) |
| bool | ContainsPoint (const DPoint2 &p) const |
| double | SegmentLength (unsigned int i) const |
| void | NearestPoint (const DPoint2 &Point, int &iIndex, double &dist) const |
| bool | NearestSegment (const DPoint2 &Point, int &iIndex, double &dist, DPoint2 &Intersection) const |
| bool | IsConvex () const |
| DPoint2 & | GetSafePoint (int index) const |
| void | SetSafePoint (int index, const DPoint2 &p) |
| double | Length () const |
| DPoint2 | Centroid () const |
| double | Area () const |
|
|
With the assumption that this set of points defines a closed polygon, test whether the polygon contains a given point. Since a simple array of points being interpreted as a polygon, this means the data may be concave or convex, but not contains holes. |
|
|
Get a point on the line, safely wrapping around to the end or beginning for index values that are out of range. |
|
||||||||||||||||
|
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 line to a given point.
|
|
|
Given four points A B C D, where B and C are identical, then this line is a triangle not a rectangle. Remove the identical points to produce A B D. Points are identical if they are within dEpsilon of each other. |
|
|
Return the length of the N'th segment in the line, which is the distance between points N and N+1. If the length of the last segment is requested, a closed polygon is assumed. |
1.4.5