Public Member Functions | Private Attributes | Related Functions | List of all members
vgl_infinite_line_3d< Type > Class Template Reference

Represents a 3-d line with position defined in the orthogonal plane passing through the origin. More...

#include <vgl_fwd.h>

Public Member Functions

 vgl_infinite_line_3d ()=default
 Default constructor - does not initialise!. More...
 
 vgl_infinite_line_3d (vgl_infinite_line_3d< Type > const &l)
 Copy constructor. More...
 
 vgl_infinite_line_3d (vgl_vector_2d< Type > const &x_0, vgl_vector_3d< Type > const &direction)
 Construct from x0 and direction. More...
 
 vgl_infinite_line_3d (vgl_point_3d< Type > const &p1, vgl_point_3d< Type > const &p2)
 Construct from two points. More...
 
 vgl_infinite_line_3d (vgl_point_3d< Type > const &p, vgl_vector_3d< Type > const &direction)
 Construct from a point and direction. More...
 
 vgl_infinite_line_3d (vgl_line_segment_3d< Type > const &ls)
 Construct from a line segment. More...
 
 vgl_infinite_line_3d (vgl_line_3d_2_points< Type > const &ls)
 Construct from a line 2 points. More...
 
 ~vgl_infinite_line_3d ()=default
 Destructor. More...
 
vgl_vector_2d< Type > x0 () const
 Accessors. More...
 
vgl_vector_3d< Type > direction () const
 
bool operator== (vgl_infinite_line_3d< Type > const &l) const
 The comparison operator. More...
 
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. More...
 
vgl_point_3d< Type > point () const
 Return the point on the line closest to the origin. More...
 
vgl_point_3d< Type > point_t (const double t) const
 Return a point on the line defined by a scalar parameter t. More...
 
bool contains (const vgl_point_3d< Type > &p) const
 Check if point p is on the line. More...
 
void compute_uv_vectors (vgl_vector_3d< Type > &u, vgl_vector_3d< Type > &v) const
 The unit vectors perpendicular to the line direction. More...
 

Private Attributes

vgl_vector_2d< Type > x0_
 line position vector More...
 
vgl_vector_3d< Type > t_
 line direction vector (tangent) More...
 

Related Functions

(Note that these are not member functions.)

template<class T >
vgl_infinite_line_3d< T > vgl_intersection (const std::list< vgl_plane_3d< T > > &planes)
 Return the intersection line of a set of planes, use list to distinguish from point return. More...
 
template<class T >
bool vgl_intersection (const std::list< vgl_plane_3d< T > > &planes, std::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. More...
 
template<class Type >
std::ostream & operator<< (std::ostream &s, const vgl_infinite_line_3d< Type > &p)
 Write to stream. More...
 
template<class Type >
std::istream & operator>> (std::istream &is, vgl_infinite_line_3d< Type > &p)
 Read from stream. More...
 
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. More...
 
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. More...
 

Detailed Description

template<class Type>
class vgl_infinite_line_3d< Type >

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 20 of file vgl_fwd.h.

Constructor & Destructor Documentation

◆ vgl_infinite_line_3d() [1/7]

template<class Type>
vgl_infinite_line_3d< Type >::vgl_infinite_line_3d ( )
inlinedefault

Default constructor - does not initialise!.

◆ vgl_infinite_line_3d() [2/7]

template<class Type>
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() [3/7]

template<class Type>
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() [4/7]

template<class Type >
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 14 of file vgl_infinite_line_3d.hxx.

◆ vgl_infinite_line_3d() [5/7]

template<class Type >
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 50 of file vgl_infinite_line_3d.hxx.

◆ vgl_infinite_line_3d() [6/7]

template<class Type>
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() [7/7]

template<class Type>
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()

template<class Type>
vgl_infinite_line_3d< Type >::~vgl_infinite_line_3d ( )
inlinedefault

Destructor.

Member Function Documentation

◆ compute_uv_vectors()

template<class Type >
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 25 of file vgl_infinite_line_3d.hxx.

◆ contains()

template<class Type >
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 99 of file vgl_infinite_line_3d.hxx.

◆ direction()

template<class Type>
vgl_vector_3d<Type> vgl_infinite_line_3d< Type >::direction ( ) const
inline

Definition at line 73 of file vgl_infinite_line_3d.h.

◆ operator!=()

template<class Type>
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.

◆ operator==()

template<class Type>
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.

◆ point()

template<class Type >
vgl_point_3d< Type > vgl_infinite_line_3d< Type >::point ( ) const

Return the point on the line closest to the origin.

Definition at line 89 of file vgl_infinite_line_3d.hxx.

◆ point_t()

template<class Type>
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.

◆ set()

template<class Type>
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.

◆ x0()

template<class Type>
vgl_vector_2d<Type> vgl_infinite_line_3d< Type >::x0 ( ) const
inline

Accessors.

Definition at line 72 of file vgl_infinite_line_3d.h.

Friends And Related Function Documentation

◆ operator<<()

template<class Type >
std::ostream & operator<< ( std::ostream &  s,
const vgl_infinite_line_3d< Type > &  p 
)
related

Write to stream.

◆ operator>>()

template<class Type >
std::istream & operator>> ( std::istream &  is,
vgl_infinite_line_3d< Type > &  p 
)
related

Read from stream.

◆ vgl_intersection() [1/4]

template<class T >
vgl_infinite_line_3d< T > vgl_intersection ( const std::list< vgl_plane_3d< T > > &  planes)
related

Return the intersection line of a set of planes, use list to distinguish from point return.

◆ vgl_intersection() [2/4]

template<class T >
bool vgl_intersection ( const std::list< vgl_plane_3d< T > > &  planes,
std::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.

◆ vgl_intersection() [3/4]

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 
)
related

Return the intersection point of infinite lines, if concurrent.

Return the intersection point of two lines, if concurrent.

Definition at line 569 of file vgl_intersection.hxx.

◆ vgl_intersection() [4/4]

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 
)
related

Return true if line intersects box. If so, compute intersection points.

Definition at line 53 of file vgl_intersection.hxx.

Member Data Documentation

◆ t_

template<class Type>
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.

◆ x0_

template<class Type>
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.


The documentation for this class was generated from the following files: