SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Polygon.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// A 2D- or 3D-polygon
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2004-2014 DLR (http://www.dlr.de/) and contributors
14
/****************************************************************************/
15
//
16
// This file is part of SUMO.
17
// SUMO is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
/****************************************************************************/
23
#ifndef Polygon_h
24
#define Polygon_h
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <
utils/geom/PositionVector.h
>
37
#include <
utils/common/Parameterised.h
>
38
#include "
Shape.h
"
39
40
// we need to put this into a namespace to avoid clashing with wingdi.h::Polygon function
41
namespace
SUMO {
42
43
// ===========================================================================
44
// class definitions
45
// ===========================================================================
50
class
Polygon
:
public
Shape
,
public
Parameterised
{
51
public
:
62
Polygon
(
const
std::string&
id
,
const
std::string& type,
63
const
RGBColor
& color,
const
PositionVector
& shape,
bool
fill,
64
SUMOReal
layer =
DEFAULT_LAYER
,
65
SUMOReal
angle =
DEFAULT_ANGLE
,
66
const
std::string& imgFile =
DEFAULT_IMG_FILE
);
67
68
70
virtual
~Polygon
();
71
72
73
76
80
inline
const
PositionVector
&
getShape
()
const
{
81
return
myShape
;
82
}
83
84
88
inline
bool
getFill
()
const
{
89
return
myFill
;
90
}
92
93
94
97
101
inline
void
setFill
(
bool
fill) {
102
myFill
= fill;
103
}
104
105
109
inline
virtual
void
setShape
(
const
PositionVector
& shape) {
110
myShape
= shape;
111
}
113
114
115
protected
:
117
PositionVector
myShape
;
118
120
bool
myFill
;
121
122
};
123
124
}
125
126
#endif
127
128
/****************************************************************************/
129
tmp
buildd
sumo-0.21.0+dfsg
src
utils
shapes
Polygon.h
Generated on Thu Nov 20 2014 19:49:58 for SUMO - Simulation of Urban MObility by
1.8.1.2