HomgPoint2D Class Reference

#include <HomgPoint2D.h>

Inheritance diagram for HomgPoint2D:

Homg2D Homg List of all members.

Detailed Description

Definition at line 23 of file HomgPoint2D.h.


Public Member Functions

 HomgPoint2D ()
 HomgPoint2D (const HomgPoint2D &that)
 HomgPoint2D (double px, double py, double pw=1.0)
 HomgPoint2D (const vnl_vector< double > &vector_ptr)
 HomgPoint2D (const vnl_vector_fixed< double, 3 > &vector_ptr)
HomgPoint2Doperator= (const HomgPoint2D &that)
bool ideal (double tol=1e-12) const
 Return true iff the point is the point at infinity.
bool get_nonhomogeneous (double &px, double &py) const
 Return the non-homogeneous coordinates of the point.
vnl_double_2 get_double2 () const
 returns a non-homogeneous vnl_vector of length 2.
vnl_double_2 get_nonhomogeneous () const
bool rescale_w (double new_w=1.0)
 Rescale point (defaults to w = 1).
HomgPoint2D get_unitized () const
 returns a unit-norm scaled copy of this.
vnl_double_3 get_vector () const
vnl_double_3 & asVector ()
void get (double *x_ptr, double *y_ptr, double *w_ptr) const
 Retrieve components. Do not attempt to write into null pointers.
double x () const
 Return x.
double & x ()
 Return reference to x.
double y () const
 Return y.
double & y ()
 Return reference to y.
double w () const
 Return w.
double & w ()
 Return reference to w.
void set (double px, double py, double pw)
 Set x,y,w.
void set (const vnl_vector_fixed< double, 3 > &v)
 Set from vector.
void set (const vnl_vector< double > &v)
 Set from vector.
void set (unsigned int index, double v)
 Set element.

Static Public Member Functions

static HomgPoint2D read (vcl_istream &, bool is_homogeneous=false)
 read from vcl_istream. Default is to assume that points are nonhomogeneous.
static void set_infinitesimal_tol (double tol)
 Static method to set the default tolerance used for infinitesimal checks.

Static Public Attributes

static double infinity
 Standard placeholder for methods that wish to return infinity.
static double infinitesimal_tol
 The tolerance used in "near zero" tests in the Homg subclasses.

Constructor & Destructor Documentation

HomgPoint2D::HomgPoint2D (  )  [inline]

Definition at line 28 of file HomgPoint2D.h.

HomgPoint2D::HomgPoint2D ( const HomgPoint2D that  )  [inline]

Definition at line 29 of file HomgPoint2D.h.

HomgPoint2D::HomgPoint2D ( double  px,
double  py,
double  pw = 1.0 
) [inline]

Definition at line 30 of file HomgPoint2D.h.

HomgPoint2D::HomgPoint2D ( const vnl_vector< double > &  vector_ptr  )  [inline]

Definition at line 31 of file HomgPoint2D.h.

HomgPoint2D::HomgPoint2D ( const vnl_vector_fixed< double, 3 > &  vector_ptr  )  [inline]

Definition at line 32 of file HomgPoint2D.h.


Member Function Documentation

HomgPoint2D& HomgPoint2D::operator= ( const HomgPoint2D that  )  [inline]

Definition at line 34 of file HomgPoint2D.h.

bool HomgPoint2D::ideal ( double  tol = 1e-12  )  const [inline]

Return true iff the point is the point at infinity.

If tol == 0, w() must be exactly 0. Otherwise, tol is used as tolerance value (default: 1e-12), and $|w| <= \mbox{tol} \times min(|x|,|y|)$ is checked.

Definition at line 46 of file HomgPoint2D.h.

bool HomgPoint2D::get_nonhomogeneous ( double &  ex,
double &  ey 
) const

Return the non-homogeneous coordinates of the point.

If the point is at infinity, return false.

Definition at line 18 of file HomgPoint2D.cxx.

vnl_double_2 HomgPoint2D::get_double2 (  )  const

returns a non-homogeneous vnl_vector of length 2.

Definition at line 38 of file HomgPoint2D.cxx.

vnl_double_2 HomgPoint2D::get_nonhomogeneous (  )  const [inline]

Definition at line 54 of file HomgPoint2D.h.

bool HomgPoint2D::rescale_w ( double  new_w = 1.0  ) 

Rescale point (defaults to w = 1).

If the point is at infinity, return false

Definition at line 50 of file HomgPoint2D.cxx.

HomgPoint2D HomgPoint2D::get_unitized (  )  const

returns a unit-norm scaled copy of this.

Definition at line 71 of file HomgPoint2D.cxx.

HomgPoint2D HomgPoint2D::read ( vcl_istream &  is,
bool  is_homogeneous = false 
) [static]

read from vcl_istream. Default is to assume that points are nonhomogeneous.

2D, set is_homogeneous to true if points are already in homogeneous form.

Definition at line 108 of file HomgPoint2D.cxx.

vnl_double_3 Homg2D::get_vector (  )  const [inline, inherited]

Definition at line 58 of file Homg2D.h.

vnl_double_3& Homg2D::asVector (  )  [inline, inherited]

Definition at line 59 of file Homg2D.h.

void Homg2D::get ( double *  x_ptr,
double *  y_ptr,
double *  w_ptr 
) const [inline, inherited]

Retrieve components. Do not attempt to write into null pointers.

Definition at line 62 of file Homg2D.h.

double Homg2D::x (  )  const [inline, inherited]

Return x.

Definition at line 72 of file Homg2D.h.

double& Homg2D::x (  )  [inline, inherited]

Return reference to x.

Definition at line 74 of file Homg2D.h.

double Homg2D::y (  )  const [inline, inherited]

Return y.

Definition at line 77 of file Homg2D.h.

double& Homg2D::y (  )  [inline, inherited]

Return reference to y.

Definition at line 79 of file Homg2D.h.

double Homg2D::w (  )  const [inline, inherited]

Return w.

Definition at line 82 of file Homg2D.h.

double& Homg2D::w (  )  [inline, inherited]

Return reference to w.

Definition at line 84 of file Homg2D.h.

void Homg2D::set ( double  px,
double  py,
double  pw 
) [inline, inherited]

Set x,y,w.

Definition at line 96 of file Homg2D.h.

void Homg2D::set ( const vnl_vector_fixed< double, 3 > &  v  )  [inline, inherited]

Set from vector.

Definition at line 104 of file Homg2D.h.

void Homg2D::set ( const vnl_vector< double > &  v  )  [inline, inherited]

Set from vector.

Definition at line 107 of file Homg2D.h.

void Homg2D::set ( unsigned int  index,
double  v 
) [inline, inherited]

Set element.

Definition at line 110 of file Homg2D.h.

static void Homg::set_infinitesimal_tol ( double  tol  )  [static, inherited]

Static method to set the default tolerance used for infinitesimal checks.

The default is 1e-12.


Member Data Documentation

double Homg::infinity [static, inherited]

Standard placeholder for methods that wish to return infinity.

Definition at line 29 of file Homg.h.

double Homg::infinitesimal_tol [static, inherited]

The tolerance used in "near zero" tests in the Homg subclasses.

Definition at line 32 of file Homg.h.


The documentation for this class was generated from the following files:
Generated on Tue Dec 2 05:13:58 2008 for contrib/oxl/mvl by  doxygen 1.5.1