Represents a 3-d line with position defined in the orthogonal plane passing through the origin. More...
#include <vgl_infinite_line_3d.h>
Public Member Functions | |
vgl_infinite_line_3d () | |
Default constructor - does not initialise!. | |
vgl_infinite_line_3d (vgl_infinite_line_3d< Type > const &l) | |
Copy constructor. | |
vgl_infinite_line_3d (vgl_vector_2d< Type > const &x_0, vgl_vector_3d< Type > const &direction) | |
Construct from x0 and direction. | |
vgl_infinite_line_3d (vgl_point_3d< Type > const &p1, vgl_point_3d< Type > const &p2) | |
Construct from two points. | |
vgl_infinite_line_3d (vgl_point_3d< Type > const &p, vgl_vector_3d< Type > const &direction) | |
Construct from a point and direction. | |
vgl_infinite_line_3d (vgl_line_segment_3d< Type > const &ls) | |
Construct from a line segment. | |
vgl_infinite_line_3d (vgl_line_3d_2_points< Type > const &ls) | |
Construct from a line 2 points. | |
~vgl_infinite_line_3d () | |
Destructor. | |
vgl_vector_2d< Type > | x0 () const |
Accessors. | |
vgl_vector_3d< Type > | direction () const |
bool | operator== (vgl_infinite_line_3d< Type > const &l) const |
The comparison operator. | |
bool | operator!= (vgl_infinite_line_3d< Type >const &other) const |
void | set (vgl_vector_2d< Type > const &x_0, vgl_vector_3d< Type > const &direction) |
Assignment. | |
vgl_point_3d< Type > | point () const |
Return the point on the line closest to the origin. | |
vgl_point_3d< Type > | point_t (const double t) const |
Return a point on the line defined by a scalar parameter t. | |
bool | contains (const vgl_point_3d< Type > &p) const |
Check if point p is on the line. | |
void | compute_uv_vectors (vgl_vector_3d< Type > &u, vgl_vector_3d< Type > &v) const |
The unit vectors perpendicular to the line direction. | |
Private Attributes | |
vgl_vector_2d< Type > | x0_ |
line position vector | |
vgl_vector_3d< Type > | t_ |
line direction vector (tangent) | |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
vgl_infinite_line_3d< T > | vgl_intersection (const vcl_list< vgl_plane_3d< T > > &planes) |
Return the intersection line of a set of planes, use list to distinguish from point return. | |
template<class T > | |
bool | vgl_intersection (const vcl_list< vgl_plane_3d< T > > &planes, vcl_vector< T > ws, vgl_infinite_line_3d< T > &line, T &residual) |
Return the intersection line of a set of weighted planes, use list to distinguish from point return. | |
template<class Type > | |
vcl_ostream & | operator<< (vcl_ostream &s, const vgl_infinite_line_3d< Type > &p) |
Write to stream. | |
template<class Type > | |
vcl_istream & | operator>> (vcl_istream &is, vgl_infinite_line_3d< Type > &p) |
Read from stream. | |
template<class T > | |
bool | vgl_intersection (vgl_infinite_line_3d< T > const &l1, vgl_infinite_line_3d< T > const &l2, vgl_point_3d< T > &i_pnt) |
Return the intersection point of infinite lines, if concurrent. | |
template<class T > | |
bool | vgl_intersection (vgl_box_3d< T > const &box, vgl_infinite_line_3d< T > const &line, vgl_point_3d< T > &p0, vgl_point_3d< T > &p1) |
Return true if line intersects box. If so, compute intersection points. |
Represents a 3-d line with position defined in the orthogonal plane passing through the origin.
The line direction is t_. The 2-d plane coordinate system (u, v) is aligned with the 3-d coordinate system (X, Y, X), where v = t x X and u = v x t.
Definition at line 29 of file vgl_infinite_line_3d.h.
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d | ( | ) | [inline] |
Default constructor - does not initialise!.
Definition at line 35 of file vgl_infinite_line_3d.h.
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d | ( | vgl_infinite_line_3d< Type > const & | l | ) | [inline] |
Copy constructor.
Definition at line 38 of file vgl_infinite_line_3d.h.
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d | ( | vgl_vector_2d< Type > const & | x_0, |
vgl_vector_3d< Type > const & | direction | ||
) | [inline] |
Construct from x0 and direction.
Definition at line 42 of file vgl_infinite_line_3d.h.
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d | ( | vgl_point_3d< Type > const & | p1, |
vgl_point_3d< Type > const & | p2 | ||
) |
Construct from two points.
Definition at line 10 of file vgl_infinite_line_3d.txx.
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d | ( | vgl_point_3d< Type > const & | p, |
vgl_vector_3d< Type > const & | direction | ||
) |
Construct from a point and direction.
Definition at line 46 of file vgl_infinite_line_3d.txx.
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d | ( | vgl_line_segment_3d< Type > const & | ls | ) | [inline] |
Construct from a line segment.
Definition at line 55 of file vgl_infinite_line_3d.h.
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d | ( | vgl_line_3d_2_points< Type > const & | ls | ) | [inline] |
Construct from a line 2 points.
Definition at line 62 of file vgl_infinite_line_3d.h.
vgl_infinite_line_3d< Type >::~vgl_infinite_line_3d | ( | ) | [inline] |
Destructor.
Definition at line 69 of file vgl_infinite_line_3d.h.
void vgl_infinite_line_3d< Type >::compute_uv_vectors | ( | vgl_vector_3d< Type > & | u, |
vgl_vector_3d< Type > & | v | ||
) | const |
The unit vectors perpendicular to the line direction.
Definition at line 21 of file vgl_infinite_line_3d.txx.
bool vgl_infinite_line_3d< Type >::contains | ( | const vgl_point_3d< Type > & | p | ) | const |
Check if point p is on the line.
Definition at line 95 of file vgl_infinite_line_3d.txx.
vgl_vector_3d<Type> vgl_infinite_line_3d< Type >::direction | ( | ) | const [inline] |
Definition at line 73 of file vgl_infinite_line_3d.h.
bool vgl_infinite_line_3d< Type >::operator!= | ( | vgl_infinite_line_3d< Type >const & | other | ) | const [inline] |
Definition at line 80 of file vgl_infinite_line_3d.h.
bool vgl_infinite_line_3d< Type >::operator== | ( | vgl_infinite_line_3d< Type > const & | l | ) | const [inline] |
The comparison operator.
Definition at line 77 of file vgl_infinite_line_3d.h.
vgl_point_3d< Type > vgl_infinite_line_3d< Type >::point | ( | ) | const |
Return the point on the line closest to the origin.
Definition at line 85 of file vgl_infinite_line_3d.txx.
vgl_point_3d<Type> vgl_infinite_line_3d< Type >::point_t | ( | const double | t | ) | const [inline] |
Return a point on the line defined by a scalar parameter t.
t=0.0 corresponds to the closest point on the line to the origin
Definition at line 92 of file vgl_infinite_line_3d.h.
void vgl_infinite_line_3d< Type >::set | ( | vgl_vector_2d< Type > const & | x_0, |
vgl_vector_3d< Type > const & | direction | ||
) | [inline] |
Assignment.
Definition at line 84 of file vgl_infinite_line_3d.h.
vgl_vector_2d<Type> vgl_infinite_line_3d< Type >::x0 | ( | ) | const [inline] |
Accessors.
Definition at line 72 of file vgl_infinite_line_3d.h.
vcl_ostream & operator<< | ( | vcl_ostream & | s, |
const vgl_infinite_line_3d< Type > & | p | ||
) | [related] |
Write to stream.
vcl_istream & operator>> | ( | vcl_istream & | is, |
vgl_infinite_line_3d< Type > & | p | ||
) | [related] |
Read from stream.
vgl_infinite_line_3d< T > vgl_intersection | ( | const vcl_list< vgl_plane_3d< T > > & | planes | ) | [related] |
Return the intersection line of a set of planes, use list to distinguish from point return.
bool vgl_intersection | ( | const vcl_list< vgl_plane_3d< T > > & | planes, |
vcl_vector< T > | ws, | ||
vgl_infinite_line_3d< T > & | line, | ||
T & | residual | ||
) | [related] |
Return the intersection line of a set of weighted planes, use list to distinguish from point return.
bool vgl_intersection | ( | vgl_infinite_line_3d< T > const & | l1, |
vgl_infinite_line_3d< T > const & | l2, | ||
vgl_point_3d< T > & | i_pnt | ||
) | [related] |
Return the intersection point of infinite lines, if concurrent.
Return the intersection point of two lines, if concurrent.
Definition at line 515 of file vgl_intersection.txx.
bool vgl_intersection | ( | vgl_box_3d< T > const & | box, |
vgl_infinite_line_3d< T > const & | line, | ||
vgl_point_3d< T > & | p0, | ||
vgl_point_3d< T > & | p1 | ||
) | [related] |
Return true if line intersects box. If so, compute intersection points.
Definition at line 49 of file vgl_intersection.txx.
vgl_vector_3d<Type> vgl_infinite_line_3d< Type >::t_ [private] |
line direction vector (tangent)
Definition at line 32 of file vgl_infinite_line_3d.h.
vgl_vector_2d<Type> vgl_infinite_line_3d< Type >::x0_ [private] |
line position vector
Definition at line 31 of file vgl_infinite_line_3d.h.