Represents a homogeneous 3D plane. More...
#include <vgl_homg_plane_3d.h>
Public Member Functions | |
vgl_homg_plane_3d () | |
vgl_homg_plane_3d (Type ta, Type tb, Type tc, Type td) | |
Construct from four Types. | |
vgl_homg_plane_3d (const Type v[4]) | |
Construct from 4-vector. | |
vgl_homg_plane_3d (vgl_plane_3d< Type > const &pl) | |
Construct from non-homogeneous plane. | |
vgl_homg_plane_3d (vgl_vector_3d< Type > const &n, vgl_homg_point_3d< Type > const &p) | |
Construct from normal and a point. | |
vgl_homg_plane_3d (vgl_homg_point_3d< Type > const &p1, vgl_homg_point_3d< Type > const &p2, vgl_homg_point_3d< Type > const &p3) | |
Construct from three non-collinear points. | |
vgl_homg_plane_3d (vgl_homg_line_3d_2_points< Type > const &l1, vgl_homg_line_3d_2_points< Type > const &l2) | |
Construct from two concurrent lines. | |
Type | a () const |
Return x coefficient. | |
Type | nx () const |
Type | b () const |
Return y coefficient. | |
Type | ny () const |
Type | c () const |
Return z coefficient. | |
Type | nz () const |
Type | d () const |
Return homogeneous scaling coefficient. | |
void | set (Type ta, Type tb, Type tc, Type td) |
Set equation a*x+b*y+c*z+d*w=0. | |
bool | operator== (vgl_homg_plane_3d< Type > const &pl) const |
the comparison operator. | |
bool | operator!= (vgl_homg_plane_3d< Type >const &pl) const |
bool | ideal (Type tol=(Type) 0) const |
Return true iff the plane is the plane at infinity. | |
vgl_vector_3d< double > | normal () const |
void | normalize () |
divide all coefficients by sqrt(a^2 + b^2 + c^2). | |
Private Attributes | |
Type | a_ |
Type | b_ |
Type | c_ |
Type | d_ |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
vgl_homg_point_3d< T > | vgl_closest_point (vgl_homg_plane_3d< T > const &pl, vgl_homg_point_3d< T > const &p) |
Return the point on the given plane closest to the given point. | |
template<class T > | |
double | vgl_distance_origin (vgl_homg_plane_3d< T > const &pl) |
find the shortest distance of the plane to the origin. | |
template<class T > | |
double | vgl_distance (vgl_homg_plane_3d< T > const &l, vgl_homg_point_3d< T > const &p) |
return the perpendicular distance from a point to a plane in 3D. | |
template<class Type > | |
bool | is_ideal (vgl_homg_plane_3d< Type > const &p, Type tol=(Type) 0) |
Return true iff p is the plane at infinity. |
Represents a homogeneous 3D plane.
Definition at line 30 of file vgl_homg_plane_3d.h.
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d | ( | ) | [inline] |
Definition at line 39 of file vgl_homg_plane_3d.h.
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d | ( | Type | ta, |
Type | tb, | ||
Type | tc, | ||
Type | td | ||
) | [inline] |
Construct from four Types.
Definition at line 42 of file vgl_homg_plane_3d.h.
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d | ( | const Type | v[4] | ) | [inline] |
Construct from 4-vector.
Definition at line 45 of file vgl_homg_plane_3d.h.
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d | ( | vgl_plane_3d< Type > const & | pl | ) |
Construct from non-homogeneous plane.
Definition at line 17 of file vgl_homg_plane_3d.txx.
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d | ( | vgl_vector_3d< Type > const & | n, |
vgl_homg_point_3d< Type > const & | p | ||
) |
Construct from normal and a point.
The given point must not be at infinity.
This will fail when the given point is at infinity!
Definition at line 57 of file vgl_homg_plane_3d.txx.
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d | ( | vgl_homg_point_3d< Type > const & | p1, |
vgl_homg_point_3d< Type > const & | p2, | ||
vgl_homg_point_3d< Type > const & | p3 | ||
) |
Construct from three non-collinear points.
Construct from three points.
Definition at line 22 of file vgl_homg_plane_3d.txx.
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d | ( | vgl_homg_line_3d_2_points< Type > const & | l1, |
vgl_homg_line_3d_2_points< Type > const & | l2 | ||
) |
Construct from two concurrent lines.
Definition at line 43 of file vgl_homg_plane_3d.txx.
Type vgl_homg_plane_3d< Type >::a | ( | ) | const [inline] |
Return x coefficient.
Definition at line 66 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::b | ( | ) | const [inline] |
Return y coefficient.
Definition at line 69 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::c | ( | ) | const [inline] |
Return z coefficient.
Definition at line 72 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::d | ( | ) | const [inline] |
Return homogeneous scaling coefficient.
Definition at line 75 of file vgl_homg_plane_3d.h.
bool vgl_homg_plane_3d< Type >::ideal | ( | Type | tol = (Type)0 | ) | const [inline] |
Return true iff the plane is the plane at infinity.
The method checks that max(|a|,|b|,|c|) <= tol * |d| If called without an argument, tol=0, i.e., a, b and c must be 0.
Definition at line 87 of file vgl_homg_plane_3d.h.
vgl_vector_3d<double> vgl_homg_plane_3d< Type >::normal | ( | ) | const [inline] |
Definition at line 96 of file vgl_homg_plane_3d.h.
void vgl_homg_plane_3d< Type >::normalize | ( | ) |
divide all coefficients by sqrt(a^2 + b^2 + c^2).
Definition at line 64 of file vgl_homg_plane_3d.txx.
Type vgl_homg_plane_3d< Type >::nx | ( | ) | const [inline] |
Definition at line 67 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::ny | ( | ) | const [inline] |
Definition at line 70 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::nz | ( | ) | const [inline] |
Definition at line 73 of file vgl_homg_plane_3d.h.
bool vgl_homg_plane_3d< Type >::operator!= | ( | vgl_homg_plane_3d< Type >const & | pl | ) | const [inline] |
Definition at line 82 of file vgl_homg_plane_3d.h.
bool vgl_homg_plane_3d< Type >::operator== | ( | vgl_homg_plane_3d< Type > const & | pl | ) | const |
the comparison operator.
Definition at line 83 of file vgl_homg_plane_3d.txx.
void vgl_homg_plane_3d< Type >::set | ( | Type | ta, |
Type | tb, | ||
Type | tc, | ||
Type | td | ||
) | [inline] |
Set equation a*x+b*y+c*z+d*w=0.
Definition at line 78 of file vgl_homg_plane_3d.h.
bool is_ideal | ( | vgl_homg_plane_3d< Type > const & | p, |
Type | tol = (Type)0 |
||
) | [related] |
Return true iff p is the plane at infinity.
The method checks that max(|a|,|b|,|c|) <= tol * |d|
Definition at line 106 of file vgl_homg_plane_3d.h.
vgl_homg_point_3d< T > vgl_closest_point | ( | vgl_homg_plane_3d< T > const & | pl, |
vgl_homg_point_3d< T > const & | p | ||
) | [related] |
Return the point on the given plane closest to the given point.
double vgl_distance | ( | vgl_homg_plane_3d< T > const & | l, |
vgl_homg_point_3d< T > const & | p | ||
) | [related] |
return the perpendicular distance from a point to a plane in 3D.
double vgl_distance_origin | ( | vgl_homg_plane_3d< T > const & | pl | ) | [related] |
find the shortest distance of the plane to the origin.
Type vgl_homg_plane_3d< Type >::a_ [private] |
Definition at line 33 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::b_ [private] |
Definition at line 34 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::c_ [private] |
Definition at line 35 of file vgl_homg_plane_3d.h.
Type vgl_homg_plane_3d< Type >::d_ [private] |
Definition at line 36 of file vgl_homg_plane_3d.h.