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
32
class
NavGraphGeneratorVoronoi :
public
NavGraphGenerator
33
{
34
public
:
35
NavGraphGeneratorVoronoi
();
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::LockPtr< fawkes::NavGraph >
fawkes::NavGraphGeneratorVoronoi::compute
virtual void compute(fawkes::LockPtr< fawkes::NavGraph > graph)
Compute graph.
Definition:
voronoi.cpp:102
fawkes::NavGraphGeneratorVoronoi::~NavGraphGeneratorVoronoi
virtual ~NavGraphGeneratorVoronoi()
Destructor.
Definition:
voronoi.cpp:69
fawkes::NavGraphGeneratorVoronoi::NavGraphGeneratorVoronoi
NavGraphGeneratorVoronoi()
Default constructor.
Definition:
voronoi.cpp:64
fawkes
fawkes::NavGraphGeneratorVoronoi::face_polygons
const std::list< Polygon2D > & face_polygons() const
Get list of polygons.
Definition:
voronoi.h:55
src
libs
navgraph
generators
voronoi.h
Generated by
1.8.17