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
ShapeContainer.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Storage for geometrical objects, sorted by the layers they are in
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12
// Copyright (C) 2005-2014 DLR (http://www.dlr.de/) and contributors
13
/****************************************************************************/
14
//
15
// This file is part of SUMO.
16
// SUMO is free software: you can redistribute it and/or modify
17
// it under the terms of the GNU General Public License as published by
18
// the Free Software Foundation, either version 3 of the License, or
19
// (at your option) any later version.
20
//
21
/****************************************************************************/
22
#ifndef ShapeContainer_h
23
#define ShapeContainer_h
24
25
26
// ===========================================================================
27
// included modules
28
// ===========================================================================
29
#ifdef _MSC_VER
30
#include <
windows_config.h
>
31
#else
32
#include <
config.h
>
33
#endif
34
35
#include <string>
36
#include <
utils/common/NamedObjectCont.h
>
37
#include "
PointOfInterest.h
"
38
#include "
Polygon.h
"
39
using namespace
SUMO;
40
41
// ===========================================================================
42
// class declarations
43
// ===========================================================================
44
class
Position
;
45
class
PositionVector
;
46
class
RGBColor
;
47
48
49
// ===========================================================================
50
// class definitions
51
// ===========================================================================
56
class
ShapeContainer
{
57
public
:
59
ShapeContainer
();
60
61
63
virtual
~
ShapeContainer
();
64
65
typedef
NamedObjectCont<Polygon*>
Polygons
;
66
typedef
NamedObjectCont< PointOfInterest*>
POIs
;
67
79
virtual
bool
addPolygon(
const
std::string&
id
,
const
std::string& type,
80
const
RGBColor
& color,
SUMOReal
layer,
81
SUMOReal
angle,
const
std::string& imgFile,
82
const
PositionVector
& shape,
bool
fill);
83
84
97
virtual
bool
addPOI(
const
std::string&
id
,
const
std::string& type,
98
const
RGBColor
& color,
SUMOReal
layer,
SUMOReal
angle,
const
std::string& imgFile,
99
const
Position
& pos,
SUMOReal
width,
SUMOReal
height);
100
101
102
107
virtual
bool
removePolygon(
const
std::string&
id
);
108
109
114
virtual
bool
removePOI(
const
std::string&
id
);
115
116
117
122
virtual
void
movePOI(
const
std::string&
id
,
const
Position
& pos);
123
124
129
virtual
void
reshapePolygon(
const
std::string&
id
,
const
PositionVector
& shape);
130
131
132
134
inline
const
Polygons
&
getPolygons
()
const
{
135
return
myPolygons;
136
}
137
138
140
inline
const
POIs
&
getPOIs
()
const
{
141
return
myPOIs;
142
}
143
144
145
protected
:
147
Polygons
myPolygons
;
148
150
POIs
myPOIs
;
151
152
};
153
154
155
#endif
156
157
/****************************************************************************/
158
tmp
buildd
sumo-0.21.0+dfsg
src
utils
shapes
ShapeContainer.h
Generated on Thu Nov 20 2014 19:49:59 for SUMO - Simulation of Urban MObility by
1.8.1.2