#include <vgl_line_segment_2d.h>
Definition at line 23 of file vgl_line_segment_2d.h.
Public Member Functions | |
| vgl_line_segment_2d () | |
| Default constructor - does not initialise!. | |
| vgl_line_segment_2d (vgl_line_segment_2d< Type > const &l) | |
| Copy constructor. | |
| vgl_line_segment_2d (vgl_point_2d< Type > const &p1, vgl_point_2d< Type > const &p2) | |
| Construct from two end points. | |
| ~vgl_line_segment_2d () | |
| Destructor. | |
| vgl_point_2d< Type > | point1 () const |
| One end-point of the line segment. | |
| vgl_point_2d< Type > | point2 () const |
| The other end-point of the line segment. | |
| bool | operator== (vgl_line_segment_2d< Type > const &l) const |
| The equality comparison operator. | |
| bool | operator!= (vgl_line_segment_2d< Type >const &other) const |
| The inequality comparison operator. | |
| Type | a () const |
| Parameter a of line a*x + b*y + c = 0. | |
| Type | b () const |
| Parameter b of line a*x + b*y + c = 0. | |
| Type | c () const |
| Parameter c of line a*x + b*y + c = 0. | |
| vgl_vector_2d< double > | direction () const |
| unit vector describing line direction. | |
| vgl_vector_2d< double > | normal () const |
| unit vector orthogonal to line. | |
| double | slope_radians () const |
| angle with the oriented horizontal line y=0, measured in radians. | |
| double | slope_degrees () const |
| angle with the oriented horizontal line y=0, measured in 360-degrees. | |
| void | set (vgl_point_2d< Type > const &p1, vgl_point_2d< Type > const &p2) |
| Assignment. | |
Private Attributes | |
| vgl_point_2d< Type > | point1_ |
| One end of line segment. | |
| vgl_point_2d< Type > | point2_ |
| The other end of the line segment. | |
Related Functions | |
| (Note that these are not member functions.) | |
| double | vgl_distance (vgl_line_segment_2d< T > const &l, vgl_point_2d< T > const &p) |
| Closest distance from a point p to a line segment l in 2D. | |
| vcl_ostream & | operator<< (vcl_ostream &s, const vgl_line_segment_2d< Type > &p) |
| Write to stream. | |
| vcl_istream & | operator>> (vcl_istream &is, vgl_line_segment_2d< Type > &p) |
| Read from stream. | |
| bool | vgl_lineseg_test_line (vgl_line_2d< T > const &l1, vgl_line_segment_2d< T > const &l2) |
| true if the line meets the linesegment. | |
| bool | vgl_lineseg_test_lineseg (vgl_line_segment_2d< T > const &l1, vgl_line_segment_2d< T > const &l2) |
| return true if the two linesegments meet. | |
|
|||||||||
|
Default constructor - does not initialise!.
Definition at line 32 of file vgl_line_segment_2d.h. |
|
||||||||||
|
Copy constructor.
Definition at line 35 of file vgl_line_segment_2d.h. |
|
||||||||||||||||
|
Construct from two end points.
Definition at line 39 of file vgl_line_segment_2d.h. |
|
|||||||||
|
Destructor.
Definition at line 44 of file vgl_line_segment_2d.h. |
|
|||||||||
|
Parameter a of line a*x + b*y + c = 0.
Definition at line 25 of file vgl_line_segment_2d.txx. |
|
|||||||||
|
Parameter b of line a*x + b*y + c = 0.
Definition at line 31 of file vgl_line_segment_2d.txx. |
|
|||||||||
|
Parameter c of line a*x + b*y + c = 0.
Definition at line 37 of file vgl_line_segment_2d.txx. |
|
|||||||||
|
unit vector describing line direction.
Definition at line 43 of file vgl_line_segment_2d.txx. |
|
|||||||||
|
unit vector orthogonal to line.
Definition at line 50 of file vgl_line_segment_2d.txx. |
|
||||||||||
|
The inequality comparison operator.
Definition at line 58 of file vgl_line_segment_2d.h. |
|
||||||||||
|
The equality comparison operator.
Definition at line 53 of file vgl_line_segment_2d.h. |
|
|||||||||
|
One end-point of the line segment.
Definition at line 47 of file vgl_line_segment_2d.h. |
|
|||||||||
|
The other end-point of the line segment.
Definition at line 50 of file vgl_line_segment_2d.h. |
|
||||||||||||||||
|
Assignment.
Definition at line 86 of file vgl_line_segment_2d.h. |
|
|||||||||
|
angle with the oriented horizontal line y=0, measured in 360-degrees. Returns values between -180 and 180. Definition at line 57 of file vgl_line_segment_2d.txx. |
|
|||||||||
|
angle with the oriented horizontal line y=0, measured in radians. Returns values between -pi and pi. Definition at line 72 of file vgl_line_segment_2d.txx. |
|
||||||||||||||||
|
Write to stream.
Definition at line 10 of file vgl_line_segment_2d.txx. |
|
||||||||||||||||
|
Read from stream.
Definition at line 16 of file vgl_line_segment_2d.txx. |
|
||||||||||||||||
|
Closest distance from a point p to a line segment l in 2D.
Definition at line 309 of file vgl_distance.txx. |
|
||||||||||||||||
|
true if the line meets the linesegment. End points are considered to belong to a line segment. Definition at line 35 of file vgl_lineseg_test.h. |
|
||||||||||||||||
|
return true if the two linesegments meet. End points are considered to belong to a line segment. Definition at line 48 of file vgl_lineseg_test.h. |
|
|||||
|
One end of line segment.
Definition at line 26 of file vgl_line_segment_2d.h. |
|
|||||
|
The other end of the line segment.
Definition at line 28 of file vgl_line_segment_2d.h. |
1.4.4