Public Member Functions | Private Attributes | Related Functions | List of all members
vgl_homg_plane_3d< Type > Class Template Reference

Represents a homogeneous 3D plane. More...

#include <vgl_fwd.h>

Inheritance diagram for vgl_homg_plane_3d< Type >:
Inheritance graph
[legend]

Public Member Functions

 vgl_homg_plane_3d ()=default
 
 vgl_homg_plane_3d (Type ta, Type tb, Type tc, Type td)
 Construct from four Types. More...
 
 vgl_homg_plane_3d (const Type v[4])
 Construct from 4-vector. More...
 
 vgl_homg_plane_3d (vgl_plane_3d< Type > const &pl)
 Construct from non-homogeneous plane. More...
 
 vgl_homg_plane_3d (vgl_vector_3d< Type > const &n, vgl_homg_point_3d< Type > const &p)
 Construct from normal and a point. More...
 
 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. More...
 
 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. More...
 
Type a () const
 Return x coefficient. More...
 
Type nx () const
 
Type b () const
 Return y coefficient. More...
 
Type ny () const
 
Type c () const
 Return z coefficient. More...
 
Type nz () const
 
Type d () const
 Return homogeneous scaling coefficient. More...
 
void set (Type ta, Type tb, Type tc, Type td)
 Set equation a*x+b*y+c*z+d*w=0. More...
 
bool operator== (vgl_homg_plane_3d< Type > const &pl) const
 the comparison operator. More...
 
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. More...
 
vgl_vector_3d< double > normal () const
 
void normalize ()
 divide all coefficients by sqrt(a^2 + b^2 + c^2). More...
 

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. More...
 
template<class T >
double vgl_distance_origin (vgl_homg_plane_3d< T > const &pl)
 find the shortest distance of the plane to the origin. More...
 
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. More...
 
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. More...
 

Detailed Description

template<class Type>
class vgl_homg_plane_3d< Type >

Represents a homogeneous 3D plane.

Definition at line 22 of file vgl_fwd.h.

Constructor & Destructor Documentation

◆ vgl_homg_plane_3d() [1/7]

template<class Type>
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d ( )
inlinedefault

◆ vgl_homg_plane_3d() [2/7]

template<class Type>
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() [3/7]

template<class Type>
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() [4/7]

template<class Type>
vgl_homg_plane_3d< Type >::vgl_homg_plane_3d ( vgl_plane_3d< Type > const &  pl)

Construct from non-homogeneous plane.

Definition at line 20 of file vgl_homg_plane_3d.hxx.

◆ vgl_homg_plane_3d() [5/7]

template<class Type>
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 60 of file vgl_homg_plane_3d.hxx.

◆ vgl_homg_plane_3d() [6/7]

template<class Type>
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 25 of file vgl_homg_plane_3d.hxx.

◆ vgl_homg_plane_3d() [7/7]

template<class Type>
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 46 of file vgl_homg_plane_3d.hxx.

Member Function Documentation

◆ a()

template<class Type>
Type vgl_homg_plane_3d< Type >::a ( ) const
inline

Return x coefficient.

Definition at line 66 of file vgl_homg_plane_3d.h.

◆ b()

template<class Type>
Type vgl_homg_plane_3d< Type >::b ( ) const
inline

Return y coefficient.

Definition at line 69 of file vgl_homg_plane_3d.h.

◆ c()

template<class Type>
Type vgl_homg_plane_3d< Type >::c ( ) const
inline

Return z coefficient.

Definition at line 72 of file vgl_homg_plane_3d.h.

◆ d()

template<class Type>
Type vgl_homg_plane_3d< Type >::d ( ) const
inline

Return homogeneous scaling coefficient.

Definition at line 75 of file vgl_homg_plane_3d.h.

◆ ideal()

template<class Type>
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.

◆ normal()

template<class Type>
vgl_vector_3d<double> vgl_homg_plane_3d< Type >::normal ( ) const
inline

Definition at line 96 of file vgl_homg_plane_3d.h.

◆ normalize()

template<class Type >
void vgl_homg_plane_3d< Type >::normalize ( )

divide all coefficients by sqrt(a^2 + b^2 + c^2).

Definition at line 67 of file vgl_homg_plane_3d.hxx.

◆ nx()

template<class Type>
Type vgl_homg_plane_3d< Type >::nx ( ) const
inline

Definition at line 67 of file vgl_homg_plane_3d.h.

◆ ny()

template<class Type>
Type vgl_homg_plane_3d< Type >::ny ( ) const
inline

Definition at line 70 of file vgl_homg_plane_3d.h.

◆ nz()

template<class Type>
Type vgl_homg_plane_3d< Type >::nz ( ) const
inline

Definition at line 73 of file vgl_homg_plane_3d.h.

◆ operator!=()

template<class Type>
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.

◆ operator==()

template<class Type>
bool vgl_homg_plane_3d< Type >::operator== ( vgl_homg_plane_3d< Type > const &  pl) const

the comparison operator.

Definition at line 86 of file vgl_homg_plane_3d.hxx.

◆ set()

template<class Type>
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.

Friends And Related Function Documentation

◆ is_ideal()

template<class Type >
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_closest_point()

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

Return the point on the given plane closest to the given point.

◆ vgl_distance()

template<class T >
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.

◆ vgl_distance_origin()

template<class T >
double vgl_distance_origin ( vgl_homg_plane_3d< T > const &  pl)
related

find the shortest distance of the plane to the origin.

Member Data Documentation

◆ a_

template<class Type>
Type vgl_homg_plane_3d< Type >::a_
private

Definition at line 33 of file vgl_homg_plane_3d.h.

◆ b_

template<class Type>
Type vgl_homg_plane_3d< Type >::b_
private

Definition at line 34 of file vgl_homg_plane_3d.h.

◆ c_

template<class Type>
Type vgl_homg_plane_3d< Type >::c_
private

Definition at line 35 of file vgl_homg_plane_3d.h.

◆ d_

template<class Type>
Type vgl_homg_plane_3d< Type >::d_
private

Definition at line 36 of file vgl_homg_plane_3d.h.


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