|
Public Member Functions |
|
| Segment (double ax, double ay, double bx, double by) |
| | Constructor, create segment from point (ax, ay) to point (bx, by).
|
|
| Segment (double array[4]) |
| | Constructor, create segment from point (array[0], array[1]) to point (array[2], array[3]).
|
|
| Segment (const Point &p1, const Point &p2) |
| | Constructor, create segment from point p1 to point p2.
|
|
double | dist (const Point &p) const |
| | Compute the distance of p to this segment.
|
|
bool | doesIntersect (const Segment &o) const |
| | Return true if o intersect this segment.
|
Public Attributes |
|
Point | a |
| | Start and stop of the segment.
|
|
Point | b |
| | Start and stop of the segment.
|