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
GUILane.h
Go to the documentation of this file.
1
/****************************************************************************/
9
// Representation of a lane in the micro simulation (gui-version)
10
/****************************************************************************/
11
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
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 GUILane_h
23
#define GUILane_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 <fx.h>
36
#include <string>
37
#include <utility>
38
#include <
microsim/MSLane.h
>
39
#include <
microsim/MSEdge.h
>
40
#include <
utils/foxtools/MFXMutex.h
>
41
#include <
utils/geom/Position.h
>
42
#include <
utils/geom/PositionVector.h
>
43
#include <
utils/gui/globjects/GUIGlObject.h
>
44
#include <
utils/gui/settings/GUIColorer.h
>
45
46
47
// ===========================================================================
48
// class declarations
49
// ===========================================================================
50
class
GUINet
;
51
class
MSVehicle
;
52
class
MSNet
;
53
#ifdef HAVE_OSG
54
namespace
osg {
55
class
Geometry;
56
}
57
#endif
58
59
// ===========================================================================
60
// class definitions
61
// ===========================================================================
70
class
GUILane
:
public
MSLane
,
public
GUIGlObject
{
71
public
:
85
GUILane
(
const
std::string&
id
,
SUMOReal
maxSpeed,
86
SUMOReal
length,
MSEdge
*
const
edge,
unsigned
int
numericalID,
87
const
PositionVector
& shape,
SUMOReal
width,
88
SVCPermissions
permissions,
unsigned
int
index);
89
90
92
~GUILane
();
93
94
95
98
108
const
VehCont
&
getVehiclesSecure
()
const
;
109
110
116
void
releaseVehicles
()
const
;
118
119
120
123
126
void
planMovements
(
const
SUMOTime
t);
127
130
bool
executeMovements
(
SUMOTime
t, std::vector<MSLane*>& into);
131
134
bool
integrateNewVehicle
(
SUMOTime
t);
136
137
140
void
detectCollisions
(
SUMOTime
timestep,
int
stage);
141
142
145
MSVehicle
*
removeVehicle
(
MSVehicle
* remVehicle,
MSMoveReminder::Notification
notification);
146
147
148
150
151
159
GUIGLObjectPopupMenu
*
getPopUpMenu
(
GUIMainWindow
& app,
160
GUISUMOAbstractView
& parent);
161
162
170
GUIParameterTableWindow
*
getParameterWindow
(
GUIMainWindow
& app,
171
GUISUMOAbstractView
& parent);
172
173
179
Boundary
getCenteringBoundary
()
const
;
180
181
186
void
drawGL
(
const
GUIVisualizationSettings
& s)
const
;
188
189
190
191
const
PositionVector
&
getShape
()
const
;
192
const
std::vector<SUMOReal>&
getShapeRotations
()
const
;
193
const
std::vector<SUMOReal>&
getShapeLengths
()
const
;
194
195
SUMOReal
firstWaitingTime
()
const
;
196
198
void
drawMarkings
(
const
GUIVisualizationSettings
& s)
const
;
199
201
void
drawCrossties
(
const
GUIVisualizationSettings
& s)
const
;
202
203
SUMOReal
getHalfWidth
()
const
{
204
return
myHalfLaneWidth
;
205
}
206
207
209
210
214
SUMOReal
getNormedHBEFA_CO2Emissions
()
const
;
215
216
220
SUMOReal
getNormedHBEFA_COEmissions
()
const
;
221
222
226
SUMOReal
getNormedHBEFA_PMxEmissions
()
const
;
227
228
232
SUMOReal
getNormedHBEFA_NOxEmissions
()
const
;
233
234
238
SUMOReal
getNormedHBEFA_HCEmissions
()
const
;
239
240
244
SUMOReal
getNormedHBEFA_FuelConsumption
()
const
;
246
247
248
SUMOReal
getEdgeLaneNumber
()
const
;
249
252
SUMOReal
getStoredEdgeTravelTime
()
const
;
253
254
#ifdef HAVE_OSG
255
void
setGeometry(osg::Geometry* geom) {
256
myGeom = geom;
257
}
258
259
void
updateColor(
const
GUIVisualizationSettings
& s);
260
#endif
261
protected
:
263
void
swapAfterLaneChange
(
SUMOTime
t);
264
276
virtual
void
incorporateVehicle
(
MSVehicle
* veh,
SUMOReal
pos,
SUMOReal
speed,
277
const
MSLane::VehCont::iterator& at,
278
MSMoveReminder::Notification
notification =
MSMoveReminder::NOTIFICATION_DEPARTED
);
279
280
private
:
282
void
drawLinkNo
()
const
;
283
void
drawTLSLinkNo
(
const
GUINet
& net)
const
;
284
void
drawLinkRules
(
const
GUINet
& net)
const
;
285
void
drawArrows
()
const
;
286
void
drawLane2LaneConnections
()
const
;
287
288
289
290
private
:
292
SUMOReal
getColorValue
(
size_t
activeScheme)
const
;
293
295
void
setColor
(
const
GUIVisualizationSettings
& s)
const
;
296
298
std::vector<SUMOReal>
myShapeRotations
;
299
301
std::vector<SUMOReal>
myShapeLengths
;
302
304
SUMOReal
myHalfLaneWidth
;
305
307
SUMOReal
myQuarterLaneWidth
;
308
310
unsigned
int
myIndex
;
311
312
#ifdef HAVE_OSG
313
osg::Geometry* myGeom;
314
#endif
315
316
317
private
:
319
mutable
MFXMutex
myLock
;
320
321
322
};
323
324
325
#endif
326
327
/****************************************************************************/
328
build
buildd
sumo-0.18~dfsg
src
guisim
GUILane.h
Generated on Wed Oct 23 2013 01:15:08 for SUMO - Simulation of Urban MObility by
1.8.4