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
30namespace fawkes {
31
33{
34public:
37
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> &
46 {
47 return polygons_;
48 }
49
50private:
51 std::list<Polygon2D> polygons_;
52};
53
54} // end of namespace fawkes
55
56#endif
Generate navgraph using a Voronoi diagram.
Definition: voronoi.h:33
const std::list< Polygon2D > & face_polygons() const
Get list of polygons.
Definition: voronoi.h:45
virtual ~NavGraphGeneratorVoronoi()
Destructor.
Definition: voronoi.cpp:69
NavGraphGeneratorVoronoi()
Default constructor.
Definition: voronoi.cpp:64
virtual void compute(fawkes::LockPtr< fawkes::NavGraph > graph)
Compute graph.
Definition: voronoi.cpp:102
Base class for navgraph generators.
Definition: generator.h:31
Fawkes library namespace.