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
GUIPerson.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// A MSVehicle extended by some values for usage within the gui
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2001-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 GUIPerson_h
24
#define GUIPerson_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 <vector>
37
#include <set>
38
#include <string>
39
#include <
utils/gui/globjects/GUIGlObject.h
>
40
#include <
utils/common/RGBColor.h
>
41
#include <
microsim/MSPerson.h
>
42
#include <
utils/gui/globjects/GUIGLObjectPopupMenu.h
>
43
#include <
utils/foxtools/MFXMutex.h
>
44
#include <
utils/gui/settings/GUIColorer.h
>
45
46
47
// ===========================================================================
48
// class declarations
49
// ===========================================================================
50
class
GUISUMOAbstractView
;
51
class
GUIGLObjectPopupMenu
;
52
class
MSDevice_Vehroutes
;
53
54
55
// ===========================================================================
56
// class definitions
57
// ===========================================================================
61
class
GUIPerson
:
public
MSPerson
,
public
GUIGlObject
{
62
public
:
65
GUIPerson
(
const
SUMOVehicleParameter
* pars,
const
MSVehicleType
* vtype,
MSPerson::MSPersonPlan
* plan);
66
67
69
~GUIPerson
();
70
71
73
74
82
GUIGLObjectPopupMenu
*
getPopUpMenu
(
GUIMainWindow
& app,
GUISUMOAbstractView
& parent);
83
84
92
GUIParameterTableWindow
*
getParameterWindow
(
GUIMainWindow
& app,
GUISUMOAbstractView
& parent);
93
94
100
Boundary
getCenteringBoundary
()
const
;
101
102
107
void
drawGL
(
const
GUIVisualizationSettings
& s)
const
;
108
109
110
115
virtual
void
drawGLAdditional
(
GUISUMOAbstractView
*
const
parent,
const
GUIVisualizationSettings
& s)
const
;
117
118
/* @brief set the position of a person while riding in a vehicle
119
* @note This must be called by the vehicle before the call to drawGl */
120
void
setPositionInVehicle
(
const
Position
& pos) {
121
myPositionInVehicle
= pos;
122
}
123
125
126
128
SUMOReal
getEdgePos
()
const
;
129
131
// @note overrides the base method and returns myPositionInVehicle while in driving stage
132
Position
getPosition
()
const
;
133
135
SUMOReal
getAngle
()
const
;
136
138
SUMOReal
getWaitingSeconds
()
const
;
139
141
SUMOReal
getSpeed
()
const
;
142
144
145
152
class
GUIPersonPopupMenu
:
public
GUIGLObjectPopupMenu
{
153
//FXDECLARE(GUIPersonPopupMenu)
154
public
:
161
GUIPersonPopupMenu
(
GUIMainWindow
& app,
162
GUISUMOAbstractView
& parent,
GUIGlObject
& o, std::map<GUISUMOAbstractView*, int>& additionalVisualizations);
163
165
~GUIPersonPopupMenu
();
166
167
168
protected
:
170
std::map<GUISUMOAbstractView*, int>&
myVehiclesAdditionalVisualizations
;
172
std::map<GUISUMOAbstractView*, int>
dummy
;
173
174
protected
:
176
GUIPersonPopupMenu
() :
myVehiclesAdditionalVisualizations
(
dummy
) { }
177
178
};
179
180
181
183
std::map<GUISUMOAbstractView*, int>
myAdditionalVisualizations
;
184
185
186
187
188
private
:
190
mutable
MFXMutex
myLock
;
191
193
Position
myPositionInVehicle
;
194
196
void
setColor
(
const
GUIVisualizationSettings
& s)
const
;
197
199
SUMOReal
getColorValue
(
size_t
activeScheme)
const
;
200
202
bool
setFunctionalColor
(
size_t
activeScheme)
const
;
203
205
bool
myAmVisualizedAsStopped
;
206
209
void
drawAction_drawAsTriangle
(
const
GUIVisualizationSettings
& s)
const
;
210
void
drawAction_drawAsPoly
(
const
GUIVisualizationSettings
& s)
const
;
211
void
drawAction_drawAsImage
(
const
GUIVisualizationSettings
& s)
const
;
213
};
214
215
216
#endif
217
218
/****************************************************************************/
219
tmp
buildd
sumo-0.21.0+dfsg
src
guisim
GUIPerson.h
Generated on Thu Nov 20 2014 19:49:54 for SUMO - Simulation of Urban MObility by
1.8.1.2