core/vgl/algo/vgl_intersection.h
Go to the documentation of this file.
00001 // This is core/vgl/algo/vgl_intersection.h
00002 #ifndef vgl_algo_intersection_h_
00003 #define vgl_algo_intersection_h_
00004 //:
00005 // \file
00006 // \brief Set of intersection functions
00007 // \author Jan 25, 2007 Gamze Tunali
00008 //
00009 // This file aims to gather all the intersection methods on vgl classes
00010 // at one place. Some of the functions moved from their own class
00011 // files to here or interface methods created for non-homogeneous versions
00012 // of the ones that are already defined in vgl/algo/vgl_homg_operators_3d
00013 //
00014 // \verbatim
00015 //  Modifications
00016 //   23 Jul 2009 - Gamze Tunali - added a 3D box-polygon intersection method
00017 //
00018 //   01 Mar 2007 - Gamze Tunali - split up into vgl/algo and vgl parts
00019 // \endverbatim
00020 
00021 #include <vgl/vgl_fwd.h> // forward declare various vgl classes
00022 #include <vcl_vector.h>
00023 #include <vcl_list.h>
00024 
00025 //: Return the intersection point of vector of planes.
00026 // \relatesalso vgl_plane_3d
00027 template <class T>
00028 vgl_point_3d<T> vgl_intersection(const vcl_vector<vgl_plane_3d<T> >& p);
00029 
00030 //: Return the intersection line of a set of planes, use list to distinguish from point return
00031 // \relatesalso vgl_plane_3d
00032 // \relatesalso vgl_infinite_line_3d
00033 template <class T>
00034 vgl_infinite_line_3d<T> 
00035 vgl_intersection(const vcl_list<vgl_plane_3d<T> >& planes);
00036 
00037 //: Return the intersection line of a set of weighted planes, use list to distinguish from point return
00038 // \relatesalso vgl_plane_3d
00039 // \relatesalso vgl_infinite_line_3d
00040 
00041 template <class T>
00042 bool
00043 vgl_intersection(const vcl_list<vgl_plane_3d<T> >& planes, vcl_vector<T> ws, vgl_infinite_line_3d<T>& line, T & residual);
00044 
00045 //: Return true if the box and polygon intersect in 3-d, regions include boundaries
00046 // Polygon is represented as an ordered vector of 3-d points
00047 // \relatesalso vgl_point_3d
00048 // \relatesalso vgl_box_3d
00049 template <class T>
00050 bool vgl_intersection(vgl_box_3d<T> const& b, vcl_list<vgl_point_3d<T> >& p);
00051 
00052 
00053 #define VGL_ALGO_INTERSECTION_INSTANTIATE(T) extern "please include vgl/algo/vgl_intersection.txx first"
00054 
00055 #endif // vgl_algo_intersection_h_