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
GUILaneWrapper.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// A MSLane extended for visualisation purposes.
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
12
// Copyright (C) 2001-2013 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 GUILaneWrapper_h
23
#define GUILaneWrapper_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 <utility>
37
#include <
utils/gui/globjects/GUIGlObject.h
>
38
#include <
utils/gui/settings/GUIColorer.h
>
39
#include <
utils/common/VectorHelper.h
>
40
41
42
// ===========================================================================
43
// class declarations
44
// ===========================================================================
45
class
GUINet
;
46
class
GUIGLObjectPopupMenu
;
47
class
MSLane
;
48
class
MSEdge
;
49
class
PositionVector
;
50
#ifdef HAVE_OSG
51
namespace
osg {
52
class
Geometry;
53
}
54
#endif
55
56
57
// ===========================================================================
58
// class definitions
59
// ===========================================================================
69
class
GUILaneWrapper
:
public
GUIGlObject
{
70
public
:
75
GUILaneWrapper
(
MSLane
& lane,
const
PositionVector
& shape,
unsigned
int
index);
76
77
79
virtual
~GUILaneWrapper
();
80
81
82
84
85
93
GUIGLObjectPopupMenu
*
getPopUpMenu
(
GUIMainWindow
& app,
94
GUISUMOAbstractView
& parent);
95
96
104
GUIParameterTableWindow
*
getParameterWindow
(
GUIMainWindow
& app,
105
GUISUMOAbstractView
& parent);
106
107
113
Boundary
getCenteringBoundary
()
const
;
114
115
120
void
drawGL
(
const
GUIVisualizationSettings
& s)
const
;
122
123
124
128
const
MSLane
&
getLane
()
const
{
129
return
myLane
;
130
}
131
132
133
const
PositionVector
&
getShape
()
const
;
134
const
std::vector<SUMOReal>&
getShapeRotations
()
const
;
135
const
std::vector<SUMOReal>&
getShapeLengths
()
const
;
136
137
SUMOReal
firstWaitingTime
()
const
;
138
139
141
bool
forLane
(
const
MSLane
& lane)
const
;
142
143
145
void
drawMarkings
(
const
GUIVisualizationSettings
& s)
const
;
146
148
void
drawCrossties
(
const
GUIVisualizationSettings
& s)
const
;
149
151
unsigned
int
getLinkNumber
()
const
;
152
153
SUMOReal
getHalfWidth
()
const
{
154
return
myHalfLaneWidth
;
155
}
156
157
159
160
164
SUMOReal
getNormedHBEFA_CO2Emissions
()
const
;
165
166
170
SUMOReal
getNormedHBEFA_COEmissions
()
const
;
171
172
176
SUMOReal
getNormedHBEFA_PMxEmissions
()
const
;
177
178
182
SUMOReal
getNormedHBEFA_NOxEmissions
()
const
;
183
184
188
SUMOReal
getNormedHBEFA_HCEmissions
()
const
;
189
190
194
SUMOReal
getNormedHBEFA_FuelConsumption
()
const
;
196
197
198
SUMOReal
getEdgeLaneNumber
()
const
;
199
202
SUMOReal
getStoredEdgeTravelTime
()
const
;
203
204
#ifdef HAVE_OSG
205
void
setGeometry(osg::Geometry* geom) {
206
myGeom = geom;
207
}
208
209
void
updateColor(
const
GUIVisualizationSettings
& s);
210
#endif
211
212
private
:
214
void
drawLinkNo
()
const
;
215
void
drawTLSLinkNo
(
const
GUINet
& net)
const
;
216
void
drawLinkRules
(
const
GUINet
& net)
const
;
217
void
drawArrows
()
const
;
218
void
drawLane2LaneConnections
()
const
;
219
221
SUMOReal
getColorValue
(
size_t
activeScheme)
const
;
222
224
void
setColor
(
const
GUIVisualizationSettings
& s)
const
;
225
226
private
:
228
MSLane
&
myLane
;
229
231
const
PositionVector
&
myShape
;
232
234
std::vector<SUMOReal>
myShapeRotations
;
235
237
std::vector<SUMOReal>
myShapeLengths
;
238
240
SUMOReal
myHalfLaneWidth
;
241
243
SUMOReal
myQuarterLaneWidth
;
244
246
unsigned
int
myIndex
;
247
248
#ifdef HAVE_OSG
249
osg::Geometry* myGeom;
250
#endif
251
252
private
:
254
GUILaneWrapper
(
const
GUILaneWrapper
&);
255
257
GUILaneWrapper
&
operator=
(
const
GUILaneWrapper
&);
258
};
259
260
261
#endif
262
263
/****************************************************************************/
264
build
buildd
sumo-0.17.1~dfsg
src
guisim
GUILaneWrapper.h
Generated on Sun Jun 16 2013 17:30:15 for SUMO - Simulation of Urban MObility by
1.8.3.1