Represents a homogeneous 3D line using two points. More...
#include <vgl_fwd.h>
Public Member Functions | |
| vgl_homg_line_3d_2_points (void) | |
| Default constructor with (0,0,0,1) and (1,0,0,0), which is the line y=z=0. More... | |
| vgl_homg_line_3d_2_points (const vgl_homg_line_3d_2_points< Type > &that) | |
| Copy constructor. More... | |
| vgl_homg_line_3d_2_points (vgl_homg_point_3d< Type > const &point_1, vgl_homg_point_3d< Type > const &point_2) | |
| Construct from two points. More... | |
| bool | operator== (vgl_homg_line_3d_2_points< Type > const &l) const |
| comparison. More... | |
| bool | operator!= (vgl_homg_line_3d_2_points< Type > const &l) const |
| vgl_homg_point_3d< Type > | point_finite () const |
| Finite point (Could be an ideal point, if the whole line is at infinity.). More... | |
| vgl_homg_point_3d< Type > | point_infinite () const |
| Infinite point: the intersection of the line with the plane at infinity. More... | |
| vgl_vector_3d< Type > | direction () const |
| The point at infinity defines the direction of the line. More... | |
| void | set (vgl_homg_point_3d< Type > const &p1, vgl_homg_point_3d< Type > const &p2) |
| Assignment. More... | |
| bool | ideal (Type tol=(Type) 0) const |
| Return true iff line is at infinity. More... | |
Protected Member Functions | |
| void | force_point2_infinite (void) const |
| force the point point_infinite_ to infinity, without changing the line. More... | |
Private Attributes | |
| vgl_homg_point_3d< Type > | point_finite_ |
| Any finite point on the line. More... | |
| vgl_homg_point_3d< Type > | point_infinite_ |
| the (unique) point at infinity. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class T > | |
| std::pair< vgl_homg_point_3d< T >, vgl_homg_point_3d< T > > | vgl_closest_points (vgl_homg_line_3d_2_points< T > const &line1, vgl_homg_line_3d_2_points< T > const &line2) |
| Return the two points of nearest approach of two 3D lines, one on each line. More... | |
| template<class T > | |
| double | vgl_distance_origin (vgl_homg_line_3d_2_points< T > const &l) |
| find the shortest distance of the line to the origin. More... | |
| template<class T > | |
| double | vgl_distance (vgl_homg_line_3d_2_points< T > const &line1, vgl_homg_line_3d_2_points< T > const &line2) |
| Return the perpendicular distance between two lines in 3D. More... | |
| template<class T > | |
| double | vgl_distance (vgl_homg_line_3d_2_points< T > const &l, vgl_homg_point_3d< T > const &p) |
| Return the perpendicular distance from a point to a line in 3D. More... | |
| template<class Type > | |
| bool | is_ideal (l const &line, Type tol=(Type) 0) |
| Return true iff line is at infinity. More... | |
| template<class Type > | |
| bool | coplanar (l const &l1, l const &l2) |
| Are two lines coplanar, i.e., do they intersect?. More... | |
| template<class Type > | |
| bool | concurrent (l const &l1, l const &l2) |
| Are two lines concurrent, i.e., do they intersect?. More... | |
| template<class Type > | |
| bool | coplanar (l const &l1, l const &l2, l const &l3) |
| Are three lines coplanar, i.e., are they in a common plane?. More... | |
| template<class Type > | |
| vgl_homg_point_3d< Type > | intersection (l const &l1, l const &l2) |
| Return the intersection point of two concurrent lines. More... | |
| template<class Type > | |
| bool | concurrent (l const &l1, l const &l2, l const &l3) |
| Are three lines concurrent, i.e., do they pass through a common point?. More... | |
| template<class Type > | |
| std::ostream & | operator<< (std::ostream &s, l const &p) |
| Write to stream (verbose). More... | |
| template<class Type > | |
| std::istream & | operator>> (std::istream &is, l &p) |
| Read parameters from stream. More... | |
Represents a homogeneous 3D line using two points.
A class to hold a homogeneous representation of a 3D Line. The line is stored as a pair of homogeneous 3d points.
|
inline |
Default constructor with (0,0,0,1) and (1,0,0,0), which is the line y=z=0.
Definition at line 40 of file vgl_homg_line_3d_2_points.h.
|
inline |
Copy constructor.
Definition at line 44 of file vgl_homg_line_3d_2_points.h.
|
inline |
Construct from two points.
Definition at line 48 of file vgl_homg_line_3d_2_points.h.
|
inline |
The point at infinity defines the direction of the line.
Definition at line 69 of file vgl_homg_line_3d_2_points.h.
|
protected |
force the point point_infinite_ to infinity, without changing the line.
This is called by the constructors
Definition at line 44 of file vgl_homg_line_3d_2_points.hxx.
|
inline |
Return true iff line is at infinity.
Definition at line 80 of file vgl_homg_line_3d_2_points.h.
|
inline |
Definition at line 59 of file vgl_homg_line_3d_2_points.h.
| bool vgl_homg_line_3d_2_points< Type >::operator== | ( | vgl_homg_line_3d_2_points< Type > const & | l | ) | const |
comparison.
Definition at line 25 of file vgl_homg_line_3d_2_points.hxx.
|
inline |
Finite point (Could be an ideal point, if the whole line is at infinity.).
Definition at line 64 of file vgl_homg_line_3d_2_points.h.
|
inline |
Infinite point: the intersection of the line with the plane at infinity.
Definition at line 66 of file vgl_homg_line_3d_2_points.h.
|
inline |
Assignment.
Definition at line 74 of file vgl_homg_line_3d_2_points.h.
Are two lines concurrent, i.e., do they intersect?.
Definition at line 112 of file vgl_homg_line_3d_2_points.h.
Are three lines concurrent, i.e., do they pass through a common point?.
Definition at line 141 of file vgl_homg_line_3d_2_points.h.
Are two lines coplanar, i.e., do they intersect?.
Definition at line 106 of file vgl_homg_line_3d_2_points.h.
Are three lines coplanar, i.e., are they in a common plane?.
Definition at line 124 of file vgl_homg_line_3d_2_points.h.
|
related |
Return the intersection point of two concurrent lines.
|
related |
Return true iff line is at infinity.
Definition at line 93 of file vgl_homg_line_3d_2_points.h.
|
related |
Write to stream (verbose).
|
related |
Read parameters from stream.
|
related |
Return the two points of nearest approach of two 3D lines, one on each line.
There are 3 cases: the lines intersect (hence these two points are equal); the lines are parallel (an infinite number of solutions viz all points); the lines are neither parallel nor do they intersect (the general case). This method handles all 3 cases. In all cases, a pair of points is returned; in case 1, the two returned points are equal; in case 2, both points are the common point at infinity of the two lines.
Note that case 2 also comprises the case where the given lines are identical. Hence, when observing a point at infinity as a return value, one should interpret this as "all points are closest points".
| line1 | |
| line2 |
|
related |
Return the perpendicular distance between two lines in 3D.
See vgl_closest_point.h for more information.
|
related |
Return the perpendicular distance from a point to a line in 3D.
See vgl_closest_point.h for more information.
|
related |
find the shortest distance of the line to the origin.
|
mutableprivate |
Any finite point on the line.
Definition at line 30 of file vgl_homg_line_3d_2_points.h.
|
mutableprivate |
the (unique) point at infinity.
Definition at line 32 of file vgl_homg_line_3d_2_points.h.
1.8.15