Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vgl_plane_3d< T > Class Template Reference

#include <vgl_plane_3d.h>

List of all members.


Detailed Description

template<class T>
class vgl_plane_3d< T >

Represents a Euclidean 3D plane.

The equation of the plane is $ a x + b y + c z + d = 0 $

Definition at line 31 of file vgl_plane_3d.h.

Public Member Functions

 vgl_plane_3d ()
 vgl_plane_3d (T a, T b, T c, T d)
 Construct a vgl_plane_3d from its equation $ax+by+cz+d=0$.
 vgl_plane_3d (const T v[4])
 Construct a vgl_plane_3d from its equation $v[0]x+v[1]y+v[2]z+v[3]=0$.
 vgl_plane_3d (vgl_homg_plane_3d< T > const &p)
 Construct from a homogeneous plane.
 vgl_plane_3d (vgl_vector_3d< T > const &normal, vgl_point_3d< T > const &p)
 Construct from Normal and a point.
 vgl_plane_3d (vgl_point_3d< T > const &p1, vgl_point_3d< T > const &p2, vgl_point_3d< T > const &p3)
 Construct from three non-collinear points.
a () const
 Return x coefficient.
nx () const
b () const
 Return y coefficient.
ny () const
c () const
 Return z coefficient.
nz () const
d () const
 Return constant coefficient.
void set (T a, T b, T c, T d)
 Set this vgl_plane_3d to have the equation $ax+by+cz+d=0$.
bool operator== (vgl_plane_3d< T > const &p) const
 the comparison operator.
bool operator!= (vgl_plane_3d< T >const &p) const
bool ideal (T=(T) 0) const
 Return true iff the plane is the plane at infinity.
vgl_vector_3d< T > normal () const
 Return the normal direction, i.e.

Private Attributes

a_
b_
c_
d_

Related Functions

(Note that these are not member functions.)

vgl_point_3d< T > vgl_intersection (const vcl_vector< vgl_plane_3d< T > > &p)
 Return the intersection point of vector of planes.
vgl_point_3d< T > vgl_closest_point (vgl_plane_3d< T > const &pl, vgl_point_3d< T > const &p)
 Return the point on the given plane closest to the given point.
double vgl_distance_origin (vgl_plane_3d< T > const &pl)
 find the shortest distance of the plane to the origin.
double vgl_distance (vgl_plane_3d< T > const &l, vgl_point_3d< T > const &p)
 return the perpendicular distance from a point to a plane in 3D.
vgl_point_3d< T > vgl_intersection (vgl_line_3d_2_points< T > const &line, vgl_plane_3d< T > const &plane)
 Return the intersection point of a line and a plane.
vgl_point_3d< T > vgl_intersection (const vgl_plane_3d< T > &p1, const vgl_plane_3d< T > &p2, const vgl_plane_3d< T > &p3)
 Return the intersection point of three planes.
vcl_ostream & operator<< (vcl_ostream &s, const vgl_plane_3d< T > &p)
 Write to stream.
vcl_istream & operator>> (vcl_istream &is, vgl_plane_3d< T > &p)
 Read from stream.


Constructor & Destructor Documentation

template<class T>
vgl_plane_3d< T >::vgl_plane_3d  )  [inline]
 

Definition at line 44 of file vgl_plane_3d.h.

template<class T>
vgl_plane_3d< T >::vgl_plane_3d a,
b,
c,
d
[inline]
 

Construct a vgl_plane_3d from its equation $ax+by+cz+d=0$.

At least one of a, b or c should be nonzero.

Definition at line 59 of file vgl_plane_3d.h.

template<class T>
vgl_plane_3d< T >::vgl_plane_3d const T  v[4]  )  [inline]
 

Construct a vgl_plane_3d from its equation $v[0]x+v[1]y+v[2]z+v[3]=0$.

At least one of v[0], v[1] or v[2] should be nonzero.

Definition at line 64 of file vgl_plane_3d.h.

template<class T>
vgl_plane_3d< T >::vgl_plane_3d vgl_homg_plane_3d< T > const &  p  ) 
 

Construct from a homogeneous plane.

Definition at line 15 of file vgl_plane_3d.txx.

template<class T>
vgl_plane_3d< T >::vgl_plane_3d vgl_vector_3d< T > const &  normal,
vgl_point_3d< T > const &  p
 

Construct from Normal and a point.

The plane goes through the point p and will be orthogonal to normal.

Definition at line 41 of file vgl_plane_3d.txx.

