Static Public Member Functions | List of all members
vgl_homg_operators_1d< T > Class Template Reference

1D homogeneous functions. More...

#include <vgl_algo_fwd.h>

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. More...
 
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. More...
 
static T conjugate (T x1, T x2, T x3, double cr=-1)
 Calculate the projective conjugate point of three given points. More...
 
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. More...
 
static T dot (const vgl_homg_point_1d< T > &a, const vgl_homg_point_1d< T > &b)
 Dot product of two homogeneous points. More...
 
static T cross (const vgl_homg_point_1d< T > &a, const vgl_homg_point_1d< T > &b)
 Cross product of two homogeneous points. More...
 
static void unitize (vgl_homg_point_1d< T > &a)
 Normalize vgl_homg_point_1d<T> to unit magnitude. More...
 
static T distance (const vgl_homg_point_1d< T > &point1, const vgl_homg_point_1d< T > &point2)
 Get the distance between the two points. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

template<class T>
class vgl_homg_operators_1d< T >

1D homogeneous functions.

Definition at line 27 of file vgl_algo_fwd.h.

Member Function Documentation

◆ conjugate() [1/2]

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 98 of file vgl_homg_operators_1d.hxx.

◆ conjugate() [2/2]

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 107 of file vgl_homg_operators_1d.hxx.

◆ cross()

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 39 of file vgl_homg_operators_1d.hxx.

◆ cross_ratio()

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 22 of file vgl_homg_operators_1d.hxx.

◆ distance()

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 67 of file vgl_homg_operators_1d.hxx.

◆ distance_squared()

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 81 of file vgl_homg_operators_1d.hxx.

◆ dot()

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 47 of file vgl_homg_operators_1d.hxx.

◆ get_vector()

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 16 of file vgl_homg_operators_1d.hxx.

◆ is_within_distance()

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 
)
inlinestatic

True if the points are closer than Euclidean distance d.

Definition at line 78 of file vgl_homg_operators_1d.h.

◆ midpoint()

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 89 of file vgl_homg_operators_1d.hxx.

◆ unitize()

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 55 of file vgl_homg_operators_1d.hxx.


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