Classes | Defines | Functions
core/vgl/vgl_homg_line_2d.h File Reference

line in projective 2D space More...

#include <vcl_iosfwd.h>
#include <vgl/vgl_fwd.h>
#include <vcl_cassert.h>
#include <vgl/vgl_vector_2d.h>

Go to the source code of this file.

Classes

class  vgl_homg_line_2d< T >
 Represents a homogeneous 2D line. More...

Defines

#define vgl_Abs(x)   (x<0?-x:x)
#define l   vgl_homg_line_2d<T>
#define VGL_HOMG_LINE_2D_INSTANTIATE(T)   extern "please include vgl/vgl_homg_line_2d.txx first"

Functions

template<class T >
bool is_ideal (l const &line, T tol=(T) 0)
 Return true iff line is the line at infinity.
template<class T >
bool concurrent (l const &l1, l const &l2, l const &l3)
 Are three lines concurrent, i.e., do they pass through a common point?.
template<class T >
vcl_ostream & operator<< (vcl_ostream &s, l const &line)
 Print line equation to stream.
template<class T >
vcl_istream & operator>> (vcl_istream &s, l &line)
 Load in line parameters from stream.

Detailed Description

line in projective 2D space

Author:
Don Hamilton, Peter Tu
    Modifications
     Peter Vanroose -  6 July 2001 - Added normal(), direction() and concurrent()
     Peter Vanroose -  4 July 2001 - Added assertions and cstr from non-homg line
     Peter Vanroose - 27 June 2001 - Added operator==
   

Definition in file vgl_homg_line_2d.h.


Define Documentation

#define l   vgl_homg_line_2d<T>

Definition at line 119 of file vgl_homg_line_2d.h.

#define vgl_Abs (   x)    (x<0?-x:x)
#define VGL_HOMG_LINE_2D_INSTANTIATE (   T)    extern "please include vgl/vgl_homg_line_2d.txx first"

Definition at line 149 of file vgl_homg_line_2d.h.


Function Documentation

template<class T >
bool concurrent ( l const &  l1,
l const &  l2,
l const &  l3 
) [inline]

Are three lines concurrent, i.e., do they pass through a common point?.

Definition at line 130 of file vgl_homg_line_2d.h.

template<class T >
bool is_ideal ( l const &  line,
tol = (T)0 
) [inline]

Return true iff line is the line at infinity.

This version checks (max(|a|,|b|) <= tol * |c|

Definition at line 125 of file vgl_homg_line_2d.h.

template<class T >
vcl_ostream & operator<< ( vcl_ostream &  s,
l const &  line 
)

Print line equation to stream.

Write line description to stream: "<vgl_line_2d ax+by+c>".

Write to stream (verbose).

template<class T >
vcl_istream & operator>> ( vcl_istream &  s,
l &  line 
)

Load in line parameters from stream.

Read in three line parameters from stream.

Read parameters from stream.

Either just reads three blank-separated numbers, or reads three comma-separated numbers, or reads three numbers in parenthesized form "(123, 321, -456)" or reads a formatted line equation "123x+321y-456=0"