|
Public Member Functions |
| Line () |
| Default constructor. Creates a line with the results of the default constructors for the point and vector classes used.
|
| Line (const PIXEL &p, const VEXEL &v) |
| Constructor that creates a line containing the point p and moving along the direction of vector v . Alternately creates a line segment with p as one endpoint and ( p + v ) as the other endpoint.
|
| Line (const PIXEL &p1, const PIXEL &p2) |
| Constructor that creates the line going through points p1 and p2 . Alternately creates a line segment with endpoints p1 and p2 .
|
const PIXEL & | point () const |
PIXEL & | point () |
const VEXEL & | vector () const |
VEXEL & | vector () |
bool | is_valid () const |
| Is the line valid (i.e. has a vector with non-zero length).
|
PIXEL | endpt () const |
| Returns the second endpoint of the line when treated as a line segment.
|
PIXEL | midpt () const |
| Returns the midpoint of the line when treated as a line segment.
|
double | length () const |
| Returns the length of the line when treated as a line segment.
|
bool | operator== (const Line< PIXELline, PIXEL, VEXEL > &l) const |
| Are the two line's points and vectors exactly equal?
|
double | dist (const PIXEL &p) const |
| Returns the distance from the point to the line.
|
PIXEL | project (const PIXEL &p) const |
| Returns closest point on line to given point p.
|
PIXEL | project_to_seg (const PIXEL &p) const |
| Finds the nearest point on this line segment to the given point.
|
PIXEL | project_to_seg (const PIXELline &l) const |
| Finds the nearest point on this line segment to the given line.
|
PIXEL | reflection (const PIXEL &p) const |
PIXEL | intersect (const PIXELline &l) const |
| Returns the closest point on this line to the given line l.
|
bool | intersect_segs (const PIXELline &l, PIXEL &inter) const |
| Returns true if this line, treated as a segment, intersects the given line, also treated as a segment.
|
bool | intersect_segs (const PIXELline &l) const |
| Same as Line<L,P,V>::intersect_segLine(const L& l, P& inter) except without the argument to return the intersection point.
|
bool | intersect_seg_line (const PIXELline &l, PIXEL &inter) const |
| Returns true if this line, treated as a segment, intersects the given line, also treated as a line.
|
|
| PIXELline () |
| PIXELline (CPIXEL &p, CVEXEL &v) |
| PIXELline (CPIXEL &p1, CPIXEL &p2) |
Protected Attributes |
PIXEL | _point |
VEXEL | _vector |