#include <vgl_quadric_3d.h>
Public Member Functions | |
| vgl_quadric_type | type () const |
| T | a () const |
Returns the coefficient of . More... | |
| T | b () const |
Returns the coefficient of . More... | |
| T | c () const |
Returns the coefficient of . More... | |
| T | d () const |
Returns the coefficient of . More... | |
| T | e () const |
Returns the coefficient of . More... | |
| T | f () const |
Returns the coefficient of . More... | |
| T | g () const |
Returns the coefficient of . More... | |
| T | h () const |
Returns the coefficient of . More... | |
| T | i () const |
Returns the coefficient of . More... | |
| T | j () const |
Returns the coefficient of . More... | |
| vgl_quadric_3d () | |
| vgl_quadric_3d (T a, T b, T c, T d, T e, T f, T g, T h, T i, T j) | |
| constructor using polynomial coefficients. More... | |
| vgl_quadric_3d (T const coeff[]) | |
| constructor from a linear array of polynomial coefficients, given as a C array. More... | |
| vgl_quadric_3d (std::vector< std::vector< T > > const &Q) | |
| constructor from a matix of polynomial coefficients (see below). More... | |
| std::vector< std::vector< T > > | coef_matrix () const |
| return a matrix of quadric coefficients of the form:. More... | |
| vgl_quadric_3d (std::vector< std::vector< T > > const &canonical_quadric, std::vector< std::vector< T > > const &H) | |
| constructor from a canonical 4x4 quadric coefficient matrix and a 4x4 homogeneous matrix, H. More... | |
| vgl_quadric_3d (std::vector< T > const &diag, std::vector< std::vector< T > > const &H) | |
| constructor for central quadrics e.g. ellipsoid, ax^2+ by^2+ cz*2 + j = 0, where diag = [a,b,c,j]. More... | |
| void | set (T a, T b, T c, T d, T e, T f, T g, T h, T i, T j) |
| set or reset the quadric using polynomial coefficients. More... | |
| void | set (std::vector< std::vector< T > > const &Q) |
| bool | operator== (vgl_quadric_3d< T > const &c) const |
| comparison operator. More... | |
| bool | is_degenerate () const |
| Returns true if this quadric is degenerate. More... | |
| T | sampson_dist (vgl_homg_point_3d< T > const &pt) const |
| Sampson distance d_sampson(p) = ||p^t Q p||^2/||grad(p*t Q p)||^2. More... | |
| bool | on (vgl_homg_point_3d< T > const &pt, T tol=T(0)) const |
| Returns true if the point pt belongs to the quadric surface. More... | |
| bool | center (vgl_point_3d< T > ¢er) const |
| if the upper 3x3 submatrix of Q is full rank then the center of the quadric can be defined. More... | |
| void | upper_3x3_eigensystem (std::vector< T > &eigenvalues, std::vector< std::vector< T > > &eigenvectors) const |
| : eigenvalues and eigenvectors of the upper 3x3 quadric matrix. More... | |
| bool | canonical_central_quadric (std::vector< T > &diag, std::vector< std::vector< T > > &H) const |
| : The quadric in its canonical frame if the center is defined, i.e. the upper 3x3 quadric matrix is full rank. More... | |
| std::vector< std::vector< T > > | canonical_quadric (std::vector< std::vector< T > > &H) const |
| The quadric coefficient matrix in the canonical frame, whether or not the quadric is central. More... | |
Static Public Member Functions | |
| static vgl_quadric_type | type_by_name (std::string const &name) |
| Returns the internal enum value corresponding to the string argument. More... | |
| static std::string | type_by_number (vgl_quadric_type const &type) |
| Converts the quadric type from enum (internal representation) to string. More... | |
Private Member Functions | |
| void | compute_type () |
| set quadric type from polynomial coefficients and store in member type_. More... | |
Private Attributes | |
| bool | det_zero_ |
| vgl_quadric_type | type_ |
| T | a_ |
| coefficient of x^2 More... | |
| T | b_ |
| coefficient of y^2 More... | |
| T | c_ |
| coefficient of z^2 More... | |
| T | d_ |
| coefficient of xy More... | |
| T | e_ |
| coefficient of xz More... | |
| T | f_ |
| coefficient of yz More... | |
| T | g_ |
| coefficient of xw More... | |
| T | h_ |
| coefficient of yw More... | |
| T | i_ |
| coefficient of zw More... | |
| T | j_ |
| coefficient of w^2 More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<class T > | |
| std::istream & | operator>> (std::istream &s, vgl_quadric_3d< T > &c) |
| Read a b c d e f g h i j from stream. More... | |
Definition at line 32 of file vgl_quadric_3d.h.
| enum vgl_quadric_3d::vgl_quadric_type |
Definition at line 35 of file vgl_quadric_3d.h.
|
inline |
Definition at line 114 of file vgl_quadric_3d.h.
| vgl_quadric_3d< T >::vgl_quadric_3d | ( | T | a, |
| T | b, | ||
| T | c, | ||
| T | d, | ||
| T | e, | ||
| T | f, | ||
| T | g, | ||
| T | h, | ||
| T | i, | ||
| T | j | ||
| ) |
constructor using polynomial coefficients.
Definition at line 45 of file vgl_quadric_3d.hxx.
| vgl_quadric_3d< T >::vgl_quadric_3d | ( | T const | coeff[] | ) |
constructor from a linear array of polynomial coefficients, given as a C array.
Definition at line 49 of file vgl_quadric_3d.hxx.
| vgl_quadric_3d< T >::vgl_quadric_3d | ( | std::vector< std::vector< T > > const & | Q | ) |
constructor from a matix of polynomial coefficients (see below).
Definition at line 60 of file vgl_quadric_3d.hxx.
| vgl_quadric_3d< T >::vgl_quadric_3d | ( | std::vector< std::vector< T > > const & | canonical_quadric, |
| std::vector< std::vector< T > > const & | H | ||
| ) |
constructor from a canonical 4x4 quadric coefficient matrix and a 4x4 homogeneous matrix, H.
representing the Euclidean transformation from the canonical frame to the global frame _ _ |R t| where t is a 3x1 translation vector and R is a rotation matrix H = | | 0^t is a 1x3 zero vector. |0^t 1|
Definition at line 65 of file vgl_quadric_3d.hxx.
| vgl_quadric_3d< T >::vgl_quadric_3d | ( | std::vector< T > const & | diag, |
| std::vector< std::vector< T > > const & | H | ||
| ) |
constructor for central quadrics e.g. ellipsoid, ax^2+ by^2+ cz*2 + j = 0, where diag = [a,b,c,j].
are the diagonal elements of the 4x4 quadric coefficient matrix and a 4x4 homogeneous matrix, and H represents the Euclidean transformation from the canonical frame to the global frame (see above)
Definition at line 120 of file vgl_quadric_3d.hxx.
|
inline |
Returns the coefficient of
.
Definition at line 83 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 86 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 89 of file vgl_quadric_3d.h.
| bool vgl_quadric_3d< T >::canonical_central_quadric | ( | std::vector< T > & | diag, |
| std::vector< std::vector< T > > & | H | ||
| ) | const |
: The quadric in its canonical frame if the center is defined, i.e. the upper 3x3 quadric matrix is full rank.
In this case the quadric coefficient matrix in the canonical frame is a 4x4 diagonal matrix, e.g. ax^2 + by^2 + cz^2 + j = 0. Note that the canonical frame is not unique as alignment of quadric axes with the orthogonal frame has numerous possible arrangements. H is a homogenous(4x4)transformation from canonical coordinate space back to the original space.
Definition at line 398 of file vgl_quadric_3d.hxx.
| std::vector< std::vector< T > > vgl_quadric_3d< T >::canonical_quadric | ( | std::vector< std::vector< T > > & | H | ) | const |
The quadric coefficient matrix in the canonical frame, whether or not the quadric is central.
H is a homogenous(4x4)transformation from canonical coordinate space back to the original space.
Definition at line 424 of file vgl_quadric_3d.hxx.
| bool vgl_quadric_3d< T >::center | ( | vgl_point_3d< T > & | center | ) | const |
if the upper 3x3 submatrix of Q is full rank then the center of the quadric can be defined.
otherwise the center is not defined for degenerate quadrics
Definition at line 166 of file vgl_quadric_3d.hxx.
| std::vector< std::vector< T > > vgl_quadric_3d< T >::coef_matrix | ( | ) | const |
return a matrix of quadric coefficients of the form:.
_ _ | a d/2 e/2 g/2 | | d/2 b f/2 h/2 | Q = | e/2 f/2 c i/2 | | g/2 h/2 i/2 j |
Definition at line 139 of file vgl_quadric_3d.hxx.
|
private |
set quadric type from polynomial coefficients and store in member type_.
Definition at line 205 of file vgl_quadric_3d.hxx.
|
inline |
Returns the coefficient of
.
Definition at line 92 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 95 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 98 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 101 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 104 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 107 of file vgl_quadric_3d.h.
|
inline |
Returns true if this quadric is degenerate.
Definition at line 164 of file vgl_quadric_3d.h.
|
inline |
Returns the coefficient of
.
Definition at line 110 of file vgl_quadric_3d.h.
| bool vgl_quadric_3d< T >::on | ( | vgl_homg_point_3d< T > const & | pt, |
| T | tol = T(0) |
||
| ) | const |
Returns true if the point pt belongs to the quadric surface.
I.e., if it satisfies the quadric equation within algebraic distance, i.e. pt^t Q pt < tol;
Definition at line 159 of file vgl_quadric_3d.hxx.
| bool vgl_quadric_3d< T >::operator== | ( | vgl_quadric_3d< T > const & | c | ) | const |
comparison operator.
Comparison is on the quadric, not the equation coefficients. Hence two quadrics are identical if their coefficient vectors are multiples of each other.
Definition at line 363 of file vgl_quadric_3d.hxx.
| T vgl_quadric_3d< T >::sampson_dist | ( | vgl_homg_point_3d< T > const & | pt | ) | const |
Sampson distance d_sampson(p) = ||p^t Q p||^2/||grad(p*t Q p)||^2.
a first order approximation to Euclidean distance
Definition at line 148 of file vgl_quadric_3d.hxx.
| void vgl_quadric_3d< T >::set | ( | T | a, |
| T | b, | ||
| T | c, | ||
| T | d, | ||
| T | e, | ||
| T | f, | ||
| T | g, | ||
| T | h, | ||
| T | i, | ||
| T | j | ||
| ) |
set or reset the quadric using polynomial coefficients.
Definition at line 127 of file vgl_quadric_3d.hxx.
| void vgl_quadric_3d< T >::set | ( | std::vector< std::vector< T > > const & | Q | ) |
Definition at line 133 of file vgl_quadric_3d.hxx.
|
inline |
Definition at line 73 of file vgl_quadric_3d.h.
|
static |
Returns the internal enum value corresponding to the string argument.
Useful for comparison purposes, or for use in "case" statements.
Definition at line 36 of file vgl_quadric_3d.hxx.
|
static |
Converts the quadric type from enum (internal representation) to string.
Definition at line 33 of file vgl_quadric_3d.hxx.
| void vgl_quadric_3d< T >::upper_3x3_eigensystem | ( | std::vector< T > & | eigenvalues, |
| std::vector< std::vector< T > > & | eigenvectors | ||
| ) | const |
: eigenvalues and eigenvectors of the upper 3x3 quadric matrix.
Definition at line 381 of file vgl_quadric_3d.hxx.
|
related |
Read a b c d e f g h i j from stream.
|
private |
coefficient of x^2
Definition at line 61 of file vgl_quadric_3d.h.
|
private |
coefficient of y^2
Definition at line 62 of file vgl_quadric_3d.h.
|
private |
coefficient of z^2
Definition at line 63 of file vgl_quadric_3d.h.
|
private |
coefficient of xy
Definition at line 64 of file vgl_quadric_3d.h.
|
private |
Definition at line 59 of file vgl_quadric_3d.h.
|
private |
coefficient of xz
Definition at line 65 of file vgl_quadric_3d.h.
|
private |
coefficient of yz
Definition at line 66 of file vgl_quadric_3d.h.
|
private |
coefficient of xw
Definition at line 67 of file vgl_quadric_3d.h.
|
private |
coefficient of yw
Definition at line 68 of file vgl_quadric_3d.h.
|
private |
coefficient of zw
Definition at line 69 of file vgl_quadric_3d.h.
|
private |
coefficient of w^2
Definition at line 70 of file vgl_quadric_3d.h.
|
private |
Definition at line 60 of file vgl_quadric_3d.h.
1.8.15