SUMO - Simulation of Urban MObility
GUIVisualizationSettings.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Stores the information about how to visualize structures
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-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 GUIVisualizationSettings_h
23 #define GUIVisualizationSettings_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 <vector>
37 #include <map>
38 #include <utils/common/RGBColor.h>
39 #include <utils/common/ToString.h>
40 #include "GUIColorer.h"
41 
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
46 class BaseSchemeInfoSource;
47 class OutputDevice;
48 
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
53 
54 // cannot declare this as inner class because it needs to be used in forward
55 // declaration (@todo fix inclusion order by removing references to guisim!)
57  GUIVisualizationTextSettings(bool _show, float _size, RGBColor _color) :
58  show(_show), size(_size), color(_color) {}
59 
60  bool show;
61  float size;
63 
65  return show == other.show &&
66  size == other.size &&
67  color == other.color;
68  }
70  return !((*this) == other);
71  }
72 
73  std::string print(const std::string& name) const {
74  return name + "_show=\"" + toString(show) + "\" " +
75  name + "_size=\"" + toString(size) + "\" " +
76  name + "_color=\"" + toString(color) + "\" ";
77  }
78 };
79 
85 public:
86 
89 
91  std::string name;
92 
94  bool antialiase;
96  bool dither;
97 
99 
100 
104  bool showGrid;
108 
109 
111 
112 
113 #ifdef HAVE_INTERNAL
114  GUIColorer edgeColorer;
116 
118  static bool UseMesoSim;
119 #endif
127  bool showRails;
128  // Setting bundles for optional drawing names with size and color
130 
135 
136 
138 
139 
154  // Setting bundles for optional drawing vehicle names
157 
158 
160 
161 
170  // Setting bundles for optional drawing person names
173 
174 
176 
177 
184  // Setting bundles for optional drawing junction names
191 
192 
194 
195 
197  // @todo decouple addExageration for POIs, Polygons, Triggers etc
198  int addMode;
200  float minAddSize;
203  // Setting bundles for optional drawing additional names
206 
207 
209 
210 
212  float minPOISize;
215  // Setting bundles for optional drawing poi names
217 
219  float minPolySize;
222  // Setting bundles for optional drawing poi names
225 
228 
231 
233  bool gaming;
234 
236  int editMode;
237 
240 
244  void save(OutputDevice& dev) const;
245 
249  size_t getLaneEdgeMode() const;
250 
255 
257  bool operator==(const GUIVisualizationSettings& vs2);
258 };
259 
260 
261 #endif
262 
263 /****************************************************************************/
264 
float vehicleExaggeration
The vehicle exaggeration (upscale)
GUIVisualizationTextSettings junctionName
bool showSizeLegend
Information whether the size legend shall be drawn.
GUIVisualizationTextSettings streetName
float laneWidthExaggeration
The lane exaggeration (upscale thickness)
size_t getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
bool showBlinker
Information whether vehicle blinkers shall be drawn.
GUIVisualizationTextSettings addName
std::string print(const std::string &name) const
GUIVisualizationTextSettings personName
float minAddSize
The minimum size of additional structures to let them be drawn.
bool drawLinkTLIndex
Information whether a link's tls index shall be drawn.
GUIVisualizationTextSettings poiName
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
bool gaming
whether the application is in gaming mode or not
float polyExaggeration
The additional shapes (upscale)
bool operator!=(const GUIVisualizationTextSettings &other)
GUIVisualizationTextSettings(bool _show, float _size, RGBColor _color)
bool operator==(const GUIVisualizationTextSettings &other)
GUIColorer laneColorer
The lane colorer.
Stores the information about how to visualize structures.
float poiExaggeration
The additional shapes (upscale)
bool drawLaneChangePreference
Information whether the lane change preference shall be drawn.
bool showRails
Information whether rails shall be drawn.
GUIVisualizationTextSettings vehicleName
bool operator==(const GUIVisualizationSettings &vs2)
Assignment operator.
int editMode
the current NETEDIT mode (temporary)
GUIVisualizationTextSettings cwaEdgeName
bool laneShowBorders
Information whether lane borders shall be drawn.
bool dither
Information whether dithering shall be enabled.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
float personExaggeration
The person exaggeration (upscale)
GUIColorer vehicleColorer
The vehicle colorer.
GUIVisualizationTextSettings edgeName
SUMOReal selectionScale
the current selection scaling in NETEDIT (temporary)
std::string name
The name of this setting.
float addExaggeration
The additional structures exaggeration (upscale)
GUIVisualizationTextSettings internalEdgeName
bool drawMinGap
Information whether the minimum gap shall be drawn.
int addMode
The additional structures visualization scheme.
GUIColorer personColorer
The person colorer.
GUIVisualizationTextSettings internalJunctionName
GUIColorer junctionColorer
The junction colorer.
SUMOReal gridXSize
Information about the grid spacings.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
Definition: ToString.h:53
RGBColor backgroundColor
The background color to use.
bool antialiase
Information whether antialiase shall be enabled.
float minPOISize
The minimum size of shapes to let them be drawn.
float minPersonSize
The minimum size of persons to let them be drawn.
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
bool drawLinkJunctionIndex
Information whether a link's junction index shall be drawn.
int personQuality
The quality of person drawing.
bool showGrid
Information whether a grid shall be shown.
Base class for coloring. Allows changing the used colors and sets the used color in dependence to a v...
Definition: GUIColorer.h:50
float minVehicleSize
The minimum size of vehicles to let them be drawn.
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
#define SUMOReal
Definition: config.h:215
void save(OutputDevice &dev) const
Writes the settings into an output device.
bool drawJunctionShape
whether the shape of the junction should be drawn
int vehicleQuality
The quality of vehicle drawing.
float minPolySize
The minimum size of shapes to let them be drawn.
GUIVisualizationTextSettings polyName