#include <points.H>
Inheritance diagram for mlib::NDCline:
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 NDCpt &p, const NDCvec &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 NDCpt &p1, const NDCpt &p2) | |
Constructor that creates the line going through points p1 and p2 . Alternately creates a line segment with endpoints p1 and p2 . | |
const NDCpt & | point () const |
NDCpt & | point () |
const NDCvec & | vector () const |
NDCvec & | vector () |
bool | is_valid () const |
Is the line valid (i.e. has a vector with non-zero length). | |
NDCpt | endpt () const |
Returns the second endpoint of the line when treated as a line segment. | |
NDCpt | 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< NDCline, NDCpt, NDCvec > &l) const |
Are the two line's points and vectors exactly equal? | |
double | dist (const NDCpt &p) const |
Returns the distance from the point to the line. | |
NDCpt | project (const NDCpt &p) const |
Returns closest point on line to given point p. | |
NDCpt | project_to_seg (const NDCpt &p) const |
Finds the nearest point on this line segment to the given point. | |
NDCpt | project_to_seg (const NDCline &l) const |
Finds the nearest point on this line segment to the given line. | |
NDCpt | reflection (const NDCpt &p) const |
NDCpt | intersect (const NDCline &l) const |
Returns the closest point on this line to the given line l. | |
bool | intersect_segs (const NDCline &l, NDCpt &inter) const |
Returns true if this line, treated as a segment, intersects the given line, also treated as a segment. | |
bool | intersect_segs (const NDCline &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 NDCline &l, NDCpt &inter) const |
Returns true if this line, treated as a segment, intersects the given line, also treated as a line. | |
Constructors | |
NDCline () | |
NDCline (CNDCpt &p, CNDCvec &v) | |
NDCline (CNDCpt &p1, CNDCpt &p2) | |
Protected Attributes | |
NDCpt | _point |
NDCvec | _vector |
Definition at line 1017 of file points.H.
|
|
|
|
|
|
|
Returns the distance from the point to the line. If vector is null (line is not valid) returns distance to _point. Definition at line 104 of file line.H. References mlib::Line< L, P, V >::project(). |
|
Returns the second endpoint of the line when treated as a line segment.
Definition at line 77 of file line.H. References mlib::Line< L, P, V >::_point, and mlib::Line< L, P, V >::_vector. |
|
Returns the closest point on this line to the given line l. For 3D lines it's rare that the 2 lines actually intersect, so this is not really named well. Definition at line 162 of file line.H. References mlib::gEpsAbsMath, mlib::Line< L, P, V >::point(), and mlib::Line< L, P, V >::vector(). |
|
Returns true if this line, treated as a segment, intersects the given line, also treated as a line. On success, also fills in the intersection point. Definition at line 210 of file line.H. References mlib::Line< L, P, V >::intersect(), mlib::Line< L, P, V >::point(), and mlib::Line< L, P, V >::vector(). |
|
Same as Line<L,P,V>::intersect_segLine(const L& l, P& inter) except without the argument to return the intersection point.
Definition at line 229 of file line.H. References mlib::Line< L, P, V >::intersect_segs(). |
|
Returns true if this line, treated as a segment, intersects the given line, also treated as a segment. On success, also fills in the intersection point. Definition at line 187 of file line.H. References mlib::Line< L, P, V >::intersect(), mlib::Line< L, P, V >::point(), and mlib::Line< L, P, V >::vector(). |
|
Is the line valid (i.e. has a vector with non-zero length).
Definition at line 73 of file line.H. References mlib::Line< L, P, V >::_vector. |
|
Returns the length of the line when treated as a line segment.
Definition at line 84 of file line.H. References mlib::Line< L, P, V >::_vector. |
|
Constructor that creates the line going through points
|
|
Constructor that creates a line containing the point
|
|
Default constructor. Creates a line with the results of the default constructors for the point and vector classes used. This most likely creates an invalid line (i.e. has a zero length vector) at the origin. |
|
Returns the midpoint of the line when treated as a line segment.
Definition at line 81 of file line.H. References mlib::Line< L, P, V >::_point, and mlib::Line< L, P, V >::_vector. |
|
Are the two line's points and vectors exactly equal?
Definition at line 92 of file line.H. References mlib::Line< L, P, V >::_point, and mlib::Line< L, P, V >::_vector. |
|
Definition at line 63 of file line.H. References mlib::Line< L, P, V >::_point. |
|
Definition at line 62 of file line.H. References mlib::Line< L, P, V >::_point. |
|
Returns closest point on line to given point p. If vector is null (line is not valid) returns _point. Definition at line 116 of file line.H. References mlib::Line< L, P, V >::_point, and mlib::Line< L, P, V >::_vector. |
|
Finds the nearest point on this line segment to the given line. If this line is invalid, returns first endpoint. Definition at line 134 of file line.H. References mlib::Line< L, P, V >::intersect(), and mlib::Line< L, P, V >::project_to_seg(). |
|
Finds the nearest point on this line segment to the given point. If this line is invalid, returns first endpoint. Definition at line 124 of file line.H. References mlib::Line< L, P, V >::_point, mlib::Line< L, P, V >::_vector, and mlib::epsAbsSqrdMath(). |
|
Definition at line 144 of file line.H. References mlib::Line< L, P, V >::endpt(), mlib::Line< L, P, V >::project(), and mlib::Line< L, P, V >::vector(). |
|
Definition at line 65 of file line.H. References mlib::Line< L, P, V >::_vector. |
|
Definition at line 64 of file line.H. References mlib::Line< L, P, V >::_vector. |
|
|
|
|