Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vgl_line_segment_3d< Type > Class Template Reference

#include <vgl_line_segment_3d.h>

List of all members.


Detailed Description

template<class Type>
class vgl_line_segment_3d< Type >

Represents a 3D line segment using two points.

Definition at line 24 of file vgl_line_segment_3d.h.

Public Member Functions

 vgl_line_segment_3d ()
 Default constructor - does not initialise!.
 vgl_line_segment_3d (vgl_line_segment_3d< Type > const &l)
 Copy constructor.
 vgl_line_segment_3d (vgl_point_3d< Type > const &p1, vgl_point_3d< Type > const &p2)
 Construct from two end points.
 ~vgl_line_segment_3d ()
vgl_point_3d< Type > point1 () const
vgl_point_3d< Type > point2 () const
bool operator== (vgl_line_segment_3d< Type > const &l) const
 the comparison operator.
bool operator!= (vgl_line_segment_3d< Type >const &other) const
void set (vgl_point_3d< Type > const &p1, vgl_point_3d< Type > const &p2)
 assignment.
vgl_vector_3d< Type > direction () const
 Return the direction vector of this line (not normalised).
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 segment.

Private Attributes

vgl_point_3d< Type > point1_
vgl_point_3d< Type > point2_

Related Functions

(Note that these are not member functions.)

double vgl_distance (vgl_line_segment_3d< T > const &l, vgl_point_3d< T > const &p)
 Closest distance from a point p to a line segment l in 3D.
bool vgl_intersection (vgl_line_segment_3d< T > const &l1, vgl_line_segment_3d< T > const &l2, vgl_point_3d< T > &i_pnt)
 Return the intersection point of segments of two concurrent lines.
vcl_ostream & operator<< (vcl_ostream &s, const vgl_line_segment_3d< Type > &p)
 Write to stream.
vcl_istream & operator>> (vcl_istream &is, vgl_line_segment_3d< Type > &p)
 Read from stream.


Constructor & Destructor Documentation

template<class Type>
vgl_line_segment_3d< Type >::vgl_line_segment_3d  )  [inline]
 

Default constructor - does not initialise!.

Definition at line 31 of file vgl_line_segment_3d.h.

template<class Type>
vgl_line_segment_3d< Type >::vgl_line_segment_3d vgl_line_segment_3d< Type > const &  l  )  [inline]
 

Copy constructor.

Definition at line 34 of file vgl_line_segment_3d.h.

template<class Type>
vgl_line_segment_3d< Type >::vgl_line_segment_3d vgl_point_3d< Type > const &  p1,
vgl_point_3d< Type > const &  p2
[inline]
 

Construct from two end points.

Definition at line 38 of file vgl_line_segment_3d.h.

template<class Type>
vgl_line_segment_3d< Type >::~vgl_line_segment_3d  )  [inline]
 

Definition at line 42 of file vgl_line_segment_3d.h.


Member Function Documentation

template<class Type>
bool vgl_line_segment_3d< Type >::contains const vgl_point_3d< Type > &  p  )  const [inline]
 

Check if point p is on the line segment.

Definition at line 68 of file vgl_line_segment_3d.h.

template<class Type>
vgl_vector_3d<Type> vgl_line_segment_3d< Type >::direction  )  const [inline]
 

Return the direction vector of this line (not normalised).

Definition at line 58 of file vgl_line_segment_3d.h.

template<class Type>
bool vgl_line_segment_3d< Type >::operator!= vgl_line_segment_3d< Type >const &  other  )  const [inline]
 

Definition at line 52 of file vgl_line_segment_3d.h.

template<class Type>
bool vgl_line_segment_3d< Type >::operator== vgl_line_segment_3d< Type > const &  l  )  const [inline]
 

the comparison operator.

Definition at line 48 of file vgl_line_segment_3d.h.

template<class Type>
vgl_point_3d<Type> vgl_line_segment_3d< Type >::point1  )  const [inline]
 

Definition at line 44 of file vgl_line_segment_3d.h.

template<class Type>
vgl_point_3d<Type> vgl_line_segment_3d< Type >::point2  )  const [inline]
 

Definition at line 45 of file vgl_line_segment_3d.h.

template<class Type>
vgl_point_3d<Type> vgl_line_segment_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 point1 and t=1.0 to point2. 0<t<1 for points on the segment between point1 and point2. t<0 for points on the (infinite) line, outside the segment, and closer to point1 than to point2. t>1 for points on the (infinite) line, outside the segment, and closer to point2 than to point1.

Definition at line 65 of file vgl_line_segment_3d.h.

template<class Type>
void vgl_line_segment_3d< Type >::set vgl_point_3d< Type > const &  p1,
vgl_point_3d< Type > const &  p2
[inline]
 

assignment.

Definition at line 55 of file vgl_line_segment_3d.h.


Friends And Related Function Documentation

template<class Type>
vcl_ostream & operator<< vcl_ostream &  s,
const vgl_line_segment_3d< Type > &  p
[related]
 

Write to stream.

Definition at line 11 of file vgl_line_segment_3d.txx.

template<class Type>
vcl_istream & operator>> vcl_istream &  is,
vgl_line_segment_3d< Type > &  p
[related]
 

Read from stream.

Definition at line 17 of file vgl_line_segment_3d.txx.

template<class Type>
double vgl_distance vgl_line_segment_3d< T > const &  l,
vgl_point_3d< T > const &  p
[related]
 

Closest distance from a point p to a line segment l in 3D.

See also:
vgl_distance_to_linesegment()

vgl_distance2_to_linesegment()

Definition at line 318 of file vgl_distance.txx.

template<class Type>
bool vgl_intersection vgl_line_segment_3d< T > const &  l1,
vgl_line_segment_3d< T > const &  l2,
vgl_point_3d< T > &  i_pnt
[related]
 

Return the intersection point of segments of two concurrent lines.

Definition at line 230 of file vgl_intersection.txx.


Member Data Documentation

template<class Type>
vgl_point_3d<Type> vgl_line_segment_3d< Type >::point1_ [private]
 

Definition at line 26 of file vgl_line_segment_3d.h.

template<class Type>
vgl_point_3d<Type> vgl_line_segment_3d< Type >::point2_ [private]
 

Definition at line 27 of file vgl_line_segment_3d.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:39:28 2008 for core/vgl by  doxygen 1.4.4