template<class T>
vgl_plane_3d< T >::vgl_plane_3d vgl_point_3d< T > const &  p1,
vgl_point_3d< T > const &  p2,
vgl_point_3d< T > const &  p3
 

Construct from three non-collinear points.

The plane will contain all three points p1, p2 and p3.

Definition at line 20 of file vgl_plane_3d.txx.


Member Function Documentation

template<class T>
T vgl_plane_3d< T >::a  )  const [inline]
 

Return x coefficient.

Definition at line 84 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::b  )  const [inline]
 

Return y coefficient.

Definition at line 87 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::c  )  const [inline]
 

Return z coefficient.

Definition at line 90 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::d  )  const [inline]
 

Return constant coefficient.

Definition at line 93 of file vgl_plane_3d.h.

template<class T>
bool vgl_plane_3d< T >::ideal = (T)0  )  const [inline]
 

Return true iff the plane is the plane at infinity.

Always returns false

Definition at line 105 of file vgl_plane_3d.h.

template<class T>
vgl_vector_3d<T> vgl_plane_3d< T >::normal  )  const [inline]
 

Return the normal direction, i.e.

, a unit vector orthogonal to this plane.

Definition at line 108 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::nx  )  const [inline]
 

Definition at line 85 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::ny  )  const [inline]
 

Definition at line 88 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::nz  )  const [inline]
 

Definition at line 91 of file vgl_plane_3d.h.

template<class T>
bool vgl_plane_3d< T >::operator!= vgl_plane_3d< T >const &  p  )  const [inline]
 

Definition at line 101 of file vgl_plane_3d.h.

template<class T>
bool vgl_plane_3d< T >::operator== vgl_plane_3d< T > const &  p  )  const
 

the comparison operator.

The equations need not be identical, but just equivalent.

Definition at line 49 of file vgl_plane_3d.txx.

template<class T>
void vgl_plane_3d< T >::set a,
b,
c,
d
[inline]
 

Set this vgl_plane_3d to have the equation $ax+by+cz+d=0$.

Definition at line 96 of file vgl_plane_3d.h.


Friends And Related Function Documentation

template<class T>
vcl_ostream & operator<< vcl_ostream &  s,
const vgl_plane_3d< T > &  p
[related]
 

Write to stream.

Definition at line 66 of file vgl_plane_3d.txx.

template<class T>
vcl_istream & operator>> vcl_istream &  is,
vgl_plane_3d< T > &  p
[related]
 

Read from stream.

Definition at line 75 of file vgl_plane_3d.txx.

template<class T>
vgl_point_3d< T > vgl_closest_point vgl_plane_3d< T > const &  pl,
vgl_point_3d< T > const &  p
[related]
 

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

Definition at line 263 of file vgl_closest_point.txx.

template<class T>
double vgl_distance vgl_plane_3d< T > const &  l,
vgl_point_3d< T > const &  p
[related]
 

return the perpendicular distance from a point to a plane in 3D.

Definition at line 236 of file vgl_distance.txx.

template<class T>
double vgl_distance_origin vgl_plane_3d< T > const &  pl  )  [related]
 

find the shortest distance of the plane to the origin.

Definition at line 192 of file vgl_distance.txx.

template<class T>
vgl_point_3d< T > vgl_intersection const vgl_plane_3d< T > &  p1,
const vgl_plane_3d< T > &  p2,
const vgl_plane_3d< T > &  p3
[related]
 

Return the intersection point of three planes.

Definition at line 288 of file vgl_intersection.txx.

template<class T>
vgl_point_3d< T > vgl_intersection vgl_line_3d_2_points< T > const &  line,
vgl_plane_3d< T > const &  plane
[related]
 

Return the intersection point of a line and a plane.

Definition at line 249 of file vgl_intersection.txx.

template<class T>
vgl_point_3d< T > vgl_intersection const vcl_vector< vgl_plane_3d< T > > &  p  )  [related]
 

Return the intersection point of vector of planes.

Definition at line 18 of file vgl_intersection.txx.


Member Data Documentation

template<class T>
T vgl_plane_3d< T >::a_ [private]
 

Definition at line 34 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::b_ [private]
 

Definition at line 35 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::c_ [private]
 

Definition at line 36 of file vgl_plane_3d.h.

template<class T>
T vgl_plane_3d< T >::d_ [private]
 

Definition at line 37 of file vgl_plane_3d.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:39:28 2008 for core/vgl by  doxygen 1.4.4