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
/****************************************************************************/
8
// A 2D- or 3D-polygon
9
/****************************************************************************/
10
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
11
// Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
12
/****************************************************************************/
13
//
14
// This file is part of SUMO.
15
// SUMO is free software: you can redistribute it and/or modify
16
// it under the terms of the GNU General Public License as published by
17
// the Free Software Foundation, either version 3 of the License, or
18
// (at your option) any later version.
19
//
20
/****************************************************************************/
21
#ifndef Polygon_h
22
#define Polygon_h
23
24
25
// ===========================================================================
26
// included modules
27
// ===========================================================================
28
#ifdef _MSC_VER
29
#include <
windows_config.h
>
30
#else
31
#include <
config.h
>
32
#endif
33
34
#include <string>
35
#include <
utils/common/RGBColor.h
>
36
#include <
utils/geom/PositionVector.h
>
37
#include <
utils/common/VectorHelper.h
>
38
#include <
utils/geom/Position.h
>
39
#include <map>
40
41
42
// ===========================================================================
43
// class definitions
44
// ===========================================================================
49
class
Polygon
{
50
public
:
58
Polygon
(
const
std::string& name,
const
std::string& type,
59
const
RGBColor
& color,
const
PositionVector
& shape,
bool
fill
) ;
60
61
63
virtual
~Polygon
() ;
64
65
66
69
73
const
std::string&
getID
()
const
{
74
return
myName
;
75
}
76
77
81
const
std::string&
getType
()
const
{
82
return
myType
;
83
}
84
85
89
const
RGBColor
&
getColor
()
const
{
90
return
myColor
;
91
}
92
93
97
const
PositionVector
&
getShape
()
const
{
98
return
myShape
;
99
}
100
101
105
bool
fill
()
const
{
106
return
myFill
;
107
}
109
110
111
114
118
void
setType
(
const
std::string& type) {
119
myType
= type;
120
}
121
122
126
void
setColor
(
const
RGBColor
& col) {
127
myColor
= col;
128
}
129
130
134
void
setShape
(
const
PositionVector
& shape) {
135
myShape
= shape;
136
}
137
138
142
void
setFill
(
bool
fill) {
143
myFill
=
fill
;
144
}
146
147
148
protected
:
150
std::string
myName
;
151
153
std::string
myType
;
154
156
RGBColor
myColor
;
157
159
PositionVector
myShape
;
160
162
bool
myFill
;
163
164
};
165
166
167
#endif
168
169
/****************************************************************************/
170
tmp
buildd
sumo-0.15.0~dfsg
src
utils
shapes
Polygon.h
Generated on Sun May 27 2012 14:52:10 for SUMO - Simulation of Urban MObility by
1.8.1