#include <vgl_line_2d.h>
Inheritance diagram for vgl_line_2d< Type >:

An interface for the line coefficients, [a,b,c], is provided in terms of the standard implicit line equation: a*x + b*y + c = 0
Definition at line 33 of file vgl_line_2d.h.
Public Member Functions | |
| vgl_line_2d () | |
| Default constructor (Line 1.y==0, the X axis). | |
| vgl_line_2d (Type a, Type b, Type c) | |
| Construct a vgl_line_2d from its equation, three Types. | |
| vgl_line_2d (const Type v[3]) | |
| Construct from its equation, a 3-vector. | |
| vgl_line_2d (vgl_homg_line_2d< Type > const &l) | |
| Construct from homogeneous description of line. | |
| vgl_line_2d (vgl_point_2d< Type > const &p1, vgl_point_2d< Type > const &p2) | |
| Construct from two distinct points (join). | |
| bool | operator== (vgl_line_2d< Type > const &l) const |
| the comparison operator. | |
| bool | operator!= (vgl_line_2d< Type >const &other) const |
| double | slope_radians () const |
| angle with the horizontal line y=0, measured in radians. | |
| double | slope_degrees () const |
| angle with the horizontal line y=0, measured in 360-degrees. | |
| 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. | |
| bool | normalize () |
| normalize the line coefficients s.t. a^2 + b^2 = 1. | |
| void | set (Type a, Type b, Type c) |
| Set a b c. | |
| bool | ideal (Type=(Type) 0) const |
| Return true iff this line is the line at infinity. | |
| void | get_two_points (vgl_point_2d< Type > &p1, vgl_point_2d< Type > &p2) const |
| Get two points on the line; normally the intersection with X and Y axes. | |
Private Attributes | |
| Type | a_ |
| Type | b_ |
| Type | c_ |
Related Functions | |
| (Note that these are not member functions.) | |
| vgl_point_2d< T > | vgl_closest_point (vgl_line_2d< T > const &l, vgl_point_2d< T > const &p) |
| Return the point on the given line closest to the given point. | |
| double | vgl_distance_origin (vgl_line_2d< T > const &l) |
| find the shortest distance of the line to the origin. | |
| double | vgl_distance (vgl_line_2d< T > const &l, vgl_point_2d< T > const &p) |
| return the perpendicular distance from a point to a line in 2D. | |
|
|||||||||
|
Default constructor (Line 1.y==0, the X axis).
Definition at line 42 of file vgl_line_2d.h. |
|
||||||||||||||||||||
|
Construct a vgl_line_2d from its equation, three Types. The values of a and b should not be both zero. Definition at line 46 of file vgl_line_2d.h. |
|
||||||||||
|
Construct from its equation, a 3-vector. The values v[0] and v[1] should not be both zero. Definition at line 50 of file vgl_line_2d.h. |
|
||||||||||
|
Construct from homogeneous description of line. The line l should not be the line at infinity. Definition at line 25 of file vgl_line_2d.txx. |
|
||||||||||||||||
|
Construct from two distinct points (join). The two points must be distinct! Definition at line 16 of file vgl_line_2d.txx. |
|
|||||||||
|
Parameter a of line a*x + b*y + c = 0.
Definition at line 93 of file vgl_line_2d.h. |
|
|||||||||
|
Parameter b of line a*x + b*y + c = 0.
Definition at line 95 of file vgl_line_2d.h. |
|
|||||||||
|
Parameter c of line a*x + b*y + c = 0.
Definition at line 97 of file vgl_line_2d.h. |
|
|||||||||
|
unit vector describing line direction.
Definition at line 100 of file vgl_line_2d.h. |
|
||||||||||||||||
|
Get two points on the line; normally the intersection with X and Y axes. When the line is parallel to one of these, the point with y=1 or x=1, resp. are taken. When the line goes through the origin, the second point is (b, -a). Definition at line 38 of file vgl_line_2d.txx. |
|
||||||||||
|
Return true iff this line is the line at infinity. This always returns "false" Definition at line 117 of file vgl_line_2d.h. |
|
|||||||||
|
unit vector orthogonal to line.
Definition at line 104 of file vgl_line_2d.h. |
|
|||||||||
|
normalize the line coefficients s.t. a^2 + b^2 = 1.
Definition at line 67 of file vgl_line_2d.txx. |
|
||||||||||
|
Definition at line 76 of file vgl_line_2d.h. |
|
||||||||||
|
the comparison operator.
Definition at line 70 of file vgl_line_2d.h. |
|
||||||||||||||||||||
|
Set a b c. The values of a and b should not be both zero. Note that it does not make sense to set a, b or c separately Definition at line 113 of file vgl_line_2d.h. |
|
|||||||||
|
angle with the horizontal line y=0, measured in 360-degrees. Returns values between -180 and 180, i.e., the lines x-y=0 and y-x=0 return different values (45 and -135 respectively) although these lines are identical. Definition at line 48 of file vgl_line_2d.txx. |
|
|||||||||
|
angle with the horizontal line y=0, measured in radians. Returns values between -pi and pi, i.e., the lines x-y=0 and y-x=0 return different values (pi/4 and -3pi/4 respectively) although these lines are identical. Definition at line 61 of file vgl_line_2d.txx. |
|
||||||||||||||||
|
Return the point on the given line closest to the given point.
|
|
||||||||||||||||
|
return the perpendicular distance from a point to a line in 2D.
|
|
||||||||||
|
find the shortest distance of the line to the origin.
|
|
|||||
|
Definition at line 36 of file vgl_line_2d.h. |
|
|||||
|
Definition at line 37 of file vgl_line_2d.h. |
|
|||||
|
Definition at line 38 of file vgl_line_2d.h. |
1.4.4