Fawkes API  Fawkes Development Version
voronoi.h
1 
2 /***************************************************************************
3  * voronoi.h - generate navgraph from Voronoi using CGAL
4  *
5  * Created: Mon Jan 12 21:31:38 2015
6  * Copyright 2015 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version. A runtime exception applies to
13  * this software (see LICENSE.GPL_WRE file mentioned below for details).
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
21  */
22 
23 #ifndef _LIBS_NAVGRAPH_GENERATOR_VORONOI_H_
24 #define _LIBS_NAVGRAPH_GENERATOR_VORONOI_H_
25 
26 #include <navgraph/generators/generator.h>
27 #include <navgraph/navgraph.h>
28 #include <utils/math/polygon.h>
29 
30 namespace fawkes {
31 
33 {
34 public:
36  virtual ~NavGraphGeneratorVoronoi();
37 
38  virtual void compute(fawkes::LockPtr<fawkes::NavGraph> graph);
39 
40  /** Get list of polygons.
41  * @return list of polygons, each polygon contains the vertices of a
42  * bounded face of the Voronoi diagram.
43  */
44  const std::list<Polygon2D> &
45  face_polygons() const
46  {
47  return polygons_;
48  }
49 
50 private:
51  std::list<Polygon2D> polygons_;
52 };
53 
54 } // end of namespace fawkes
55 
56 #endif
Fawkes library namespace.
const std::list< Polygon2D > & face_polygons() const
Get list of polygons.
Definition: voronoi.h:45
Generate navgraph using a Voronoi diagram.
Definition: voronoi.h:32
virtual ~NavGraphGeneratorVoronoi()
Destructor.
Definition: voronoi.cpp:69
Base class for navgraph generators.
Definition: generator.h:30
virtual void compute(fawkes::LockPtr< fawkes::NavGraph > graph)
Compute graph.
Definition: voronoi.cpp:102
NavGraphGeneratorVoronoi()
Default constructor.
Definition: voronoi.cpp:64