SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIVisualizationSettings.cpp
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 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <map>
34 #include <vector>
37 #include "GUIColorScheme.h"
38 
39 #ifdef CHECK_MEMORY_LEAKS
40 #include <foreign/nvwa/debug_new.h>
41 #endif // CHECK_MEMORY_LEAKS
42 
43 // ===========================================================================
44 // static members
45 // ===========================================================================
46 #ifdef HAVE_INTERNAL
47 bool GUIVisualizationSettings::UseMesoSim = false;
48 #endif
49 
50 // ===========================================================================
51 // member method definitions
52 // ===========================================================================
54  : name(""), antialiase(false), dither(false),
55  backgroundColor(RGBColor::WHITE),
56  showGrid(false), gridXSize(100), gridYSize(100),
57  laneShowBorders(false), showLinkDecals(true), showRails(true),
58  edgeName(false, 50, RGBColor(255, 128, 0, 255)),
59  internalEdgeName(false, 40, RGBColor(128, 64, 0, 255)),
60  cwaEdgeName(false, 50, RGBColor::MAGENTA),
61  streetName(false, 55, RGBColor::YELLOW),
62  hideConnectors(false), laneWidthExaggeration(1),
63  vehicleQuality(0), minVehicleSize(1), vehicleExaggeration(1), showBlinker(true),
64  drawLaneChangePreference(false), drawMinGap(false),
65  vehicleName(false, 50, RGBColor(204, 153, 0, 255)),
66  personQuality(0), minPersonSize(1), personExaggeration(1),
67  personName(false, 50, RGBColor(0, 153, 204, 255)),
68  drawLinkTLIndex(false), drawLinkJunctionIndex(false),
69  junctionName(false, 50, RGBColor(0, 255, 128, 255)),
70  internalJunctionName(false, 50, RGBColor(0, 204, 128, 255)),
71  showLane2Lane(false), drawJunctionShape(true), addMode(0), minAddSize(1), addExaggeration(1),
72  addName(false, 50, RGBColor(255, 0, 128, 255)),
73  minPOISize(0), poiExaggeration(1), poiName(false, 50, RGBColor(255, 0, 128, 255)),
74  minPolySize(0), polyExaggeration(1), polyName(false, 50, RGBColor(255, 0, 128, 255)),
75  showSizeLegend(true),
76  gaming(false),
77  selectionScale(1) {
79  GUIColorScheme scheme = GUIColorScheme("uniform", RGBColor::BLACK, "road", true);
80  scheme.addColor(RGBColor::GREY, 1, "sidewalk");
81  scheme.addColor(RGBColor(192, 66, 44), 2, "bike lane");
82  scheme.addColor(RGBColor(0, 0, 0, 0), 3, "green verge");
83  laneColorer.addScheme(scheme);
84  scheme = GUIColorScheme("by selection (lane-/streetwise)", RGBColor(179, 179, 179, 255), "unselected", true);
85  scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected");
86  laneColorer.addScheme(scheme);
87  scheme = GUIColorScheme("by permission code", RGBColor(240, 240, 240), "nobody");
88  scheme.addColor(RGBColor(10, 10, 10), (SUMOReal)SVC_PASSENGER, "passenger");
89  scheme.addColor(RGBColor(128, 128, 128), (SUMOReal)SVC_PEDESTRIAN, "pedestrian");
90  scheme.addColor(RGBColor(80, 80, 80), (SUMOReal)(SVC_PEDESTRIAN | SVC_DELIVERY), "pedestrian_delivery");
91  scheme.addColor(RGBColor(192, 66, 44), (SUMOReal)SVC_BICYCLE, "bicycle");
92  scheme.addColor(RGBColor(40, 100, 40), (SUMOReal)SVC_BUS, "bus");
93  scheme.addColor(RGBColor(166, 147, 26), (SUMOReal)SVC_TAXI, "taxi");
94  scheme.addColor(RGBColor::BLACK, (SUMOReal)(SVCAll & ~SVC_PEDESTRIAN), "disallow_pedestrian");
95  scheme.addColor(RGBColor(64, 0, 86), (SUMOReal)(SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_MOPED)), "disallow_apedestrian_bicycle");
96  scheme.addColor(RGBColor::GREEN, (SUMOReal)SVCAll, "all");
97  laneColorer.addScheme(scheme);
98  // ... traffic states ...
99  scheme = GUIColorScheme("by allowed speed (lanewise)", RGBColor::RED);
100  scheme.addColor(RGBColor::BLUE, (SUMOReal)(150.0 / 3.6));
101  laneColorer.addScheme(scheme);
102  scheme = GUIColorScheme("by current occupancy (lanewise, brutto)", RGBColor::BLUE);
103  scheme.addColor(RGBColor::RED, (SUMOReal)0.95);
104  laneColorer.addScheme(scheme);
105  scheme = GUIColorScheme("by current occupancy (lanewise, netto)", RGBColor::BLUE);
106  scheme.addColor(RGBColor::RED, (SUMOReal)0.95);
107  laneColorer.addScheme(scheme);
108  scheme = GUIColorScheme("by first vehicle waiting time (lanewise)", RGBColor::BLUE);
109  scheme.addColor(RGBColor::CYAN, (SUMOReal)30);
110  scheme.addColor(RGBColor::GREEN, (SUMOReal)100);
111  scheme.addColor(RGBColor::YELLOW, (SUMOReal)200);
112  scheme.addColor(RGBColor::RED, (SUMOReal)300);
113  laneColorer.addScheme(scheme);
114  scheme = GUIColorScheme("by lane number (streetwise)", RGBColor::RED);
115  scheme.addColor(RGBColor::BLUE, (SUMOReal)5);
116  laneColorer.addScheme(scheme);
117  // ... emissions ...
118  scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN);
119  scheme.addColor(RGBColor::RED, (SUMOReal)(10. / 7.5 / 5.));
120  laneColorer.addScheme(scheme);
121  scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN);
122  scheme.addColor(RGBColor::RED, (SUMOReal)(0.05 / 7.5 / 2.));
123  laneColorer.addScheme(scheme);
124  scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN);
125  scheme.addColor(RGBColor::RED, (SUMOReal)(.005 / 7.5 / 5.));
126  laneColorer.addScheme(scheme);
127  scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN);
128  scheme.addColor(RGBColor::RED, (SUMOReal)(.125 / 7.5 / 5.));
129  laneColorer.addScheme(scheme);
130  scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN);
131  scheme.addColor(RGBColor::RED, (SUMOReal)(.02 / 7.5 / 4.));
132  laneColorer.addScheme(scheme);
133  scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN);
134  scheme.addColor(RGBColor::RED, (SUMOReal)(.005 / 7.5 * 100.));
135  laneColorer.addScheme(scheme);
136  scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN);
137  scheme.addColor(RGBColor::RED, (SUMOReal)100);
138  laneColorer.addScheme(scheme);
139  // ... weights (experimental) ...
140  scheme = GUIColorScheme("by global travel time", RGBColor::GREEN);
141  scheme.addColor(RGBColor::RED, (SUMOReal)100);
142  scheme.setAllowsNegativeValues(true);
143  laneColorer.addScheme(scheme);
144  scheme = GUIColorScheme("by global speed percentage", RGBColor::RED);
145  scheme.addColor(RGBColor::YELLOW, (SUMOReal)50);
146  scheme.addColor(RGBColor::GREEN, (SUMOReal)100);
147  scheme.setAllowsNegativeValues(true);
148  laneColorer.addScheme(scheme);
149  scheme = GUIColorScheme("by given length/geometrical length", RGBColor::BLACK);
150  scheme.addColor(RGBColor::RED, (SUMOReal)0.25);
151  scheme.addColor(RGBColor::YELLOW, (SUMOReal)0.5);
152  scheme.addColor(RGBColor(179, 179, 179, 255), (SUMOReal)1.0);
153  scheme.addColor(RGBColor::GREEN, (SUMOReal)2.0);
154  scheme.addColor(RGBColor::BLUE, (SUMOReal)4.0);
155  laneColorer.addScheme(scheme);
156  laneColorer.addScheme(GUIColorScheme("by angle", RGBColor::YELLOW, "", true));
157 
158 
160  vehicleColorer.addScheme(GUIColorScheme("given vehicle/type/route color", RGBColor::YELLOW, "", true));
162  vehicleColorer.addScheme(GUIColorScheme("given/assigned vehicle color", RGBColor::YELLOW, "", true));
163  vehicleColorer.addScheme(GUIColorScheme("given/assigned type color", RGBColor::YELLOW, "", true));
164  vehicleColorer.addScheme(GUIColorScheme("given/assigned route color", RGBColor::YELLOW, "", true));
165  vehicleColorer.addScheme(GUIColorScheme("depart position as HSV", RGBColor::YELLOW, "", true));
166  vehicleColorer.addScheme(GUIColorScheme("arrival position as HSV", RGBColor::YELLOW, "", true));
167  vehicleColorer.addScheme(GUIColorScheme("direction/distance as HSV", RGBColor::YELLOW, "", true));
168  scheme = GUIColorScheme("by speed", RGBColor::RED);
169  scheme.addColor(RGBColor::YELLOW, (SUMOReal)(30 / 3.6));
170  scheme.addColor(RGBColor::GREEN, (SUMOReal)(55 / 3.6));
171  scheme.addColor(RGBColor::CYAN, (SUMOReal)(80 / 3.6));
172  scheme.addColor(RGBColor::BLUE, (SUMOReal)(120 / 3.6));
173  scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(150 / 3.6));
174  vehicleColorer.addScheme(scheme);
175  scheme = GUIColorScheme("by waiting time", RGBColor::BLUE);
176  scheme.addColor(RGBColor::CYAN, (SUMOReal)30);
177  scheme.addColor(RGBColor::GREEN, (SUMOReal)100);
178  scheme.addColor(RGBColor::YELLOW, (SUMOReal)200);
179  scheme.addColor(RGBColor::RED, (SUMOReal)300);
180  vehicleColorer.addScheme(scheme);
181  scheme = GUIColorScheme("by time since last lanechange", RGBColor::WHITE);
182  scheme.addColor(RGBColor::GREY, (SUMOReal)(5 * 60));
183  vehicleColorer.addScheme(scheme);
184  scheme = GUIColorScheme("by max speed", RGBColor::RED);
185  scheme.addColor(RGBColor::YELLOW, (SUMOReal)(30 / 3.6));
186  scheme.addColor(RGBColor::GREEN, (SUMOReal)(55 / 3.6));
187  scheme.addColor(RGBColor::CYAN, (SUMOReal)(80 / 3.6));
188  scheme.addColor(RGBColor::BLUE, (SUMOReal)(120 / 3.6));
189  scheme.addColor(RGBColor::MAGENTA, (SUMOReal)(150 / 3.6));
190  vehicleColorer.addScheme(scheme);
191  // ... emissions ...
192  scheme = GUIColorScheme("by CO2 emissions", RGBColor::GREEN);
193  scheme.addColor(RGBColor::RED, (SUMOReal)5.);
194  vehicleColorer.addScheme(scheme);
195  scheme = GUIColorScheme("by CO emissions", RGBColor::GREEN);
196  scheme.addColor(RGBColor::RED, (SUMOReal)0.05);
197  vehicleColorer.addScheme(scheme);
198  scheme = GUIColorScheme("by PMx emissions", RGBColor::GREEN);
199  scheme.addColor(RGBColor::RED, (SUMOReal).005);
200  vehicleColorer.addScheme(scheme);
201  scheme = GUIColorScheme("by NOx emissions", RGBColor::GREEN);
202  scheme.addColor(RGBColor::RED, (SUMOReal).125);
203  vehicleColorer.addScheme(scheme);
204  scheme = GUIColorScheme("by HC emissions", RGBColor::GREEN);
205  scheme.addColor(RGBColor::RED, (SUMOReal).02);
206  vehicleColorer.addScheme(scheme);
207  scheme = GUIColorScheme("by fuel consumption", RGBColor::GREEN);
208  scheme.addColor(RGBColor::RED, (SUMOReal).005);
209  vehicleColorer.addScheme(scheme);
210  scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREEN);
211  scheme.addColor(RGBColor::RED, (SUMOReal)100.);
212  vehicleColorer.addScheme(scheme);
213  scheme = GUIColorScheme("by reroute number", RGBColor::RED);
214  scheme.addColor(RGBColor::YELLOW, (SUMOReal)1.);
215  scheme.addColor(RGBColor::WHITE, (SUMOReal)10.);
216  vehicleColorer.addScheme(scheme);
217  scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true);
218  scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected");
219  vehicleColorer.addScheme(scheme);
220  scheme = GUIColorScheme("by offset from best lane", RGBColor(179, 179, 179, 255), "0");
221  scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-3");
222  scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-1");
223  scheme.addColor(RGBColor(0, 255, 255, 255), 1, "1");
224  scheme.addColor(RGBColor(0, 0, 255, 255), 3, "3");
225  vehicleColorer.addScheme(scheme);
226  scheme = GUIColorScheme("by acceleration", RGBColor(179, 179, 179, 255), "0");
227  scheme.addColor(RGBColor(255, 0, 0, 255), -SUMOVTypeParameter::getDefaultDecel());
228  scheme.addColor(RGBColor(255, 255, 0, 255), -0.1);
229  scheme.addColor(RGBColor(0, 255, 255, 255), 0.1);
230  scheme.addColor(RGBColor(0, 0, 255, 255), SUMOVTypeParameter::getDefaultAccel());
231  vehicleColorer.addScheme(scheme);
232  scheme = GUIColorScheme("by time gap", RGBColor(255, 255, 0, 255), "0");
233  scheme.addColor(RGBColor(179, 179, 179, 255), -1);
234  scheme.addColor(RGBColor(0, 255, 255, 255), 1);
235  scheme.addColor(RGBColor(0, 0, 255, 255), 2);
236  vehicleColorer.addScheme(scheme);
237 
239  personColorer.addScheme(GUIColorScheme("given person/type color", RGBColor::YELLOW, "", true));
241  personColorer.addScheme(GUIColorScheme("given/assigned person color", RGBColor::YELLOW, "", true));
242  personColorer.addScheme(GUIColorScheme("given/assigned type color", RGBColor::YELLOW, "", true));
243  scheme = GUIColorScheme("by speed", RGBColor::RED);
244  scheme.addColor(RGBColor::YELLOW, (SUMOReal)(2.5 / 3.6));
245  scheme.addColor(RGBColor::GREEN, (SUMOReal)(5 / 3.6));
246  scheme.addColor(RGBColor::BLUE, (SUMOReal)(10 / 3.6));
247  personColorer.addScheme(scheme);
248  scheme = GUIColorScheme("by mode", RGBColor::YELLOW); // walking
249  scheme.addColor(RGBColor::BLUE, (SUMOReal)(1)); // riding
250  scheme.addColor(RGBColor::RED, (SUMOReal)(2)); // stopped
251  scheme.addColor(RGBColor::GREEN, (SUMOReal)(3)); // waiting for ride
252  personColorer.addScheme(scheme);
253  scheme = GUIColorScheme("by waiting time", RGBColor::BLUE);
254  scheme.addColor(RGBColor::CYAN, (SUMOReal)30);
255  scheme.addColor(RGBColor::GREEN, (SUMOReal)100);
256  scheme.addColor(RGBColor::YELLOW, (SUMOReal)200);
257  scheme.addColor(RGBColor::RED, (SUMOReal)300);
258  personColorer.addScheme(scheme);
259  scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true);
260  scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected");
261  personColorer.addScheme(scheme);
262  personColorer.addScheme(GUIColorScheme("by angle", RGBColor::YELLOW, "", true));
263 
264 
265 #ifdef HAVE_INTERNAL
266  edgeColorer.addScheme(GUIColorScheme("uniform (streetwise)", RGBColor::BLACK, "", true));
268  scheme = GUIColorScheme("by selection (streetwise)", RGBColor(179, 179, 179, 255), "unselected", true);
269  scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected");
270  edgeColorer.addScheme(scheme);
271  scheme = GUIColorScheme("by purpose (streetwise)", RGBColor(), "normal", true);
272  scheme.addColor(RGBColor(128, 0, 128, 255), 1, "connector"); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_CONNECTOR
273  scheme.addColor(RGBColor::BLUE, 2, "internal"); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_INTERNAL
274  edgeColorer.addScheme(scheme);
275  scheme = GUIColorScheme("by allowed speed (streetwise)", RGBColor::RED);
276  scheme.addColor(RGBColor::BLUE, (SUMOReal)(150.0 / 3.6));
277  edgeColorer.addScheme(scheme);
278  scheme = GUIColorScheme("by current occupancy (streetwise)", RGBColor::BLUE);
279  scheme.addColor(RGBColor::RED, (SUMOReal)0.95);
280  edgeColorer.addScheme(scheme);
281  scheme = GUIColorScheme("by current speed (streetwise)", RGBColor::RED);
282  scheme.addColor(RGBColor::BLUE, (SUMOReal)(150.0 / 3.6));
283  edgeColorer.addScheme(scheme);
284  scheme = GUIColorScheme("by current flow (streetwise)", RGBColor::BLUE);
285  scheme.addColor(RGBColor::RED, (SUMOReal)5000);
286  edgeColorer.addScheme(scheme);
287  scheme = GUIColorScheme("by relative speed (streetwise)", RGBColor::RED);
288  scheme.addColor(RGBColor::BLUE, (SUMOReal)1);
289  edgeColorer.addScheme(scheme);
290 #endif
291 
293  scheme = GUIColorScheme("by selection", RGBColor(179, 179, 179, 255), "unselected", true);
294  scheme.addColor(RGBColor(0, 102, 204, 255), 1, "selected");
295  junctionColorer.addScheme(scheme);
296 }
297 
298 
299 size_t
301 #ifdef HAVE_INTERNAL
302  if (UseMesoSim) {
303  return edgeColorer.getActive();
304  }
305 #endif
306  return laneColorer.getActive();
307 }
308 
309 
312 #ifdef HAVE_INTERNAL
313  if (UseMesoSim) {
314  return edgeColorer.getScheme();
315  }
316 #endif
317  return laneColorer.getScheme();
318 }
319 
320 
321 void
323  dev << "<viewsettings>\n";
324  dev << " <scheme name=\"" << name << "\">\n";
325  dev << " <opengl antialiase=\"" << antialiase << "\" dither=\"" << dither << "\"/>\n";
326  dev << " <background backgroundColor=\"" << backgroundColor << "\"\n"
327  << " showGrid=\"" << showGrid
328  << "\" gridXSize=\"" << gridXSize << "\" gridYSize=\"" << gridYSize << "\"/>\n";
329  dev << " <edges laneEdgeMode=\"" << getLaneEdgeMode()
330  << "\" laneShowBorders=\"" << laneShowBorders
331  << "\" showLinkDecals=\"" << showLinkDecals
332  << "\" showRails=\"" << showRails
333  << "\" hideConnectors=\"" << hideConnectors << "\"\n"
334  << " " << edgeName.print("edgeName") << "\n"
335  << " " << internalEdgeName.print("internalEdgeName") << "\n"
336  << " " << cwaEdgeName.print("cwaEdgeName") << "\n"
337  << " " << streetName.print("streetName") << ">\n";
338  laneColorer.save(dev);
339 #ifdef HAVE_INTERNAL
340  edgeColorer.save(dev);
341 #endif
342  dev << " </edges>\n";
343 
344  dev << " <vehicles vehicleMode=\"" << vehicleColorer.getActive()
345  << "\" vehicleQuality=\"" << vehicleQuality
346  << "\" minVehicleSize=\"" << minVehicleSize
347  << "\" vehicleExaggeration=\"" << vehicleExaggeration
348  << "\" showBlinker=\"" << showBlinker << "\"\n"
349  << " " << vehicleName.print("vehicleName")
350  << ">\n";
351  vehicleColorer.save(dev);
352  dev << " </vehicles>\n";
353  dev << " <persons personMode=\"" << personColorer.getActive()
354  << "\" personQuality=\"" << personQuality
355  << "\" minPersonSize=\"" << minPersonSize
356  << "\" personExaggeration=\"" << personExaggeration
357  << "\" " << personName.print("personName")
358  << ">\n";
359  personColorer.save(dev);
360  dev << " </persons>\n";
361 
362  dev << " <junctions junctionMode=\"" << junctionColorer.getActive()
363  << "\" drawLinkTLIndex=\"" << drawLinkTLIndex
364  << "\" drawLinkJunctionIndex=\"" << drawLinkJunctionIndex << "\"\n"
365  << " " << junctionName.print("junctionName") << "\n"
366  << " " << internalJunctionName.print("internalJunctionName") << "\n"
367  << " showLane2Lane=\"" << showLane2Lane << "\""
368  << " drawShape=\"" << drawJunctionShape << "\">\n";
369  junctionColorer.save(dev);
370  dev << " </junctions>\n";
371 
372  dev << " <additionals addMode=\"" << addMode
373  << "\" minAddSize=\"" << minAddSize
374  << "\" addExaggeration=\"" << addExaggeration << "\"\n"
375  << " " << addName.print("addName")
376  << "/>\n";
377 
378  dev << " <pois poiExaggeration=\"" << poiExaggeration
379  << "\" minPOISize=\"" << minPOISize << "\"\n"
380  << " " << poiName.print("poiName")
381  << "/>\n";
382 
383  dev << " <polys polyExaggeration=\"" << polyExaggeration
384  << "\" minPolySize=\"" << minPolySize << "\"\n"
385  << " " << polyName.print("polyName")
386  << "/>\n";
387 
388  dev << " <legend showSizeLegend=\"" << showSizeLegend << "\"/>\n";
389  dev << " </scheme>\n";
390  dev << "</viewsettings>\n";
391 }
392 
393 
394 bool
396  if (antialiase != v2.antialiase) {
397  return false;
398  }
399  if (dither != v2.dither) {
400  return false;
401  }
402  if (backgroundColor != v2.backgroundColor) {
403  return false;
404  }
405  if (showGrid != v2.showGrid) {
406  return false;
407  }
408  if (gridXSize != v2.gridXSize) {
409  return false;
410  }
411  if (gridYSize != v2.gridYSize) {
412  return false;
413  }
414 
415 #ifdef HAVE_INTERNAL
416  if (!(edgeColorer == v2.edgeColorer)) {
417  return false;
418  }
419 #endif
420  if (!(laneColorer == v2.laneColorer)) {
421  return false;
422  }
423  if (laneShowBorders != v2.laneShowBorders) {
424  return false;
425  }
426  if (showLinkDecals != v2.showLinkDecals) {
427  return false;
428  }
429  if (showRails != v2.showRails) {
430  return false;
431  }
432  if (edgeName != v2.edgeName) {
433  return false;
434  }
436  return false;
437  }
438  if (cwaEdgeName != v2.cwaEdgeName) {
439  return false;
440  }
441  if (streetName != v2.streetName) {
442  return false;
443  }
444  if (hideConnectors != v2.hideConnectors) {
445  return false;
446  }
448  return false;
449  }
450  if (!(vehicleColorer == v2.vehicleColorer)) {
451  return false;
452  }
453  if (vehicleQuality != v2.vehicleQuality) {
454  return false;
455  }
456  if (minVehicleSize != v2.minVehicleSize) {
457  return false;
458  }
460  return false;
461  }
462  if (showBlinker != v2.showBlinker) {
463  return false;
464  }
466  return false;
467  }
468  if (drawMinGap != v2.drawMinGap) {
469  return false;
470  }
471  if (vehicleName != v2.vehicleName) {
472  return false;
473  }
474  if (!(personColorer == v2.personColorer)) {
475  return false;
476  }
477  if (personQuality != v2.personQuality) {
478  return false;
479  }
480  if (minPersonSize != v2.minPersonSize) {
481  return false;
482  }
484  return false;
485  }
486  if (personName != v2.personName) {
487  return false;
488  }
489  if (!(junctionColorer == v2.junctionColorer)) {
490  return false;
491  }
492  if (drawLinkTLIndex != v2.drawLinkTLIndex) {
493  return false;
494  }
496  return false;
497  }
498  if (junctionName != v2.junctionName) {
499  return false;
500  }
502  return false;
503  }
504 
505  if (showLane2Lane != v2.showLane2Lane) {
506  return false;
507  }
508 
510  return false;
511  }
512 
513  if (addMode != v2.addMode) {
514  return false;
515  }
516  if (minAddSize != v2.minAddSize) {
517  return false;
518  }
519  if (addExaggeration != v2.addExaggeration) {
520  return false;
521  }
522  if (addName != v2.addName) {
523  return false;
524  }
525 
526  if (minPOISize != v2.minPOISize) {
527  return false;
528  }
529  if (poiExaggeration != v2.poiExaggeration) {
530  return false;
531  }
532  if (poiName != v2.poiName) {
533  return false;
534  }
535 
536  if (minPolySize != v2.minPolySize) {
537  return false;
538  }
540  return false;
541  }
542  if (polyName != v2.polyName) {
543  return false;
544  }
545 
546  if (showSizeLegend != v2.showSizeLegend) {
547  return false;
548  }
549 
550  return true;
551 }
552 
553 
554 
555 /****************************************************************************/
556 
float vehicleExaggeration
The vehicle exaggeration (upscale)
GUIVisualizationTextSettings junctionName
static const RGBColor BLUE
Definition: RGBColor.h:191
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.
is a pedestrian
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
static const RGBColor WHITE
Definition: RGBColor.h:195
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
float polyExaggeration
The additional shapes (upscale)
GUIColorer laneColorer
The lane colorer.
Stores the information about how to visualize structures.
vehicle is a bicycle
float poiExaggeration
The additional shapes (upscale)
vehicle is a small delivery vehicle
bool drawLaneChangePreference
Information whether the lane change preference shall be drawn.
bool showRails
Information whether rails shall be drawn.
GUIVisualizationTextSettings vehicleName
void addScheme(GUIColorScheme scheme)
Definition: GUIColorer.h:104
bool operator==(const GUIVisualizationSettings &vs2)
Assignment operator.
GUIVisualizationTextSettings cwaEdgeName
bool laneShowBorders
Information whether lane borders shall be drawn.
static const RGBColor BLACK
Definition: RGBColor.h:196
const SVCPermissions SVCAll
bool dither
Information whether dithering shall be enabled.
float personExaggeration
The person exaggeration (upscale)
size_t getActive() const
Definition: GUIColorer.h:72
GUIColorer vehicleColorer
The vehicle colorer.
GUIVisualizationTextSettings edgeName
static const RGBColor GREEN
Definition: RGBColor.h:190
static const RGBColor GREY
Definition: RGBColor.h:197
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.
static const RGBColor MAGENTA
Definition: RGBColor.h:194
GUIColorer personColorer
The person colorer.
GUIVisualizationTextSettings internalJunctionName
GUIColorer junctionColorer
The junction colorer.
void setAllowsNegativeValues(bool value)
SUMOReal gridXSize
Information about the grid spacings.
vehicle is a passenger car (a "normal" car)
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.
vehicle is a moped
vehicle is a taxi
vehicle is a bus
static const RGBColor YELLOW
Definition: RGBColor.h:192
static const RGBColor RED
Definition: RGBColor.h:189
float minPersonSize
The minimum size of persons to let them be drawn.
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
static const RGBColor CYAN
Definition: RGBColor.h:193
static SUMOReal getDefaultDecel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default deceleration for the given vehicle class This needs to be a function because the ...
GUIColorScheme & getScheme()
Definition: GUIColorer.h:76
unsigned int addColor(const RGBColor &color, const SUMOReal threshold, const std::string &name="")
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.
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
static SUMOReal getDefaultAccel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default acceleration for the given vehicle class This needs to be a function because the ...
int vehicleQuality
The quality of vehicle drawing.
void save(OutputDevice &dev) const
Definition: GUIColorer.h:93
float minPolySize
The minimum size of shapes to let them be drawn.
GUIVisualizationTextSettings polyName