Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes
HomgPoint3D Class Reference

#include <HomgPoint3D.h>

Inheritance diagram for HomgPoint3D:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 HomgPoint3D ()
 HomgPoint3D (const HomgPoint3D &p)
 HomgPoint3D (const vnl_vector< double > &p)
 HomgPoint3D (const vnl_vector_fixed< double, 4 > &p)
 HomgPoint3D (double x, double y, double z, double w=1.0)
 Constructor. The homogeneous parameter w defaults to 1.
 ~HomgPoint3D ()
bool ideal (double tol=1e-12) const
 Return true iff the point is the point at infinity.
bool get_nonhomogeneous (double &x, double &y, double &z) const
 Return the non-homogeneous coordinates of the point.
vnl_double_3 get_double3 () const
 Return the non-homogeneous coordinates of the point as a vector of doubles.
double radius () const
bool rescale_w (double new_w=1.0)
 Rescale point.
double squared_radius () const
vnl_double_4 get_vector () const
vnl_double_4 & asVector ()
void get (double *x_ptr, double *y_ptr, double *z_ptr, double *w_ptr) const
double x () const
 Get x.
double y () const
 Get y.
double z () const
 Get z.
double w () const
 Get w.
void set (double px, double py, double pz, double pw=1)
 Set x,y,z,w.
void set (const vnl_vector_fixed< double, 4 > &v)
 Set from vector.
void set (const vnl_vector< double > &v)
 Set from vector.
void set (unsigned int idx, double v)
 Set element.
bool operator== (Homg3D const &p) const

Static Public Member Functions

static void set_infinitesimal_tol (double tol)
 Static method to set the default tolerance used for infinitesimal checks.

Static Public Attributes

static double infinity = 1.7976931348623157E+308
 Standard placeholder for methods that wish to return infinity.
static double infinitesimal_tol = 1e-12
 The tolerance used in "near zero" tests in the Homg subclasses.

Protected Attributes

vnl_double_4 homg_vector_

Detailed Description

Definition at line 22 of file HomgPoint3D.h.


Constructor & Destructor Documentation

HomgPoint3D::HomgPoint3D ( ) [inline]

Definition at line 27 of file HomgPoint3D.h.

HomgPoint3D::HomgPoint3D ( const HomgPoint3D p) [inline]

Definition at line 28 of file HomgPoint3D.h.

HomgPoint3D::HomgPoint3D ( const vnl_vector< double > &  p) [inline]

Definition at line 29 of file HomgPoint3D.h.

HomgPoint3D::HomgPoint3D ( const vnl_vector_fixed< double, 4 > &  p) [inline]

Definition at line 30 of file HomgPoint3D.h.

HomgPoint3D::HomgPoint3D ( double  x,
double  y,
double  z,
double  w = 1.0 
) [inline]

Constructor. The homogeneous parameter w defaults to 1.

Definition at line 32 of file HomgPoint3D.h.

HomgPoint3D::~HomgPoint3D ( ) [inline]

Definition at line 33 of file HomgPoint3D.h.


Member Function Documentation

vnl_double_4& Homg3D::asVector ( ) [inline, inherited]

Definition at line 45 of file Homg3D.h.

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

Definition at line 48 of file Homg3D.h.

vnl_double_3 HomgPoint3D::get_double3 ( ) const

Return the non-homogeneous coordinates of the point as a vector of doubles.

If the point is at infinity, return a vector of Homg::infinity

Definition at line 41 of file HomgPoint3D.cxx.

bool HomgPoint3D::get_nonhomogeneous ( double &  vx,
double &  vy,
double &  vz 
) const

Return the non-homogeneous coordinates of the point.

If the point is at infinity, return false and set the output values to Homg::infinity.

Definition at line 17 of file HomgPoint3D.cxx.

vnl_double_4 Homg3D::get_vector ( ) const [inline, inherited]

Definition at line 44 of file Homg3D.h.

bool HomgPoint3D::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|,|z|)$ is checked.

Definition at line 41 of file HomgPoint3D.h.

bool Homg3D::operator== ( Homg3D const &  p) const [inline, inherited]

Definition at line 97 of file Homg3D.h.

double HomgPoint3D::radius ( ) const [inline]

Definition at line 49 of file HomgPoint3D.h.

bool HomgPoint3D::rescale_w ( double  new_w = 1.0)

Rescale point.

If the point is at infinity, return false

Definition at line 54 of file HomgPoint3D.cxx.

void Homg3D::set ( double  px,
double  py,
double  pz,
double  pw = 1 
) [inline, inherited]

Set x,y,z,w.

Definition at line 80 of file Homg3D.h.

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

Set from vector.

Definition at line 88 of file Homg3D.h.

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

Set from vector.

Definition at line 91 of file Homg3D.h.

void Homg3D::set ( unsigned int  idx,
double  v 
) [inline, inherited]

Set element.

Definition at line 94 of file Homg3D.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.

double HomgPoint3D::squared_radius ( ) const [inline]

Definition at line 51 of file HomgPoint3D.h.

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

Get w.

Definition at line 66 of file Homg3D.h.

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

Get x.

Definition at line 57 of file Homg3D.h.

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

Get y.

Definition at line 60 of file Homg3D.h.

double Homg3D::z ( ) const [inline, inherited]

Get z.

Definition at line 63 of file Homg3D.h.


Member Data Documentation

vnl_double_4 Homg3D::homg_vector_ [protected, inherited]

Definition at line 102 of file Homg3D.h.

double Homg::infinitesimal_tol = 1e-12 [static, inherited]

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

Definition at line 32 of file Homg.h.

double Homg::infinity = 1.7976931348623157E+308 [static, inherited]

Standard placeholder for methods that wish to return infinity.

Definition at line 29 of file Homg.h.


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