Static Public Member Functions
vgl_homg_operators_1d< T > Class Template Reference

1D homogeneous functions. More...

#include <vgl_homg_operators_1d.h>

List of all members.

Static Public Member Functions

static vnl_vector_fixed< T, 2 > get_vector (vgl_homg_point_1d< T > const &p)
 get a vnl_vector_fixed representation of a homogeneous object.
static double cross_ratio (const vgl_homg_point_1d< T > &a, const vgl_homg_point_1d< T > &b, const vgl_homg_point_1d< T > &c, const vgl_homg_point_1d< T > &d)
 cross ratio of four 1D points.
static T conjugate (T x1, T x2, T x3, double cr=-1)
 Calculate the projective conjugate point of three given points.
static vgl_homg_point_1d< T > conjugate (const vgl_homg_point_1d< T > &a, const vgl_homg_point_1d< T > &b, const vgl_homg_point_1d< T > &c, double cr=-1)
 Calculate the projective conjugate point of three given points.
static T dot (const vgl_homg_point_1d< T > &a, const vgl_homg_point_1d< T > &b)
 Dot product of two homogeneous points.
static T cross (const vgl_homg_point_1d< T > &a, const vgl_homg_point_1d< T > &b)
 Cross product of two homogeneous points.
static void unitize (vgl_homg_point_1d< T > &a)
 Normalize vgl_homg_point_1d<T> to unit magnitude.
static T distance (const vgl_homg_point_1d< T > &point1, const vgl_homg_point_1d< T > &point2)
 Get the distance between the two points.
static T distance_squared (const vgl_homg_point_1d< T > &point1, const vgl_homg_point_1d< T > &point2)
 Get the square of the distance between the two points.
static bool is_within_distance (const vgl_homg_point_1d< T > &p1, const vgl_homg_point_1d< T > &p2, T d)
 True if the points are closer than Euclidean distance d.
static vgl_homg_point_1d< T > midpoint (const vgl_homg_point_1d< T > &p1, const vgl_homg_point_1d< T > &p2)
 Return the midpoint of two homogeneous points.

Detailed Description

template<class T>
class vgl_homg_operators_1d< T >

1D homogeneous functions.

Definition at line 25 of file vgl_homg_operators_1d.h.


Member Function Documentation

template<class T >
T vgl_homg_operators_1d< T >::conjugate ( x1,
x2,
x3,
double  cr = -1 
) [static]

Calculate the projective conjugate point of three given points.

Or more generally, the point with a given crossratio w.r.t. three other points: The cross ratio ((x1,x2;x3,answer)) is cr (default -1). When cr is -1, the returned value and x3 are conjugate points w.r.t. the pair (x1,x2). Because this function is transitive on coordinates, it is sufficient to implement it for 1-dimensional points, i.e., for scalars.

Definition at line 95 of file vgl_homg_operators_1d.txx.

template<class T >
vgl_homg_point_1d< T > vgl_homg_operators_1d< T >::conjugate ( const vgl_homg_point_1d< T > &  a,
const vgl_homg_point_1d< T > &  b,
const vgl_homg_point_1d< T > &  c,
double  cr = -1 
) [static]

Calculate the projective conjugate point of three given points.

Or more generally, the point with a given crossratio w.r.t. three other points: The cross ratio ((x1,x2;x3,answer)) is cr (default -1). When cr is -1, the returned value and x3 are conjugate points w.r.t. the pair (x1,x2).

Definition at line 104 of file vgl_homg_operators_1d.txx.

template<class T >
T vgl_homg_operators_1d< T >::cross ( const vgl_homg_point_1d< T > &  a,
const vgl_homg_point_1d< T > &  b 
) [static]

Cross product of two homogeneous points.

Definition at line 36 of file vgl_homg_operators_1d.txx.

template<class T >
double vgl_homg_operators_1d< T >::cross_ratio ( const vgl_homg_point_1d< T > &  a,
const vgl_homg_point_1d< T > &  b,
const vgl_homg_point_1d< T > &  c,
const vgl_homg_point_1d< T > &  d 
) [static]

cross ratio of four 1D points.

This number is projectively invariant, and it is the coordinate of p4 in the reference frame where p2 is the origin (coordinate 0), p3 is the unity (coordinate 1) and p1 is the point at infinity. This cross ratio is often denoted as ((p1, p2; p3, p4)) (which also equals ((p3, p4; p1, p2)) or ((p2, p1; p4, p3)) or ((p4, p3; p2, p1)) ) and is calculated as

                        p1 - p3   p2 - p3      (p1-p3)(p2-p4)
                        ------- : --------  =  --------------
                        p1 - p4   p2 - p4      (p1-p4)(p2-p3)
   

where pi are nonhomogeneous coordinates for the four points.

Definition at line 19 of file vgl_homg_operators_1d.txx.

template<class T >
T vgl_homg_operators_1d< T >::distance ( const vgl_homg_point_1d< T > &  point1,
const vgl_homg_point_1d< T > &  point2 
) [static]

Get the distance between the two points.

Definition at line 64 of file vgl_homg_operators_1d.txx.

template<class T >
T vgl_homg_operators_1d< T >::distance_squared ( const vgl_homg_point_1d< T > &  point1,
const vgl_homg_point_1d< T > &  point2 
) [static]

Get the square of the distance between the two points.

Definition at line 78 of file vgl_homg_operators_1d.txx.

template<class T >
T vgl_homg_operators_1d< T >::dot ( const vgl_homg_point_1d< T > &  a,
const vgl_homg_point_1d< T > &  b 
) [static]

Dot product of two homogeneous points.

Definition at line 44 of file vgl_homg_operators_1d.txx.

template<class T >
vnl_vector_fixed< T, 2 > vgl_homg_operators_1d< T >::get_vector ( vgl_homg_point_1d< T > const &  p) [static]

get a vnl_vector_fixed representation of a homogeneous object.

Definition at line 13 of file vgl_homg_operators_1d.txx.

template<class T >
static bool vgl_homg_operators_1d< T >::is_within_distance ( const vgl_homg_point_1d< T > &  p1,
const vgl_homg_point_1d< T > &  p2,
d 
) [inline, static]

True if the points are closer than Euclidean distance d.

Definition at line 81 of file vgl_homg_operators_1d.h.

template<class T >
vgl_homg_point_1d< T > vgl_homg_operators_1d< T >::midpoint ( const vgl_homg_point_1d< T > &  p1,
const vgl_homg_point_1d< T > &  p2 
) [static]

Return the midpoint of two homogeneous points.

Definition at line 86 of file vgl_homg_operators_1d.txx.

template<class T >
void vgl_homg_operators_1d< T >::unitize ( vgl_homg_point_1d< T > &  a) [static]

Normalize vgl_homg_point_1d<T> to unit magnitude.

Definition at line 52 of file vgl_homg_operators_1d.txx.


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