vgl_convex_hull_2d.h
Go to the documentation of this file.
1 // This is core/vgl/algo/vgl_convex_hull_2d.h
2 #ifndef vgl_convex_hull_2d_h_
3 #define vgl_convex_hull_2d_h_
4 //:
5 // \file
6 // \brief Compute the convex hull of a 2-d point set
7 //
8 // \verbatim
9 // Modifications
10 // July 13 2004 - J.L. Mundy - Converted to vgl interface
11 // from code by Ken Clarkson (see .hxx file for details)
12 // \endverbatim
13 
14 #include <vector>
15 #ifdef _MSC_VER
16 # include <vcl_msvc_warnings.h>
17 #endif
18 #include <vgl/vgl_point_2d.h>
19 #include <vgl/vgl_polygon.h>
21 template <class T>
23 {
24  public:
25  vgl_convex_hull_2d (std::vector<vgl_point_2d<T> > const& points);
26  ~vgl_convex_hull_2d () = default;
28  //: the oriented box enclosing the hull with minimum area
30  private:
31  vgl_convex_hull_2d() = delete;
33  void compute_hull();
34  std::vector<vgl_point_2d<T> > points_;
36 };
37 
38 #define VGL_CONVEX_HULL_2D_INSTANTIATE(T) extern "please include vgl/algo/vgl_convex_hull_2d.hxx first"
39 
40 #endif
~vgl_convex_hull_2d()=default
a point in 2D nonhomogeneous space
vgl_polygon< T > hull_
vgl_convex_hull_2d()=delete
std::vector< vgl_point_2d< T > > points_
vgl_oriented_box_2d< T > min_area_enclosing_rectangle()
the oriented box enclosing the hull with minimum area.
vgl_polygon< T > hull()
Store a polygon.
Definition: vgl_area.h:6
An orienteded box in 2-d.