Fawkes API
Fawkes Development Version
polygon_edge_constraint.h
1
/***************************************************************************
2
* polygon_constraint.h - Block nodes and edges inside or touching a polygon
3
*
4
* Created: Mon Jan 19 11:14:51 2015 (next to Super-C waiting for demo)
5
* Copyright 2015 Tim Niemueller
6
****************************************************************************/
7
8
/* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Library General Public License for more details.
17
*
18
* Read the full text in the LICENSE.GPL file in the doc directory.
19
*/
20
21
#ifndef _NAVGRAPH_CONSTRAINTS_POLYGON_EDGE_CONSTRAINT_H_
22
#define _NAVGRAPH_CONSTRAINTS_POLYGON_EDGE_CONSTRAINT_H_
23
24
#include <navgraph/constraints/edge_constraint.h>
25
#include <navgraph/constraints/polygon_constraint.h>
26
#include <navgraph/navgraph.h>
27
28
#include <string>
29
#include <vector>
30
31
namespace
fawkes
{
32
33
class
NavGraphPolygonEdgeConstraint :
public
NavGraphEdgeConstraint,
34
public
NavGraphPolygonConstraint
35
{
36
public
:
37
NavGraphPolygonEdgeConstraint
(
const
std::string &
name
);
38
NavGraphPolygonEdgeConstraint
(
const
std::string &
name
,
const
Polygon
&polygon);
39
40
virtual
~NavGraphPolygonEdgeConstraint
();
41
42
virtual
bool
compute
(
void
)
throw
();
43
44
virtual
bool
blocks
(
const
fawkes::NavGraphNode
&from,
const
fawkes::NavGraphNode
&to)
throw
();
45
};
46
47
}
// end namespace fawkes
48
49
#endif
fawkes::NavGraphNode
Definition:
navgraph_node.h:38
fawkes::NavGraphPolygonConstraint::Polygon
std::vector< Point > Polygon
A vector of points makes a polygon.
Definition:
polygon_constraint.h:59
fawkes::NavGraphPolygonEdgeConstraint::NavGraphPolygonEdgeConstraint
NavGraphPolygonEdgeConstraint(const std::string &name)
Constructor.
Definition:
polygon_edge_constraint.cpp:38
fawkes::NavGraphPolygonEdgeConstraint::~NavGraphPolygonEdgeConstraint
virtual ~NavGraphPolygonEdgeConstraint()
Virtual empty destructor.
Definition:
polygon_edge_constraint.cpp:54
fawkes::NavGraphPolygonEdgeConstraint::blocks
virtual bool blocks(const fawkes::NavGraphNode &from, const fawkes::NavGraphNode &to)
Definition:
polygon_edge_constraint.cpp:69
fawkes
fawkes::NavGraphPolygonEdgeConstraint::compute
virtual bool compute(void)
Perform compuations before graph search and to indicate re-planning.
Definition:
polygon_edge_constraint.cpp:59
fawkes::NavGraphEdgeConstraint::name
std::string name()
Get name of constraint.
Definition:
edge_constraint.cpp:81
src
libs
navgraph
constraints
polygon_edge_constraint.h
Generated by
1.8.16