Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIVisualizationSettings.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// Stores the information about how to visualize structures
21/****************************************************************************/
22#include <config.h>
23
24#include <map>
25#include <vector>
28
30#include "GUIPropertyScheme.h"
31
32// ===========================================================================
33// static members
34// ===========================================================================
35
37
38// -------------------------------------------------------------------------
39// color constants for link states
40// -------------------------------------------------------------------------
41
44const RGBColor SUMO_color_TL_RED(255, 0, 0);
50const RGBColor SUMO_color_MAJOR(255, 255, 255);
51const RGBColor SUMO_color_MINOR(51, 51, 51);
52const RGBColor SUMO_color_EQUAL(128, 128, 128);
53const RGBColor SUMO_color_STOP(128, 0, 128);
55const RGBColor SUMO_color_ZIPPER(192, 128, 64);
57
58// -------------------------------------------------------------------------
59// color constants for other objects
60// -------------------------------------------------------------------------
61
68
69
70// -------------------------------------------------------------------------
71// color constants for other objects
72// -------------------------------------------------------------------------
73
75const RGBColor GUIVisualizationCandidateColorSettings::source(0, 255, 255, 255); // Cyan
76const RGBColor GUIVisualizationCandidateColorSettings::target(0, 255, 0, 255); // Green
77const RGBColor GUIVisualizationCandidateColorSettings::special(255, 0, 255, 255); // Magenta
78const RGBColor GUIVisualizationCandidateColorSettings::conflict(255, 255, 0, 255); // Yellow
79const RGBColor GUIVisualizationCandidateColorSettings::invalid(128, 128, 128, 255); // Yellow
80
81// -------------------------------------------------------------------------
82// Netedit size values
83// -------------------------------------------------------------------------
84
95
96// -------------------------------------------------------------------------
97// additional values
98// -------------------------------------------------------------------------
99
101
102// -------------------------------------------------------------------------
103// additional values
104// -------------------------------------------------------------------------
105
128
129// -------------------------------------------------------------------------
130// detector values
131// -------------------------------------------------------------------------
132
146
147// -------------------------------------------------------------------------
148// StoppingPlace values
149// -------------------------------------------------------------------------
150
159
160// -------------------------------------------------------------------------
161// Dotted contour values
162// -------------------------------------------------------------------------
163
172
173// -------------------------------------------------------------------------
174// 3D light presets
175// -------------------------------------------------------------------------
176const RGBColor OSG_color_AMBIENT(32, 32, 32, 255);
177const RGBColor OSG_color_DIFFUSE(64, 64, 64, 255);
178const RGBColor OSG_color_SKY(51, 51, 102, 255);
179
180// -------------------------------------------------------------------------
181// widths of certain netedit objects
182// -------------------------------------------------------------------------
183
186
187// -------------------------------------------------------------------------
188// details of certain netedit objects (0 = drawn always)
189// -------------------------------------------------------------------------
190
192
193// -------------------------------------------------------------------------
194// scheme names
195// -------------------------------------------------------------------------
196
197const std::string GUIVisualizationSettings::SCHEME_NAME_EDGE_PARAM_NUMERICAL("by param (numerical, streetwise)");
198const std::string GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL("by param (numerical, lanewise)");
199const std::string GUIVisualizationSettings::SCHEME_NAME_PARAM_NUMERICAL("by param (numerical)");
200const std::string GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL("by edgeData (numerical, streetwise)");
201const std::string GUIVisualizationSettings::SCHEME_NAME_DATA_ATTRIBUTE_NUMERICAL("by attribute (numerical)");
202const std::string GUIVisualizationSettings::SCHEME_NAME_SELECTION("by selection");
203const std::string GUIVisualizationSettings::SCHEME_NAME_TYPE("by type");
204const std::string GUIVisualizationSettings::SCHEME_NAME_PERMISSION_CODE("by permission code");
205const std::string GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_LIVE("by live edgeData");
206
207const double GUIVisualizationSettings::MISSING_DATA(std::numeric_limits<double>::max());
209
210std::map<std::string, std::vector<RGBColor> > GUIVisualizationSettings::RAINBOW_SCHEMES({
211 // cannot use predefined colors to avoid "static initialization order fiasco"
212 {"classic", std::vector<RGBColor>({RGBColor(255, 0, 0), RGBColor(255, 128, 0), RGBColor(255, 255, 0), RGBColor(0, 255, 0), RGBColor(0, 255, 255), RGBColor(0, 0, 255), RGBColor(255, 0, 255)})},
213 {"YlOrRd", std::vector<RGBColor>({RGBColor(255, 255, 178), RGBColor(254, 217, 118), RGBColor(254, 178, 76), RGBColor(253, 141, 60), RGBColor(252, 78, 42), RGBColor(227, 26, 28), RGBColor(177, 0, 38)})},
214 {"RdBu", std::vector<RGBColor>({RGBColor(178, 24, 43), RGBColor(239, 138, 98), RGBColor(253, 219, 199), RGBColor(247, 247, 247), RGBColor(209, 229, 240), RGBColor(103, 169, 207), RGBColor(33, 102, 172)})},
215});
216
217// color constants for scheme background
218#define COL_SCHEME_EMISSION RGBColor(255,255,210)
219#define COL_SCHEME_MISC RGBColor(210,220,255)
220#define COL_SCHEME_STATIC RGBColor(230,230,230)
221#define COL_SCHEME_DYNAMIC RGBColor(220,255,220)
222
223// ===========================================================================
224// member method definitions
225// ===========================================================================
226
227// ---------------------------------------------------------------------------
228// GUIVisualizationTextSettings - methods
229// ---------------------------------------------------------------------------
230
231GUIVisualizationTextSettings::GUIVisualizationTextSettings(bool _showText, double _size, RGBColor _color, RGBColor _bgColor, bool _constSize, bool _onlySelected) :
232 showText(_showText),
233 size(_size),
234 color(_color),
235 bgColor(_bgColor),
236 constSize(_constSize),
237 onlySelected(_onlySelected) {
238}
239
240
241bool
243 return (showText == other.showText) &&
244 (size == other.size) &&
245 (color == other.color) &&
246 (bgColor == other.bgColor) &&
247 (constSize == other.constSize) &&
248 (onlySelected == other.onlySelected);
249}
250
251
252bool
254 return (showText != other.showText) ||
255 (size != other.size) ||
256 (color != other.color) ||
257 (bgColor != other.bgColor) ||
258 (constSize != other.constSize) ||
259 (onlySelected != other.onlySelected);
260}
261
262
263void
264GUIVisualizationTextSettings::print(OutputDevice& dev, const std::string& name) const {
265 dev.writeAttr(name + "_show", showText);
266 dev.writeAttr(name + "_size", size);
267 dev.writeAttr(name + "_color", color);
268 dev.writeAttr(name + "_bgColor", bgColor);
269 dev.writeAttr(name + "_constantSize", constSize);
270 dev.writeAttr(name + "_onlySelected", onlySelected);
271}
272
273
274double
275GUIVisualizationTextSettings::scaledSize(double scale, double constFactor) const {
276 return constSize ? (size / scale) : (size * constFactor);
277}
278
279
280bool
282 return showText && (!onlySelected || o == nullptr || gSelected.isSelected(o));
283}
284
285// ---------------------------------------------------------------------------
286// GUIVisualizationRainbowSettings - methods
287// ---------------------------------------------------------------------------
288
289GUIVisualizationRainbowSettings::GUIVisualizationRainbowSettings(bool _hideMin, double _minThreshold, bool _hideMax, double _maxThreshold, bool _setNeutral, double _neutralThreshold, bool _fixRange) :
290 hideMin(_hideMin),
291 minThreshold(_minThreshold),
292 hideMax(_hideMax),
293 maxThreshold(_maxThreshold),
294 setNeutral(_setNeutral),
295 neutralThreshold(_neutralThreshold),
296 fixRange(_fixRange),
297 colors(GUIVisualizationSettings::RAINBOW_SCHEMES["classic"])
298{ }
299
300
301bool
303 return (hideMin == other.hideMin) &&
304 (minThreshold == other.minThreshold) &&
305 (hideMin == other.hideMin) &&
306 (maxThreshold == other.maxThreshold) &&
307 (setNeutral == other.setNeutral) &&
309 (fixRange == other.fixRange);
310}
311
312
313bool
315 return !((*this) == other);
316}
317
318
319void
320GUIVisualizationRainbowSettings::print(OutputDevice& dev, const std::string& name) const {
321 dev.writeAttr(name + "HideCheck", hideMin);
322 dev.writeAttr(name + "HideThreshold", minThreshold);
323 dev.writeAttr(name + "HideCheck2", hideMax);
324 dev.writeAttr(name + "HideThreshold2", maxThreshold);
325 dev.writeAttr(name + "SetNeutral", setNeutral);
326 dev.writeAttr(name + "NeutralThreshold", neutralThreshold);
327 dev.writeAttr(name + "FixRange", fixRange);
328}
329
330
331// ---------------------------------------------------------------------------
332// GUIVisualizationSizeSettings - methods
333// ---------------------------------------------------------------------------
334
335GUIVisualizationSizeSettings::GUIVisualizationSizeSettings(double _minSize, double _exaggeration, bool _constantSize, bool _constantSizeSelected) :
336 minSize(_minSize),
337 exaggeration(_exaggeration),
338 constantSize(_constantSize),
339 constantSizeSelected(_constantSizeSelected) {
340}
341
342
343double
345 // declare exaggeration final
346 double exaggerationFinal;
348 if (constantSize && (!constantSizeSelected || (o == nullptr) || gSelected.isSelected(o))) {
349 exaggerationFinal = MAX2(exaggeration, exaggeration * factor / s.scale);
350 } else if (!constantSizeSelected || (o == nullptr) || gSelected.isSelected(o)) {
351 exaggerationFinal = exaggeration;
352 } else {
353 exaggerationFinal = 1;
354 }
355 // add selectorFrameScale
356 if ((o != nullptr) && gSelected.isSelected(o)) {
357 return (exaggerationFinal * s.selectorFrameScale);
358 } else {
359 return exaggerationFinal;
360 }
361}
362
363
364bool
371
372
373bool
380
381
382void
383GUIVisualizationSizeSettings::print(OutputDevice& dev, const std::string& name) const {
384 dev.writeAttr(name + "_minSize", minSize);
385 dev.writeAttr(name + "_exaggeration", exaggeration);
386 dev.writeAttr(name + "_constantSize", constantSize);
387 dev.writeAttr(name + "_constantSizeSelected", constantSizeSelected);
388}
389
390// ---------------------------------------------------------------------------
391// GUIVisualizationColorSettings - methods
392// ---------------------------------------------------------------------------
393
395 selectionColor(0, 0, 204, 255),
396 selectedEdgeColor(0, 0, 204, 255),
397 selectedLaneColor(0, 0, 128, 255),
398 selectedConnectionColor(0, 0, 100, 255),
399 selectedProhibitionColor(0, 0, 120, 255),
400 selectedCrossingColor(0, 100, 196, 255),
401 selectedAdditionalColor(0, 0, 150, 255),
402 selectedRouteColor(0, 0, 150, 255),
403 selectedVehicleColor(0, 0, 100, 255),
404 selectedPersonColor(0, 0, 120, 255),
405 selectedPersonPlanColor(0, 0, 130, 255),
406 selectedContainerColor(0, 0, 120, 255),
407 selectedContainerPlanColor(0, 0, 130, 255),
408 selectedEdgeDataColor(0, 0, 150, 255),
409 busStopColor(76, 170, 50),
410 busStopColorSign(255, 235, 0),
411 trainStopColor(76, 170, 50),
412 trainStopColorSign(255, 235, 0),
413 containerStopColor(83, 89, 172),
414 containerStopColorSign(177, 184, 186, 171),
415 chargingStationColor(114, 210, 252),
416 chargingStationColorSign(255, 235, 0),
417 chargingStationColorCharge(255, 180, 0),
418 parkingAreaColor(83, 89, 172),
419 parkingAreaColorSign(177, 184, 186),
420 parkingSpaceColorContour(0, 255, 0),
421 parkingSpaceColor(255, 200, 200),
422 stopColor(220, 20, 30),
423 waypointColor(0, 127, 14),
424 vehicleTripColor(255, 128, 0),
425 stopPersonColor(255, 0, 0),
426 personTripColor(200, 0, 255),
427 walkColor(0, 255, 0),
428 rideColor(0, 0, 255),
429 stopContainerColor(255, 0, 0),
430 transportColor(100, 200, 0),
431 transhipColor(100, 0, 200) {
432}
433
434
435bool
437 return (selectionColor == v2.selectionColor) &&
450 (busStopColor == v2.busStopColor) &&
463 (stopColor == v2.stopColor) &&
468 (walkColor == v2.walkColor) &&
469 (rideColor == v2.rideColor) &&
473}
474
475
476bool
478 return (selectionColor != v2.selectionColor) ||
491 (busStopColor != v2.busStopColor) ||
504 (stopColor != v2.stopColor) ||
509 (walkColor != v2.walkColor) ||
510 (rideColor != v2.rideColor) ||
514}
515
516// ---------------------------------------------------------------------------
517// GUIVisualizationWidthSettings - methods
518// ---------------------------------------------------------------------------
519
521 tripWidth(0.2),
522 personTripWidth(0.25),
523 walkWidth(0.25),
524 rideWidth(0.25),
525 transportWidth(0.25),
526 transhipWidth(0.25) {
527}
528
529
530bool
539
540
541bool
550
551// ---------------------------------------------------------------------------
552// GUIVisualizationWidthSettings - methods
553// ---------------------------------------------------------------------------
554
555GUIVisualizationSettings::GUIVisualizationSettings(const std::string& _name, bool _netedit) :
556 name(_name),
557 netedit(_netedit),
558 angle(0),
559 dither(false),
560 fps(false),
561 trueZ(false),
562 backgroundColor(RGBColor::WHITE),
563 showGrid(false), gridXSize(100), gridYSize(100),
564 laneShowBorders(false), showBikeMarkings(true), showLinkDecals(true),
565 realisticLinkRules(false),
566 showLinkRules(true),
567 showRails(true),
568 edgeName(false, 60, RGBColor::ORANGE),
569 internalEdgeName(false, 45, RGBColor(128, 64, 0, 255)),
570 cwaEdgeName(false, 60, RGBColor::MAGENTA),
571 streetName(false, 60, RGBColor::YELLOW),
572 edgeValue(false, 100, RGBColor::CYAN),
573 edgeScaleValue(false, 100, RGBColor::BLUE),
574 hideConnectors(false),
575 laneWidthExaggeration(1),
576 laneMinSize(0),
577 showLaneDirection(false),
578 showSublanes(true),
579 spreadSuperposed(false),
580 disableHideByZoom(false),
581 edgeParam("EDGE_KEY"),
582 laneParam("LANE_KEY"),
583 vehicleParam("PARAM_NUMERICAL"),
584 vehicleScaleParam("PARAM_NUMERICAL"),
585 vehicleTextParam("PARAM_TEXT"),
586 edgeData("speed"),
587 edgeDataID(""),
588 edgeDataScaling(""),
589 edgeValueRainBow(false, 0, false, 200, false, 0, false),
590 vehicleQuality(0), showBlinker(true),
591 drawLaneChangePreference(false),
592 drawMinGap(false),
593 drawBrakeGap(false),
594 showBTRange(false),
595 showRouteIndex(false),
596 scaleLength(true),
597 drawReversed(false),
598 showParkingInfo(false),
599 showChargingInfo(false),
600 vehicleSize(1),
601 vehicleName(false, 60, RGBColor(204, 153, 0, 255)),
602 vehicleValue(false, 80, RGBColor::CYAN),
603 vehicleScaleValue(false, 80, RGBColor::GREY),
604 vehicleText(false, 80, RGBColor::RED),
605 personQuality(netedit ? 2 : 0),
606 personSize(1),
607 personName(false, 60, RGBColor(0, 153, 204, 255)),
608 personValue(false, 80, RGBColor::CYAN),
609 showPedestrianNetwork(true),
610 pedestrianNetworkColor(RGBColor(179, 217, 255)),
611 containerQuality(0),
612 containerSize(1),
613 containerName(false, 60, RGBColor(0, 153, 204, 255)),
614 drawLinkTLIndex(false, 65, RGBColor(128, 128, 255, 255), RGBColor::INVISIBLE, false),
615 drawLinkJunctionIndex(false, 65, RGBColor(128, 128, 255, 255), RGBColor::INVISIBLE, false),
616 junctionID(false, 60, RGBColor(0, 255, 128, 255)),
617 junctionName(false, 60, RGBColor(192, 255, 128, 255)),
618 internalJunctionName(false, 50, RGBColor(0, 204, 128, 255)),
619 tlsPhaseIndex(false, 150, RGBColor::YELLOW),
620 tlsPhaseName(false, 150, RGBColor::ORANGE),
621 showLane2Lane(false),
622 drawJunctionShape(true),
623 drawCrossingsAndWalkingareas(true),
624 junctionSize(1),
625 junctionValueRainBow(false, 0, false, 100, false, 0, false),
626 addMode(0),
627 addSize(1),
628 addName(false, 60, RGBColor(255, 0, 128, 255)),
629 addFullName(false, 60, RGBColor(255, 0, 128, 255)),
630 poiSize(0),
631 poiDetail(16),
632 poiName(false, 50, RGBColor(0, 127, 70, 255)),
633 poiType(false, 60, RGBColor(0, 127, 70, 255)),
634 poiText(false, 80, RGBColor(140, 0, 255, 255)),
635 poiTextParam("PARAM_TEXT"),
636 poiUseCustomLayer(false),
637 poiCustomLayer(0),
638 polySize(0), polyName(false, 50, RGBColor(255, 0, 128, 255)),
639 polyType(false, 60, RGBColor(255, 0, 128, 255)),
640 polyUseCustomLayer(false),
641 polyCustomLayer(0),
642 dataValue(false, 100, RGBColor::CYAN),
643 tazRelWidthExaggeration(1),
644 edgeRelWidthExaggeration(1),
645 relDataAttr("count"),
646 dataValueRainBow(false, -100, false, 100, false, 0, false),
647 show3DTLSLinkMarkers(true),
648 show3DTLSDomes(true),
649 generate3DTLSModels(false),
650 show3DHeadUpDisplay(true),
651 ambient3DLight(OSG_color_AMBIENT),
652 diffuse3DLight(OSG_color_DIFFUSE),
653 skyColor(OSG_color_SKY),
654 showSizeLegend(true),
655 showColorLegend(false),
656 showVehicleColorLegend(false),
657 gaming(false),
658 drawBoundaries(false),
659 selectorFrameScale(1.),
660 drawForViewObjectsHandler(false),
661 drawForRectangleSelection(false),
662 forceDrawForRectangleSelection(false),
663 disableDottedContours(false),
664 geometryIndices(false, 50, RGBColor(255, 0, 128, 255)),
665 secondaryShape(false),
666 lefthand(false),
667 disableLaneIcons(false),
668 myIgnoreHideByZoom(false) {
669 // init defaults depending of netedit or SUMO-GUI
670 if (netedit) {
672 } else {
674 }
675}
676
677
678bool
679GUIVisualizationSettings::checkDrawJunction(const Boundary& b, const bool selected) const {
681 return false;
682 } else if (junctionSize.constantSize) {
683 return true;
684 } else if (junctionSize.constantSizeSelected && selected) {
685 return true;
687 return true;
689 return true;
690 } else if (junctionID.showText && junctionID.constSize) {
691 return true;
693 return true;
695 return true;
697 return true;
699 return true;
700 } else {
701 return (scale * MAX2(b.getWidth(), b.getHeight())) > BoundarySizeDrawing;
702 }
703}
704
705
706bool
709 // needed if we're selecting using a rectangle
710 return true;
711 } else if (disableHideByZoom) {
712 return true;
713 } else if (myIgnoreHideByZoom) {
714 return true;
715 } else {
716 return (scale * MAX2(b.getWidth(), b.getHeight())) > BoundarySizeDrawing;
717 }
718}
719
720
721void
723 // general
724 if (disableHideByZoom) {
725 myIgnoreHideByZoom = true;
726 // junctions
728 myIgnoreHideByZoom = true;
730 myIgnoreHideByZoom = true;
732 myIgnoreHideByZoom = true;
733 } else if (junctionID.showText && junctionID.constSize) {
734 myIgnoreHideByZoom = true;
736 myIgnoreHideByZoom = true;
738 myIgnoreHideByZoom = true;
740 myIgnoreHideByZoom = true;
742 myIgnoreHideByZoom = true;
743 // edges
744 } else if (edgeName.showText) {
745 myIgnoreHideByZoom = true;
747 myIgnoreHideByZoom = true;
749 myIgnoreHideByZoom = true;
750 } else if (streetName.showText && streetName.constSize) {
751 myIgnoreHideByZoom = true;
752 } else if (edgeValue.showText && edgeValue.constSize) {
753 myIgnoreHideByZoom = true;
755 myIgnoreHideByZoom = true;
756 // additionals
757 } else if (addSize.constantSize) {
758 myIgnoreHideByZoom = true;
759 } else if (addSize.constantSizeSelected) {
760 myIgnoreHideByZoom = true;
761 } else if (addName.showText && addName.constSize) {
762 myIgnoreHideByZoom = true;
764 myIgnoreHideByZoom = true;
765 // POIs
766 } else if (poiSize.constantSize) {
767 myIgnoreHideByZoom = true;
768 } else if (poiSize.constantSizeSelected) {
769 myIgnoreHideByZoom = true;
770 } else if (poiName.showText && poiName.constSize) {
771 myIgnoreHideByZoom = true;
772 } else if (poiType.showText && poiType.constSize) {
773 myIgnoreHideByZoom = true;
774 } else if (poiText.showText && poiText.constSize) {
775 myIgnoreHideByZoom = true;
776 // vehicles
777 } else if (vehicleSize.constantSize) {
778 myIgnoreHideByZoom = true;
780 myIgnoreHideByZoom = true;
782 myIgnoreHideByZoom = true;
784 myIgnoreHideByZoom = true;
786 myIgnoreHideByZoom = true;
788 myIgnoreHideByZoom = true;
789 // persons
790 } else if (personSize.constantSize) {
791 myIgnoreHideByZoom = true;
792 } else if (personSize.constantSizeSelected) {
793 myIgnoreHideByZoom = true;
794 } else if (personName.showText && personName.constSize) {
795 myIgnoreHideByZoom = true;
797 myIgnoreHideByZoom = true;
798 // containers
799 } else if (containerSize.constantSize) {
800 myIgnoreHideByZoom = true;
802 myIgnoreHideByZoom = true;
804 myIgnoreHideByZoom = true;
805 } else {
806 myIgnoreHideByZoom = false;
807 }
808}
809
810
811bool
812GUIVisualizationSettings::checkDrawAdditional(const Detail d, const bool selected) const {
814 return false;
815 } else if (myIgnoreHideByZoom) {
816 return true;
817 } else if (addSize.constantSize) {
818 return true;
819 } else if (addSize.constantSizeSelected && selected) {
820 return true;
821 } else if (addName.showText && addName.constSize) {
822 return true;
824 return true;
825 } else {
827 }
828}
829
830
831bool
832GUIVisualizationSettings::checkDrawPoly(const Boundary& b, const bool selected) const {
834 return false;
835 } else if (myIgnoreHideByZoom) {
836 return true;
837 } else if (polySize.constantSize) {
838 return true;
839 } else if (polySize.constantSizeSelected && selected) {
840 return true;
841 } else if (polyName.showText && polyName.constSize) {
842 return true;
843 } else if (polyType.showText && polyType.constSize) {
844 return true;
845 } else {
846 return (scale * MAX2(b.getWidth(), b.getHeight())) > BoundarySizeDrawing;
847 }
848}
849
850
851bool
852GUIVisualizationSettings::checkDrawPOI(const double w, const double h, const Detail d, const bool selected) const {
854 return false;
855 } else if (myIgnoreHideByZoom) {
856 return true;
857 } else if (poiSize.constantSize) {
858 return true;
859 } else if (poiSize.constantSizeSelected && selected) {
860 return true;
861 } else if (poiName.showText && poiName.constSize) {
862 return true;
863 } else if (poiType.showText && poiType.constSize) {
864 return true;
865 } else if (poiText.showText && poiText.constSize) {
866 return true;
867 } else if ((w > 0) && (h > 0)) {
868 return (scale * MAX2(w, h)) > BoundarySizeDrawing;
869 } else {
871 }
872}
873
874
875bool
876GUIVisualizationSettings::checkDrawVehicle(const Detail d, const bool selected) const {
878 return false;
879 } else if (myIgnoreHideByZoom) {
880 return true;
881 } else if (vehicleSize.constantSize) {
882 return true;
883 } else if (vehicleSize.constantSizeSelected && selected) {
884 return true;
886 return true;
888 return true;
890 return true;
892 return true;
893 } else {
895 }
896}
897
898
899bool
900GUIVisualizationSettings::checkDrawPerson(const Detail d, const bool selected) const {
902 return false;
903 } else if (myIgnoreHideByZoom) {
904 return true;
905 } else if (personSize.constantSize) {
906 return true;
907 } else if (personSize.constantSizeSelected && selected) {
908 return true;
909 } else if (personName.showText && personName.constSize) {
910 return true;
912 return true;
913 } else {
915 }
916}
917
918
919bool
920GUIVisualizationSettings::checkDrawContainer(const Detail d, const bool selected) const {
922 return false;
923 } else if (myIgnoreHideByZoom) {
924 return true;
925 } else if (containerSize.constantSize) {
926 return true;
927 } else if (containerSize.constantSizeSelected && selected) {
928 return true;
930 return true;
931 } else {
933 }
934}
935
936
937void
939 // just copy. Note: By default = operator is disabled to avoid accidental copies)
940 *this = s;
941}
942
943
944void
947 GUIColorScheme scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor::BLACK, TL("road"), true, 0);
948 scheme.addColor(RGBColor::GREY, 1, TL("sidewalk"));
949 scheme.addColor(RGBColor(192, 66, 44), 2, TL("bike lane"));
950 scheme.addColor(RGBColor(0, 0, 0, 0), 3, TL("green verge"));
951 scheme.addColor(RGBColor(150, 200, 200), 4, TL("waterway"));
952 scheme.addColor(RGBColor::BLACK, 5, TL("railway"));
953 scheme.addColor(RGBColor(64, 0, 64), 6, TL("rails on road"));
954 scheme.addColor(RGBColor(92, 92, 92), 7, TL("no passenger")); // paths, service roads etc
955 scheme.addColor(RGBColor::RED, 8, TL("closed")); // road closing
956 scheme.addColor(RGBColor::GREEN, 9, TL("connector")); // macro-connector
957 scheme.addColor(RGBColor::ORANGE, 10, TL("forbidden")); // forbidden road
958 scheme.addColor(RGBColor(200, 240, 240), 11, TL("airway"));
959 laneColorer.addScheme(scheme);
960 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
961 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
962 laneColorer.addScheme(scheme);
963 scheme = GUIColorScheme(SCHEME_NAME_PERMISSION_CODE, RGBColor(240, 240, 240), "nobody");
964 scheme.addColor(RGBColor(10, 10, 10), (double)SVC_PASSENGER, "passenger");
965 scheme.addColor(RGBColor(128, 128, 128), (double)SVC_PEDESTRIAN, "pedestrian");
966 scheme.addColor(RGBColor(80, 80, 80), (double)(SVC_PEDESTRIAN | SVC_DELIVERY), "pedestrian_delivery");
967 scheme.addColor(RGBColor(192, 66, 44), (double)SVC_BICYCLE, "bicycle");
968 scheme.addColor(RGBColor(40, 100, 40), (double)SVC_BUS, "bus");
969 scheme.addColor(RGBColor(166, 147, 26), (double)SVC_TAXI, "taxi");
970 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~SVC_NON_ROAD), "normal_road");
971 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_NON_ROAD)), "disallow_pedestrian");
972 scheme.addColor(RGBColor(255, 206, 0), (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_MOPED | SVC_NON_ROAD)), "motorway");
973 scheme.addColor(RGBColor(150, 200, 200), (double)SVC_SHIP, "waterway");
974 scheme.addColor(RGBColor::GREEN, (double)SVCAll, "all");
975 laneColorer.addScheme(scheme);
976 // ... traffic states ...
977 scheme = GUIColorScheme("by allowed speed (lanewise)", TL("by allowed speed (lanewise)"), RGBColor::RED);
978 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
979 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
980 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
981 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
982 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
983 laneColorer.addScheme(scheme);
984 scheme = GUIColorScheme("by current occupancy (lanewise, brutto)", TL("by current occupancy (lanewise, brutto)"), RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC);
985 scheme.addColor(RGBColor::GREEN, 0.25);
986 scheme.addColor(RGBColor::YELLOW, 0.5);
987 scheme.addColor(RGBColor::ORANGE, 0.75);
988 scheme.addColor(RGBColor::RED, 1.0);
989 laneColorer.addScheme(scheme);
990 scheme = GUIColorScheme("by current occupancy (lanewise, netto)", TL("by current occupancy (lanewise, netto)"), RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC);
991 scheme.addColor(RGBColor::GREEN, 0.25);
992 scheme.addColor(RGBColor::YELLOW, 0.5);
993 scheme.addColor(RGBColor::ORANGE, 0.75);
994 scheme.addColor(RGBColor::RED, 1.0);
995 laneColorer.addScheme(scheme);
996 scheme = GUIColorScheme("by first vehicle waiting time (lanewise)", TL("by first vehicle waiting time (lanewise)"), RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC);
997 scheme.addColor(RGBColor::CYAN, 30.);
998 scheme.addColor(RGBColor::GREEN, 100.);
999 scheme.addColor(RGBColor::YELLOW, 200.);
1000 scheme.addColor(RGBColor::RED, 300.);
1001 laneColorer.addScheme(scheme);
1002 scheme = GUIColorScheme("by lane number (streetwise)", TL("by lane number (streetwise)"), RGBColor::RED);
1003 scheme.addColor(RGBColor::BLUE, 5.);
1004 laneColorer.addScheme(scheme);
1005 // ... emissions ...
1006 scheme = GUIColorScheme("by CO2 emissions", TL("by CO2 emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1007 scheme.addColor(RGBColor::CYAN, 450);
1008 scheme.addColor(RGBColor::GREEN, 900);
1009 scheme.addColor(RGBColor::YELLOW, 1350);
1010 scheme.addColor(RGBColor::ORANGE, 1800);
1011 scheme.addColor(RGBColor::RED, 2250);
1012 scheme.addColor(RGBColor::MAGENTA, 3000);
1013 laneColorer.addScheme(scheme);
1014 scheme = GUIColorScheme("by CO emissions", TL("by CO emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1015 scheme.addColor(RGBColor::CYAN, 30);
1016 scheme.addColor(RGBColor::GREEN, 60);
1017 scheme.addColor(RGBColor::YELLOW, 90);
1018 scheme.addColor(RGBColor::ORANGE, 120);
1019 scheme.addColor(RGBColor::RED, 150);
1020 scheme.addColor(RGBColor::MAGENTA, 200);
1021 laneColorer.addScheme(scheme);
1022 scheme = GUIColorScheme("by PMx emissions", TL("by PMx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1023 scheme.addColor(RGBColor::CYAN, 0.3);
1024 scheme.addColor(RGBColor::GREEN, 0.5);
1025 scheme.addColor(RGBColor::YELLOW, 0.8);
1026 scheme.addColor(RGBColor::ORANGE, 1);
1027 scheme.addColor(RGBColor::RED, 1.3);
1028 scheme.addColor(RGBColor::MAGENTA, 1.6);
1029 laneColorer.addScheme(scheme);
1030 scheme = GUIColorScheme("by NOx emissions", TL("by NOx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1031 scheme.addColor(RGBColor::CYAN, 6);
1032 scheme.addColor(RGBColor::GREEN, 12);
1033 scheme.addColor(RGBColor::YELLOW, 18);
1034 scheme.addColor(RGBColor::ORANGE, 24);
1035 scheme.addColor(RGBColor::RED, 30);
1036 scheme.addColor(RGBColor::MAGENTA, 40);
1037 laneColorer.addScheme(scheme);
1038 scheme = GUIColorScheme("by HC emissions", TL("by HC emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1039 scheme.addColor(RGBColor::CYAN, 8);
1040 scheme.addColor(RGBColor::GREEN, 16);
1041 scheme.addColor(RGBColor::YELLOW, 24);
1042 scheme.addColor(RGBColor::ORANGE, 32);
1043 scheme.addColor(RGBColor::RED, 40);
1044 scheme.addColor(RGBColor::MAGENTA, 50);
1045 laneColorer.addScheme(scheme);
1046 scheme = GUIColorScheme("by fuel consumption", TL("by fuel consumption"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1047 scheme.addColor(RGBColor::CYAN, 0.2);
1048 scheme.addColor(RGBColor::GREEN, 0.4);
1049 scheme.addColor(RGBColor::YELLOW, 0.6);
1050 scheme.addColor(RGBColor::ORANGE, 0.8);
1051 scheme.addColor(RGBColor::RED, 1);
1052 scheme.addColor(RGBColor::MAGENTA, 1.3);
1053 laneColorer.addScheme(scheme);
1054 scheme = GUIColorScheme("by noise emissions (Harmonoise)", TL("by noise emissions (Harmonoise)"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1055 scheme.addColor(RGBColor::CYAN, 1.3);
1056 scheme.addColor(RGBColor::GREEN, 1.4);
1057 scheme.addColor(RGBColor::YELLOW, 1.6);
1058 scheme.addColor(RGBColor::ORANGE, 1.7);
1059 scheme.addColor(RGBColor::RED, 1.9);
1060 scheme.addColor(RGBColor::MAGENTA, 2.4);
1061 laneColorer.addScheme(scheme);
1062 // ... weights (experimental) ...
1063 scheme = GUIColorScheme("by global travel time", TL("by global travel time"), RGBColor::GREEN);
1064 scheme.addColor(RGBColor::RED, 100.);
1065 scheme.setAllowsNegativeValues(true);
1066 laneColorer.addScheme(scheme);
1067 scheme = GUIColorScheme("by global speed percentage", TL("by global speed percentage"), RGBColor::RED);
1068 scheme.addColor(RGBColor::YELLOW, 50.);
1069 scheme.addColor(RGBColor::GREEN, 100.);
1070 scheme.setAllowsNegativeValues(true);
1071 laneColorer.addScheme(scheme);
1072 scheme = GUIColorScheme("by given length/geometrical length", TL("by given length/geometrical length"), RGBColor::RED);
1073 scheme.addColor(RGBColor::ORANGE, 0.25);
1074 scheme.addColor(RGBColor::YELLOW, 0.5);
1075 scheme.addColor(RGBColor(179, 179, 179, 255), 1.);
1076 scheme.addColor(RGBColor::GREEN, 2.);
1077 scheme.addColor(RGBColor::CYAN, 4.);
1078 scheme.addColor(RGBColor::BLUE, 100.);
1079 laneColorer.addScheme(scheme);
1080 laneColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1081 scheme = GUIColorScheme("by loaded weight", TL("by loaded weight"), RGBColor::GREEN);
1082 scheme.addColor(RGBColor::RED, 100.);
1083 scheme.setAllowsNegativeValues(true);
1084 laneColorer.addScheme(scheme);
1085 scheme = GUIColorScheme("by priority", TL("by priority"), RGBColor::YELLOW);
1086 scheme.addColor(RGBColor::RED, -20.);
1087 scheme.addColor(RGBColor::GREEN, 20.);
1088 scheme.setAllowsNegativeValues(true);
1089 laneColorer.addScheme(scheme);
1090 scheme = GUIColorScheme("by height at start", TL("by height at start"), RGBColor::GREY);
1091 scheme.addColor(RGBColor::BLUE, -10.);
1092 scheme.addColor(RGBColor::RED, 10.);
1093 scheme.addColor(RGBColor::YELLOW, 50.);
1094 scheme.addColor(RGBColor::GREEN, 100.);
1095 scheme.addColor(RGBColor::MAGENTA, 200.);
1096 scheme.setAllowsNegativeValues(true);
1097 laneColorer.addScheme(scheme);
1098 scheme = GUIColorScheme("by height at geometry-segment start", TL("by height at geometry-segment start"), RGBColor::GREY);
1099 scheme.addColor(RGBColor::BLUE, -10.);
1100 scheme.addColor(RGBColor::RED, 10.);
1101 scheme.addColor(RGBColor::YELLOW, 50.);
1102 scheme.addColor(RGBColor::GREEN, 100.);
1103 scheme.addColor(RGBColor::MAGENTA, 200.);
1104 scheme.setAllowsNegativeValues(true);
1105 laneColorer.addScheme(scheme);
1106 scheme = GUIColorScheme("by inclination", TL("by inclination"), RGBColor::GREY);
1107 scheme.addColor(RGBColor::YELLOW, 0.1);
1108 scheme.addColor(RGBColor::RED, 0.3);
1109 scheme.addColor(RGBColor::GREEN, -0.1);
1110 scheme.addColor(RGBColor::BLUE, -0.3);
1111 scheme.setAllowsNegativeValues(true);
1112 laneColorer.addScheme(scheme);
1113 scheme = GUIColorScheme("by geometry-segment inclination", TL("by geometry-segment inclination"), RGBColor::GREY);
1114 scheme.addColor(RGBColor::YELLOW, 0.1);
1115 scheme.addColor(RGBColor::RED, 0.3);
1116 scheme.addColor(RGBColor::GREEN, -0.1);
1117 scheme.addColor(RGBColor::BLUE, -0.3);
1118 scheme.setAllowsNegativeValues(true);
1119 laneColorer.addScheme(scheme);
1120 scheme = GUIColorScheme("by average speed", TL("by average speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1121 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1122 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1123 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1124 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1125 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1126 laneColorer.addScheme(scheme);
1127 scheme = GUIColorScheme("by average relative speed ", TL("by average relative speed "), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1128 scheme.addColor(RGBColor::YELLOW, 0.25);
1129 scheme.addColor(RGBColor::GREEN, 0.5);
1130 scheme.addColor(RGBColor::CYAN, 0.75);
1131 scheme.addColor(RGBColor::BLUE, 1.);
1132 scheme.addColor(RGBColor::MAGENTA, 1.25);
1133 laneColorer.addScheme(scheme);
1134 scheme = GUIColorScheme("by routing device assumed speed ", TL("by routing device assumed speed "), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1135 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1136 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1137 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1138 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1139 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1140 laneColorer.addScheme(scheme);
1141 scheme = GUIColorScheme("by electricity consumption", TL("by electricity consumption"), RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION);
1142 scheme.addColor(RGBColor::CYAN, 0.2);
1143 scheme.addColor(RGBColor::GREEN, 0.4);
1144 scheme.addColor(RGBColor::YELLOW, 0.6);
1145 scheme.addColor(RGBColor::ORANGE, 0.8);
1146 scheme.addColor(RGBColor::RED, 1.0);
1147 scheme.addColor(RGBColor::MAGENTA, 2.0);
1148 laneColorer.addScheme(scheme);
1149 scheme = GUIColorScheme("by insertion-backlog (streetwise)", TL("by insertion-backlog (streetwise)"), RGBColor(204, 204, 204), "", false, 0, COL_SCHEME_DYNAMIC);
1150 scheme.addColor(RGBColor::GREEN, 1.);
1151 scheme.addColor(RGBColor::YELLOW, 10.);
1152 scheme.addColor(RGBColor::RED, 100.);
1153 laneColorer.addScheme(scheme);
1154 scheme = GUIColorScheme("by TAZ (streetwise)", TL("by TAZ (streetwise)"), RGBColor(204, 204, 204), "no TAZ", true);
1155 laneColorer.addScheme(scheme);
1157 scheme.setAllowsNegativeValues(true);
1158 laneColorer.addScheme(scheme);
1160 scheme.setAllowsNegativeValues(true);
1161 laneColorer.addScheme(scheme);
1163 scheme.setAllowsNegativeValues(true);
1164 laneColorer.addScheme(scheme);
1165 scheme = GUIColorScheme("by distance (kilometrage)", TL("by distance (kilometrage)"), RGBColor(204, 204, 204));
1166 scheme.addColor(RGBColor(255, 204, 204), 1.);
1167 scheme.addColor(RGBColor::RED, 10000.);
1168 scheme.addColor(RGBColor(204, 204, 255), -1.);
1169 scheme.addColor(RGBColor::BLUE, -10000.);
1170 scheme.setAllowsNegativeValues(true);
1171 laneColorer.addScheme(scheme);
1172 scheme = GUIColorScheme("by abs distance (kilometrage)", TL("by abs distance (kilometrage)"), RGBColor(204, 204, 204));
1173 scheme.addColor(RGBColor::RED, 1.);
1174 scheme.setAllowsNegativeValues(false);
1175 laneColorer.addScheme(scheme);
1176 scheme = GUIColorScheme("by reachability (traveltime)", TL("by reachability (traveltime)"), RGBColor::RED);
1177 scheme.addColor(RGBColor::GREY, INVALID_DOUBLE, "unreachable");
1178 scheme.setAllowsNegativeValues(true);
1179 laneColorer.addScheme(scheme);
1180 scheme = GUIColorScheme("by thread index", TL("by thread index"), RGBColor(204, 204, 204));
1181 scheme.addColor(RGBColor::RED, 1.);
1182 laneColorer.addScheme(scheme);
1183 scheme = GUIColorScheme("free parking spaces", TL("free parking spaces"), RGBColor(204, 204, 204), "", false, 0, COL_SCHEME_DYNAMIC);
1184 scheme.addColor(RGBColor::RED, 1.);
1185 scheme.addColor(RGBColor::YELLOW, 10.);
1186 scheme.addColor(RGBColor::GREEN, 100.);
1187 scheme.addColor(RGBColor::BLUE, 1000.);
1188 laneColorer.addScheme(scheme);
1190 scheme.setAllowsNegativeValues(true);
1191 laneColorer.addScheme(scheme);
1192
1194 vehicleColorer.addScheme(GUIColorScheme("given vehicle/type/route color", TL("given vehicle/type/route color"), RGBColor::YELLOW, "", true));
1195 vehicleColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1196 vehicleColorer.addScheme(GUIColorScheme("given/assigned vehicle color", TL("given/assigned vehicle color"), RGBColor::YELLOW, "", true));
1197 vehicleColorer.addScheme(GUIColorScheme("given/assigned type color", TL("given/assigned type color"), RGBColor::YELLOW, "", true));
1198 vehicleColorer.addScheme(GUIColorScheme("given/assigned route color", TL("given/assigned route color"), RGBColor::YELLOW, "", true));
1199 vehicleColorer.addScheme(GUIColorScheme("depart position as HSV", TL("depart position as HSV"), RGBColor::YELLOW, "", true));
1200 vehicleColorer.addScheme(GUIColorScheme("arrival position as HSV", TL("arrival position as HSV"), RGBColor::YELLOW, "", true));
1201 vehicleColorer.addScheme(GUIColorScheme("direction/distance as HSV", TL("direction/distance as HSV"), RGBColor::YELLOW, "", true));
1202 scheme = GUIColorScheme("by speed", TL("by speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1203 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1204 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1205 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1206 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1207 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1208 scheme.setAllowsNegativeValues(true); // negative speed indicates stopped
1209 scheme.addColor(RGBColor::RED, -1); // stopped on road
1210 scheme.addColor(RGBColor::GREY, -2); // stopped off-road (parking)
1211 vehicleColorer.addScheme(scheme);
1212 scheme = GUIColorScheme("by action step", TL("by action step"), RGBColor::GREY, TL("no action"), true, 0, COL_SCHEME_DYNAMIC);
1213 scheme.addColor(RGBColor(0, 255, 0, 255), 1., TL("action in next step"));
1214 scheme.addColor(RGBColor(80, 160, 80, 255), 2., TL("had action step"));
1215 vehicleColorer.addScheme(scheme);
1216 scheme = GUIColorScheme("by waiting time", TL("by waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1217 scheme.addColor(RGBColor::CYAN, 30.);
1218 scheme.addColor(RGBColor::GREEN, 100.);
1219 scheme.addColor(RGBColor::YELLOW, 200.);
1220 scheme.addColor(RGBColor::RED, 300.);
1221 vehicleColorer.addScheme(scheme);
1222 scheme = GUIColorScheme("by accumulated waiting time", TL("by accumulated waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1223 scheme.addColor(RGBColor::CYAN, 25.);
1224 scheme.addColor(RGBColor::GREEN, 50.);
1225 scheme.addColor(RGBColor::YELLOW, 75.);
1226 scheme.addColor(RGBColor::RED, 100.);
1227 vehicleColorer.addScheme(scheme);
1228 scheme = GUIColorScheme("by time since lane change", TL("by time since lane change"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1229 scheme.addColor(RGBColor(189, 189, 179, 255), -180);
1230 scheme.addColor(RGBColor(255, 255, 0, 255), -20);
1231 scheme.addColor(RGBColor(255, 0, 0, 255), -0.01);
1232 scheme.addColor(RGBColor(0, 0, 255, 255), 0.01);
1233 scheme.addColor(RGBColor(0, 255, 255, 255), 20);
1234 scheme.addColor(RGBColor(179, 189, 189, 255), 180);
1235 scheme.setAllowsNegativeValues(true);
1236 vehicleColorer.addScheme(scheme);
1237 scheme = GUIColorScheme("by max speed", TL("by max speed"), RGBColor::RED);
1238 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1239 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1240 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1241 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1242 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1243 vehicleColorer.addScheme(scheme);
1244 // ... emissions ...
1245 scheme = GUIColorScheme("by CO2 emissions", TL("by CO2 emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1246 scheme.addColor(RGBColor::CYAN, 23000);
1247 scheme.addColor(RGBColor::GREEN, 46000);
1248 scheme.addColor(RGBColor::YELLOW, 69000);
1249 scheme.addColor(RGBColor::ORANGE, 92000);
1250 scheme.addColor(RGBColor::RED, 115000);
1251 scheme.addColor(RGBColor::MAGENTA, 150000);
1252 vehicleColorer.addScheme(scheme);
1253 scheme = GUIColorScheme("by CO emissions", TL("by CO emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1254 scheme.addColor(RGBColor::CYAN, 1500);
1255 scheme.addColor(RGBColor::GREEN, 3000);
1256 scheme.addColor(RGBColor::YELLOW, 4500);
1257 scheme.addColor(RGBColor::ORANGE, 6000);
1258 scheme.addColor(RGBColor::RED, 7500);
1259 scheme.addColor(RGBColor::MAGENTA, 10000);
1260 vehicleColorer.addScheme(scheme);
1261 scheme = GUIColorScheme("by PMx emissions", TL("by PMx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1262 scheme.addColor(RGBColor::CYAN, 12);
1263 scheme.addColor(RGBColor::GREEN, 24);
1264 scheme.addColor(RGBColor::YELLOW, 36);
1265 scheme.addColor(RGBColor::ORANGE, 48);
1266 scheme.addColor(RGBColor::RED, 60);
1267 scheme.addColor(RGBColor::MAGENTA, 80);
1268 vehicleColorer.addScheme(scheme);
1269 scheme = GUIColorScheme("by NOx emissions", TL("by NOx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1270 scheme.addColor(RGBColor::CYAN, 300);
1271 scheme.addColor(RGBColor::GREEN, 600);
1272 scheme.addColor(RGBColor::YELLOW, 900);
1273 scheme.addColor(RGBColor::ORANGE, 1200);
1274 scheme.addColor(RGBColor::RED, 1500);
1275 scheme.addColor(RGBColor::MAGENTA, 2000);
1276 vehicleColorer.addScheme(scheme);
1277 scheme = GUIColorScheme("by HC emissions", TL("by HC emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1278 scheme.addColor(RGBColor::CYAN, 400);
1279 scheme.addColor(RGBColor::GREEN, 800);
1280 scheme.addColor(RGBColor::YELLOW, 1200);
1281 scheme.addColor(RGBColor::ORANGE, 1600);
1282 scheme.addColor(RGBColor::RED, 2000);
1283 scheme.addColor(RGBColor::MAGENTA, 2500);
1284 vehicleColorer.addScheme(scheme);
1285 scheme = GUIColorScheme("by fuel consumption", TL("by fuel consumption"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1286 scheme.addColor(RGBColor::CYAN, 10);
1287 scheme.addColor(RGBColor::GREEN, 20);
1288 scheme.addColor(RGBColor::YELLOW, 30);
1289 scheme.addColor(RGBColor::ORANGE, 40);
1290 scheme.addColor(RGBColor::RED, 50);
1291 scheme.addColor(RGBColor::MAGENTA, 60);
1292 vehicleColorer.addScheme(scheme);
1293 scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1294 scheme.addColor(RGBColor::CYAN, 60);
1295 scheme.addColor(RGBColor::GREEN, 70);
1296 scheme.addColor(RGBColor::YELLOW, 80);
1297 scheme.addColor(RGBColor::ORANGE, 90);
1298 scheme.addColor(RGBColor::RED, 100);
1299 scheme.addColor(RGBColor::MAGENTA, 120);
1300 vehicleColorer.addScheme(scheme);
1301 scheme = GUIColorScheme("by reroute number", TL("by reroute number"), RGBColor::GREY, "", false, 0, COL_SCHEME_DYNAMIC);
1302 scheme.addColor(RGBColor::YELLOW, 1.);
1303 scheme.addColor(RGBColor::RED, 10.);
1304 vehicleColorer.addScheme(scheme);
1305 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1306 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1307 vehicleColorer.addScheme(scheme);
1308 scheme = GUIColorScheme("by offset from best lane", TL("by offset from best lane"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1309 scheme.addColor(RGBColor(255, 0, 255, 255), -100, TL("opposite lane"));
1310 scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-3");
1311 scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-1");
1312 scheme.addColor(RGBColor(0, 255, 255, 255), 1, "1");
1313 scheme.addColor(RGBColor(0, 0, 255, 255), 3, "3");
1314 scheme.setAllowsNegativeValues(true);
1315 vehicleColorer.addScheme(scheme);
1316 scheme = GUIColorScheme("by acceleration", TL("by acceleration"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1317 scheme.addColor(RGBColor(64, 0, 0, 255), -9.0);
1318 scheme.addColor(RGBColor(255, 0, 0, 255), -4.5 /* -SUMOVTypeParameter::getDefaultDecel() */);
1319 scheme.addColor(RGBColor(255, 255, 0, 255), -0.1);
1320 scheme.addColor(RGBColor(0, 255, 255, 255), 0.1);
1321 scheme.addColor(RGBColor(0, 0, 255, 255), 2.6 /* SUMOVTypeParameter::getDefaultAccel() */);
1322 scheme.addColor(RGBColor(255, 0, 255, 255), 5.2);
1323 scheme.setAllowsNegativeValues(true);
1324 vehicleColorer.addScheme(scheme);
1325 scheme = GUIColorScheme("by time gap on lane", TL("by time gap on lane"), RGBColor(255, 255, 0, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1326 scheme.addColor(RGBColor(179, 179, 179, 255), -1);
1327 scheme.addColor(RGBColor(0, 255, 255, 255), 1);
1328 scheme.addColor(RGBColor(0, 0, 255, 255), 2);
1329 scheme.setAllowsNegativeValues(true);
1330 vehicleColorer.addScheme(scheme);
1331 scheme = GUIColorScheme("by depart delay", TL("by depart delay"), RGBColor::BLUE);
1332 scheme.addColor(RGBColor::CYAN, 30.);
1333 scheme.addColor(RGBColor::GREEN, 100.);
1334 scheme.addColor(RGBColor::YELLOW, 200.);
1335 scheme.addColor(RGBColor::RED, 300.);
1336 vehicleColorer.addScheme(scheme);
1337 scheme = GUIColorScheme("by electricity consumption", TL("by electricity consumption"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1338 scheme.addColor(RGBColor::CYAN, 10);
1339 scheme.addColor(RGBColor::GREEN, 20);
1340 scheme.addColor(RGBColor::YELLOW, 30);
1341 scheme.addColor(RGBColor::ORANGE, 40);
1342 scheme.addColor(RGBColor::RED, 60);
1343 scheme.addColor(RGBColor::MAGENTA, 100);
1344 vehicleColorer.addScheme(scheme);
1345 scheme = GUIColorScheme("by relative battery charge", TL("by relative battery charge"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1346 scheme.setAllowsNegativeValues(true);
1347 scheme.addColor(RGBColor::MAGENTA, 0.1);
1348 scheme.addColor(RGBColor::RED, 0.2);
1349 scheme.addColor(RGBColor::ORANGE, 0.3);
1350 scheme.addColor(RGBColor::YELLOW, 0.4);
1351 scheme.addColor(RGBColor::GREEN, 0.6);
1352 scheme.addColor(RGBColor::CYAN, 1.);
1353 vehicleColorer.addScheme(scheme);
1354 scheme = GUIColorScheme("by charged energy", TL("by charged energy"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1355 scheme.setAllowsNegativeValues(true);
1356 scheme.addColor(RGBColor::MAGENTA, 10);
1357 scheme.addColor(RGBColor::RED, 20);
1358 scheme.addColor(RGBColor::ORANGE, 30);
1359 scheme.addColor(RGBColor::YELLOW, 100);
1360 scheme.addColor(RGBColor::GREEN, 200);
1361 scheme.addColor(RGBColor::CYAN, 500);
1362 vehicleColorer.addScheme(scheme);
1363 scheme = GUIColorScheme("by time loss", TL("by time loss"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1364 scheme.addColor(RGBColor::CYAN, 10.);
1365 scheme.addColor(RGBColor::GREEN, 60.);
1366 scheme.addColor(RGBColor::YELLOW, 180.);
1367 scheme.addColor(RGBColor::RED, 900.);
1368 vehicleColorer.addScheme(scheme);
1369 scheme = GUIColorScheme("by stop delay", TL("by stop delay"), RGBColor::GREY, "", false, -1, COL_SCHEME_DYNAMIC);
1370 scheme.addColor(RGBColor::BLUE, 0.);
1371 scheme.addColor(RGBColor::CYAN, 10.);
1372 scheme.addColor(RGBColor::GREEN, 60.);
1373 scheme.addColor(RGBColor::YELLOW, 120.);
1374 scheme.addColor(RGBColor::ORANGE, 300.);
1375 scheme.addColor(RGBColor::RED, 900.);
1376 scheme.setAllowsNegativeValues(true);
1377 vehicleColorer.addScheme(scheme);
1378 scheme = GUIColorScheme("by stop arrival delay", TL("by stop arrival delay"), RGBColor::GREY, "", false, INVALID_DOUBLE, COL_SCHEME_DYNAMIC);
1379 scheme.addColor(RGBColor::MAGENTA, -10.);
1380 scheme.addColor(RGBColor::BLUE, 0.);
1381 scheme.addColor(RGBColor::CYAN, 10.);
1382 scheme.addColor(RGBColor::GREEN, 60.);
1383 scheme.addColor(RGBColor::YELLOW, 120.);
1384 scheme.addColor(RGBColor::ORANGE, 300.);
1385 scheme.addColor(RGBColor::RED, 900.);
1386 scheme.setAllowsNegativeValues(true);
1387 vehicleColorer.addScheme(scheme);
1388 scheme = GUIColorScheme("by lateral speed", TL("by lateral speed"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1389 scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-1.5");
1390 scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-0.5");
1391 scheme.addColor(RGBColor(0, 255, 255, 255), 1, "0.5");
1392 scheme.addColor(RGBColor(0, 0, 255, 255), 3, "1.5");
1393 scheme.setAllowsNegativeValues(true);
1394 vehicleColorer.addScheme(scheme);
1395 scheme = GUIColorScheme(SCHEME_NAME_PARAM_NUMERICAL, RGBColor(204, 204, 204));
1396 scheme.setAllowsNegativeValues(true);
1397 vehicleColorer.addScheme(scheme);
1398 vehicleColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1399 vehicleColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1400
1402 personColorer.addScheme(GUIColorScheme("given person/type color", TL("given person/type color"), RGBColor::BLUE, "", true));
1403 personColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::BLUE, "", true));
1404 personColorer.addScheme(GUIColorScheme("given/assigned person color", TL("given/assigned person color"), RGBColor::BLUE, "", true));
1405 personColorer.addScheme(GUIColorScheme("given/assigned type color", TL("given/assigned type color"), RGBColor::BLUE, "", true));
1406 scheme = GUIColorScheme("by speed", TL("by speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1407 scheme.addColor(RGBColor::YELLOW, 2.5 / 3.6);
1408 scheme.addColor(RGBColor::GREEN, 5. / 3.6);
1409 scheme.addColor(RGBColor::BLUE, 10. / 3.6);
1410 scheme.setAllowsNegativeValues(true); // negative speed indicates stopped
1411 scheme.addColor(RGBColor::GREY, -1.); // stop stage
1412 scheme.addColor(RGBColor::GREY, -2.); // stop stage (departure)
1413 personColorer.addScheme(scheme);
1414 scheme = GUIColorScheme("by mode", TL("by mode"), RGBColor::GREY, TL("waiting for insertion"), true, 0, COL_SCHEME_DYNAMIC);
1415 scheme.addColor(RGBColor::RED, 1., TL("stopped"));
1416 scheme.addColor(RGBColor::GREEN, 2., TL("walking"));
1417 scheme.addColor(RGBColor::BLUE, 3., TL("riding"));
1418 scheme.addColor(RGBColor::CYAN, 4., TL("accessing trainStop"));
1419 scheme.addColor(RGBColor::YELLOW, 5., TL("waiting for ride"));
1420 personColorer.addScheme(scheme);
1421 scheme = GUIColorScheme("by waiting time", TL("by waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1422 scheme.addColor(RGBColor::CYAN, 30.);
1423 scheme.addColor(RGBColor::GREEN, 100.);
1424 scheme.addColor(RGBColor::YELLOW, 200.);
1425 scheme.addColor(RGBColor::RED, 300.);
1426 personColorer.addScheme(scheme);
1427 scheme = GUIColorScheme("by jammed state", TL("by jammed state"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1428 scheme.addColor(RGBColor::RED, 1.);
1429 personColorer.addScheme(scheme);
1430 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1431 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1432 personColorer.addScheme(scheme);
1433 personColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1434 personColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1435
1437 containerColorer.addScheme(GUIColorScheme("given container/type color", TL("given container/type color"), RGBColor::YELLOW, "", true));
1438 containerColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1439 containerColorer.addScheme(GUIColorScheme("given/assigned container color", TL("given/assigned container color"), RGBColor::YELLOW, "", true));
1440 containerColorer.addScheme(GUIColorScheme("given/assigned type color", TL("given/assigned type color"), RGBColor::YELLOW, "", true));
1441 scheme = GUIColorScheme("by speed", TL("by speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1442 scheme.addColor(RGBColor::YELLOW, 2.5 / 3.6);
1443 scheme.addColor(RGBColor::GREEN, 5. / 3.6);
1444 scheme.addColor(RGBColor::BLUE, 10. / 3.6);
1446 scheme = GUIColorScheme("by mode", TL("by mode"), RGBColor::GREY, TL("waiting for insertion"), true, 0, COL_SCHEME_DYNAMIC);
1447 scheme.addColor(RGBColor::RED, 1., TL("stopped"));
1448 scheme.addColor(RGBColor::BLUE, 3., TL("transport"));
1449 scheme.addColor(RGBColor::CYAN, 4., TL("accessing trainStop"));
1450 scheme.addColor(RGBColor::YELLOW, 5., TL("waiting for transport"));
1451 scheme.addColor(RGBColor::GREEN, 6., TL("tranship")); // (moving without vehicle)
1453 scheme = GUIColorScheme("by waiting time", TL("by waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1454 scheme.addColor(RGBColor::CYAN, 30.);
1455 scheme.addColor(RGBColor::GREEN, 100.);
1456 scheme.addColor(RGBColor::YELLOW, 200.);
1457 scheme.addColor(RGBColor::RED, 300.);
1459 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1460 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1462 containerColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1463 containerColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1464
1466 scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor::BLACK, "", true);
1467 scheme.addColor(RGBColor(150, 200, 200), 1, TL("waterway"));
1468 scheme.addColor(RGBColor(0, 0, 0, 0), 2, TL("railway"));
1469 scheme.addColor(RGBColor(200, 240, 240), 3, TL("airway"));
1470 junctionColorer.addScheme(scheme);
1471 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1472 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
1473 junctionColorer.addScheme(scheme);
1474 scheme = GUIColorScheme(SCHEME_NAME_TYPE, RGBColor::GREEN, "traffic_light", true);
1475 scheme.addColor(RGBColor(0, 128, 0), 1, "traffic_light_unregulated");
1476 scheme.addColor(RGBColor::YELLOW, 2, "priority");
1477 scheme.addColor(RGBColor::RED, 3, "priority_stop");
1478 scheme.addColor(RGBColor::BLUE, 4, "right_before_left");
1479 scheme.addColor(RGBColor::CYAN, 5, "allway_stop");
1480 scheme.addColor(RGBColor::GREY, 6, "district");
1481 scheme.addColor(RGBColor::MAGENTA, 7, "unregulated");
1482 scheme.addColor(RGBColor::BLACK, 8, "dead_end");
1483 scheme.addColor(RGBColor::ORANGE, 9, "rail_signal");
1484 scheme.addColor(RGBColor(172, 108, 44), 10, "zipper"); // brown, darker than the zipper link rule
1485 scheme.addColor(RGBColor(192, 255, 192), 11, "traffic_light_right_on_red"); // light green
1486 scheme.addColor(RGBColor(128, 0, 128), 12, "rail_crossing"); // dark purple
1487 scheme.addColor(RGBColor(0, 0, 128), 13, "left_before_right"); // dark blue
1488 junctionColorer.addScheme(scheme);
1489 scheme = GUIColorScheme("by height", TL("by height"), RGBColor::GREY);
1490 scheme.addColor(RGBColor::BLUE, -10.);
1491 scheme.addColor(RGBColor::RED, 10.);
1492 scheme.addColor(RGBColor::YELLOW, 50.);
1493 scheme.addColor(RGBColor::GREEN, 100.);
1494 scheme.addColor(RGBColor::MAGENTA, 200.);
1495 scheme.setAllowsNegativeValues(true);
1496 junctionColorer.addScheme(scheme);
1497
1499 poiColorer.addScheme(GUIColorScheme("given POI color", TL("given POI color"), RGBColor::RED, "", true));
1500 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1501 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1502 poiColorer.addScheme(scheme);
1503 poiColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::RED, "", true));
1504
1506 polyColorer.addScheme(GUIColorScheme("given polygon color", TL("given polygon color"), RGBColor::ORANGE, "", true));
1507 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1508 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1509 polyColorer.addScheme(scheme);
1510 polyColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::ORANGE, "", true));
1511 polyColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1512
1514 {
1515 GUIScaleScheme laneScheme = GUIScaleScheme(TL("default"), 1, TL("uniform"), true);
1516 laneScaler.addScheme(laneScheme);
1517 laneScheme = GUIScaleScheme(SCHEME_NAME_SELECTION, 0.5, TL("unselected"), true, 0, COL_SCHEME_MISC);
1518 laneScheme.addColor(5, 1, TL("selected"));
1519 laneScaler.addScheme(laneScheme);
1520 // ... traffic states ...
1521 laneScheme = GUIScaleScheme(TL("by allowed speed (lanewise)"), 0);
1522 laneScheme.addColor(10, 150. / 3.6);
1523 laneScaler.addScheme(laneScheme);
1524 laneScheme = GUIScaleScheme(TL("by current occupancy (lanewise, brutto)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1525 laneScheme.addColor(10, 0.95);
1526 laneScaler.addScheme(laneScheme);
1527 laneScheme = GUIScaleScheme(TL("by current occupancy (lanewise, netto)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1528 laneScheme.addColor(10, 0.95);
1529 laneScaler.addScheme(laneScheme);
1530 laneScheme = GUIScaleScheme(TL("by first vehicle waiting time (lanewise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1531 laneScheme.addColor(10, 300.);
1532 laneScaler.addScheme(laneScheme);
1533 laneScheme = GUIScaleScheme(TL("by lane number (streetwise)"), 1);
1534 laneScheme.addColor(10, 5.);
1535 laneScaler.addScheme(laneScheme);
1536 // ... emissions ...
1537 laneScheme = GUIScaleScheme(TL("by CO2 emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1538 laneScheme.addColor(10, 10. / 7.5 / 5.);
1539 laneScaler.addScheme(laneScheme);
1540 laneScheme = GUIScaleScheme(TL("by CO emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1541 laneScheme.addColor(10, 0.05 / 7.5 / 2.);
1542 laneScaler.addScheme(laneScheme);
1543 laneScheme = GUIScaleScheme(TL("by PMx emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1544 laneScheme.addColor(10, .005 / 7.5 / 5.);
1545 laneScaler.addScheme(laneScheme);
1546 laneScheme = GUIScaleScheme(TL("by NOx emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1547 laneScheme.addColor(10, .125 / 7.5 / 5.);
1548 laneScaler.addScheme(laneScheme);
1549 laneScheme = GUIScaleScheme(TL("by HC emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1550 laneScheme.addColor(10, .02 / 7.5 / 4.);
1551 laneScaler.addScheme(laneScheme);
1552 laneScheme = GUIScaleScheme(TL("by fuel consumption"), 0, "", false, 0, COL_SCHEME_EMISSION);
1553 laneScheme.addColor(10, .005 / 7.5 * 100.);
1554 laneScaler.addScheme(laneScheme);
1555 laneScheme = GUIScaleScheme(TL("by noise emissions (Harmonoise)"), 0, "", false, 0, COL_SCHEME_EMISSION);
1556 laneScheme.addColor(10, 100.);
1557 laneScaler.addScheme(laneScheme);
1558 // ... weights (experimental) ...
1559 laneScheme = GUIScaleScheme(TL("by global travel time"), 0);
1560 laneScheme.addColor(10, 100.);
1561 laneScheme.setAllowsNegativeValues(true);
1562 laneScaler.addScheme(laneScheme);
1563 laneScheme = GUIScaleScheme(TL("by global speed percentage"), 0);
1564 laneScheme.addColor(10, 100.);
1565 laneScheme.setAllowsNegativeValues(true);
1566 laneScaler.addScheme(laneScheme);
1567 laneScheme = GUIScaleScheme(TL("by given length/geometrical length"), 0);
1568 laneScheme.addColor(10, 10.);
1569 laneScaler.addScheme(laneScheme);
1570 laneScheme = GUIScaleScheme(TL("by loaded weight"), 0);
1571 laneScheme.addColor(-1000, -1000.);
1572 laneScheme.addColor(1000, 1000.);
1573 laneScheme.setAllowsNegativeValues(true);
1574 laneScaler.addScheme(laneScheme);
1575 laneScheme = GUIScaleScheme(TL("by priority"), 1);
1576 laneScheme.addColor(0.5, -20.);
1577 laneScheme.addColor(5, 20.);
1578 laneScheme.setAllowsNegativeValues(true);
1579 laneScaler.addScheme(laneScheme);
1580 laneScheme = GUIScaleScheme(TL("by average speed"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1581 laneScheme.addColor(10, 150. / 3.6);
1582 laneScaler.addScheme(laneScheme);
1583 laneScheme = GUIScaleScheme(TL("by average relative speed"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1584 laneScheme.addColor(0.5, 0.5);
1585 laneScheme.addColor(2, 1.);
1586 laneScheme.addColor(10, 2.);
1587 laneScaler.addScheme(laneScheme);
1588 laneScheme = GUIScaleScheme(TL("by electricity consumption"), 0, "", false, 0, COL_SCHEME_EMISSION);
1589 laneScheme.addColor(10, 1. / 7.5 / 5.);
1590 laneScaler.addScheme(laneScheme);
1591 laneScheme = GUIScaleScheme(TL("by insertion-backlog (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1592 laneScheme.addColor(1, 1.);
1593 laneScheme.addColor(10, 10.);
1594 laneScheme.addColor(50, 100.);
1595 laneScaler.addScheme(laneScheme);
1596 laneScheme = GUIScaleScheme(SCHEME_NAME_EDGEDATA_NUMERICAL, 0.1, TL("missing data"), false, MISSING_DATA);
1597 laneScheme.addColor(1, 1.);
1598 laneScheme.addColor(2, 10.);
1599 laneScheme.addColor(5, 100.);
1600 laneScheme.addColor(10, 1000.);
1601 laneScheme.setAllowsNegativeValues(true);
1602 laneScaler.addScheme(laneScheme);
1603 }
1604
1606 edgeColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor(0, 0, 0, 0), "", true));
1607 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1608 scheme.addColor(RGBColor(0, 80, 180, 255), 1., TL("selected"));
1609 edgeColorer.addScheme(scheme);
1610 scheme = GUIColorScheme("by purpose (streetwise)", TL("by purpose (streetwise)"), RGBColor(), TL("normal"), true);
1611 scheme.addColor(RGBColor(128, 0, 128, 255), 1., TL("connector")); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_CONNECTOR
1612 scheme.addColor(RGBColor::BLUE, 2., TL("internal")); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_INTERNAL
1613 edgeColorer.addScheme(scheme);
1614 scheme = GUIColorScheme("by allowed speed (streetwise)", TL("by allowed speed (streetwise)"), RGBColor::RED);
1615 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1616 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1617 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1618 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1619 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1620 edgeColorer.addScheme(scheme);
1621 scheme = GUIColorScheme("by current occupancy (streetwise, brutto)", TL("by current occupancy (streetwise, brutto)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1622 scheme.addColor(RGBColor::RED, 0.95);
1623 edgeColorer.addScheme(scheme);
1624 scheme = GUIColorScheme("by current speed (streetwise)", TL("by current speed (streetwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1625 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1626 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1627 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1628 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1629 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1630 edgeColorer.addScheme(scheme);
1631 scheme = GUIColorScheme("by current flow (streetwise)", TL("by current flow (streetwise)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1632 scheme.addColor(RGBColor::RED, 5000.);
1633 edgeColorer.addScheme(scheme);
1634 scheme = GUIColorScheme("by relative speed (streetwise)", TL("by relative speed (streetwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1635 scheme.addColor(RGBColor::YELLOW, 0.25);
1636 scheme.addColor(RGBColor::GREEN, 0.5);
1637 scheme.addColor(RGBColor::CYAN, 0.75);
1638 scheme.addColor(RGBColor::BLUE, 1.);
1639 scheme.addColor(RGBColor::MAGENTA, 1.25);
1640 edgeColorer.addScheme(scheme);
1641 scheme = GUIColorScheme("by routing device assumed speed", TL("by routing device assumed speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1642 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1643 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1644 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1645 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1646 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1647 edgeColorer.addScheme(scheme);
1648 edgeColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1649 scheme = GUIColorScheme("by segments (alternating)", TL("by segments (alternating)"), RGBColor::BLUE, TL("odd"), true);
1650 scheme.addColor(RGBColor::RED, 1., TL("even"));
1651 edgeColorer.addScheme(scheme);
1652 scheme = GUIColorScheme("by jammed state (segmentwise)", TL("by jammed state (segmentwise)"), RGBColor::GREEN, TL("free"), true, 0, COL_SCHEME_DYNAMIC);
1653 scheme.addColor(RGBColor::YELLOW, 1., TL("limitedControl"));
1654 scheme.addColor(RGBColor::RED, 2., TL("jammed"));
1655 edgeColorer.addScheme(scheme);
1656 scheme = GUIColorScheme("by current occupancy (segmentwise, brutto)", TL("by current occupancy (segmentwise, brutto)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1657 scheme.addColor(RGBColor::RED, 0.95);
1658 edgeColorer.addScheme(scheme);
1659 scheme = GUIColorScheme("by current speed (segmentwise)", TL("by current speed (segmentwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1660 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1661 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1662 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1663 scheme.addColor(RGBColor::BLUE, 120 / 3.6);
1664 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1665 edgeColorer.addScheme(scheme);
1666 scheme = GUIColorScheme("by current flow (segmentwise)", TL("by current flow (segmentwise)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1667 scheme.addColor(RGBColor::RED, 5000.);
1668 edgeColorer.addScheme(scheme);
1669 scheme = GUIColorScheme("by relative speed (segmentwise)", TL("by relative speed (segmentwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1670 scheme.addColor(RGBColor::YELLOW, 0.25);
1671 scheme.addColor(RGBColor::GREEN, 0.5);
1672 scheme.addColor(RGBColor::CYAN, 0.75);
1673 scheme.addColor(RGBColor::BLUE, 1.);
1674 scheme.addColor(RGBColor::MAGENTA, 1.25);
1675 edgeColorer.addScheme(scheme);
1676 scheme = GUIColorScheme("by insertion-backlog (streetwise)", TL("by insertion-backlog (streetwise)"), RGBColor::GREY, "", false, 0, COL_SCHEME_DYNAMIC);
1677 scheme.addColor(RGBColor::GREEN, 1.);
1678 scheme.addColor(RGBColor::YELLOW, 10.);
1679 scheme.addColor(RGBColor::RED, 100.);
1680 edgeColorer.addScheme(scheme);
1681 scheme = GUIColorScheme("by TAZ (streetwise)", TL("by TAZ (streetwise)"), RGBColor(204, 204, 204), TL("no TAZ"), true);
1682 edgeColorer.addScheme(scheme);
1684 scheme.setAllowsNegativeValues(true);
1685 edgeColorer.addScheme(scheme);
1687 scheme.setAllowsNegativeValues(true);
1688 edgeColorer.addScheme(scheme);
1689
1691 {
1692 edgeScaler.addScheme(GUIScaleScheme(TL("uniform"), 1, "", true));
1693 GUIScaleScheme edgeScheme = GUIScaleScheme(SCHEME_NAME_SELECTION, 0.5, TL("unselected"), true, 0, COL_SCHEME_MISC);
1694 edgeScheme.addColor(5, 1., TL("selected"));
1695 edgeScaler.addScheme(edgeScheme);
1696 edgeScheme = GUIScaleScheme(TL("by allowed speed (streetwise)"), 0);
1697 edgeScheme.addColor(10, 150. / 3.6);
1698 edgeScaler.addScheme(edgeScheme);
1699 edgeScheme = GUIScaleScheme(TL("by current occupancy (streetwise, brutto)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1700 edgeScheme.addColor(10, 0.95);
1701 edgeScaler.addScheme(edgeScheme);
1702 edgeScheme = GUIScaleScheme(TL("by current speed (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1703 edgeScheme.addColor(10, 150. / 3.6);
1704 edgeScaler.addScheme(edgeScheme);
1705 edgeScheme = GUIScaleScheme(TL("by current flow (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1706 edgeScheme.addColor(20, 5000.);
1707 edgeScaler.addScheme(edgeScheme);
1708 edgeScheme = GUIScaleScheme(TL("by relative speed (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1709 edgeScheme.addColor(20, 1.);
1710 edgeScaler.addScheme(edgeScheme);
1711 edgeScheme = GUIScaleScheme(TL("by insertion-backlog (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1712 edgeScheme.addColor(1, 1.);
1713 edgeScheme.addColor(10, 10.);
1714 edgeScheme.addColor(50, 100.);
1715 edgeScaler.addScheme(edgeScheme);
1716 edgeScheme = GUIScaleScheme(SCHEME_NAME_EDGEDATA_NUMERICAL, 0.1, TL("missing data"), false, MISSING_DATA);
1717 edgeScheme.addColor(1, 1.);
1718 edgeScheme.addColor(2, 10.);
1719 edgeScheme.addColor(5, 100.);
1720 edgeScheme.addColor(10, 1000.);
1721 edgeScheme.setAllowsNegativeValues(true);
1722 edgeScaler.addScheme(edgeScheme);
1723 }
1724
1726 {
1727 vehicleScaler.addScheme(GUIScaleScheme(TL("uniform"), 1, "", true));
1728 GUIScaleScheme vehScheme = GUIScaleScheme(SCHEME_NAME_SELECTION, 1, TL("unselected"), true, 0, COL_SCHEME_MISC);
1729 vehScheme.addColor(5, 1., TL("selected"));
1730 vehicleScaler.addScheme(vehScheme);
1731 vehScheme = GUIScaleScheme(TL("by speed"), 1, "", false, 1, COL_SCHEME_DYNAMIC);
1732 vehScheme.addColor(5, 150. / 3.6);
1733 vehScheme.setAllowsNegativeValues(true); // negative speed indicates stopped
1734 vehScheme.addColor(1, -1.); // stopped on road
1735 vehScheme.addColor(0.5, -2.); // stopped off-road (parking)
1736 vehicleScaler.addScheme(vehScheme);
1737 vehScheme = GUIScaleScheme(TL("by waiting time"), 1, "", false, 1, COL_SCHEME_DYNAMIC);
1738 vehScheme.addColor(1, 30.);
1739 vehScheme.addColor(2, 100.);
1740 vehScheme.addColor(4, 200.);
1741 vehScheme.addColor(10, 300.);
1742 vehicleScaler.addScheme(vehScheme);
1743 vehScheme = GUIScaleScheme(TL("by accumulated waiting time"), 1, "", false, 1, COL_SCHEME_DYNAMIC);
1744 vehScheme.addColor(5, 100.);
1745 vehicleScaler.addScheme(vehScheme);
1746 vehScheme = GUIScaleScheme(TL("by max speed"), 1);
1747 vehScheme.addColor(1, 30. / 3.6);
1748 vehScheme.addColor(1, 55. / 3.6);
1749 vehScheme.addColor(1, 80. / 3.6);
1750 vehScheme.addColor(1, 120. / 3.6);
1751 vehScheme.addColor(1, 150. / 3.6);
1752 vehicleScaler.addScheme(vehScheme);
1753 vehScheme = GUIScaleScheme(TL("by reroute number"), 1, "", false, 0, COL_SCHEME_DYNAMIC);
1754 vehScheme.addColor(1, 1.);
1755 vehScheme.addColor(5, 10.);
1756 vehicleScaler.addScheme(vehScheme);
1757 vehScheme = GUIScaleScheme(TL("by offset from best lane"), 0.8, "0", false, 0, COL_SCHEME_DYNAMIC);
1758 vehScheme.addColor(5, -100, TL("opposite lane"));
1759 vehScheme.addColor(3, -3, "-3");
1760 vehScheme.addColor(1.5, -1, "-1");
1761 vehScheme.addColor(1.5, 1, "1");
1762 vehScheme.addColor(3, 3, "3");
1763 vehScheme.setAllowsNegativeValues(true);
1764 vehicleScaler.addScheme(vehScheme);
1765 vehScheme = GUIScaleScheme(TL("by acceleration"), 0.8, "0", false, 0, COL_SCHEME_DYNAMIC);
1766 vehScheme.addColor(4, -9.0);
1767 vehScheme.addColor(2, -4.5 /* -SUMOVTypeParameter::getDefaultDecel() */);
1768 vehScheme.addColor(1, -0.1);
1769 vehScheme.addColor(1, 0.1);
1770 vehScheme.addColor(1, 2.6 /* SUMOVTypeParameter::getDefaultAccel() */);
1771 vehScheme.addColor(3, 5.2);
1772 vehScheme.setAllowsNegativeValues(true);
1773 vehicleScaler.addScheme(vehScheme);
1774 vehScheme = GUIScaleScheme(TL("by time gap on lane"), 5, "0", false, 0, COL_SCHEME_DYNAMIC);
1775 vehScheme.addColor(1, -1);
1776 vehScheme.addColor(1, 1);
1777 vehScheme.addColor(0.5, 2);
1778 vehScheme.setAllowsNegativeValues(true);
1779 vehicleScaler.addScheme(vehScheme);
1780 vehScheme = GUIScaleScheme(TL("by depart delay"), 0.8);
1781 vehScheme.addColor(1, 10.);
1782 vehScheme.addColor(2, 100.);
1783 vehScheme.addColor(3, 200.);
1784 vehScheme.addColor(5, 300.);
1785 vehicleScaler.addScheme(vehScheme);
1786 vehScheme = GUIScaleScheme(TL("by time loss"), 1, "", false, 0, COL_SCHEME_DYNAMIC);
1787 vehScheme.addColor(1, 10.);
1788 vehScheme.addColor(2, 60.);
1789 vehScheme.addColor(3, 180.);
1790 vehScheme.addColor(10, 900.);
1791 vehicleScaler.addScheme(vehScheme);
1792 vehScheme = GUIScaleScheme(TL("by stop delay"), 0.1, "", false, -1, COL_SCHEME_DYNAMIC);
1793 vehScheme.addColor(1, 0.);
1794 vehScheme.addColor(2, 10.);
1795 vehScheme.addColor(3, 60.);
1796 vehScheme.addColor(4, 120.);
1797 vehScheme.addColor(5, 300.);
1798 vehScheme.addColor(10, 900.);
1799 vehScheme.setAllowsNegativeValues(true);
1800 vehicleScaler.addScheme(vehScheme);
1801 vehScheme = GUIScaleScheme(TL("by stop arrival delay"), 0.1, "", false, INVALID_DOUBLE, COL_SCHEME_DYNAMIC);
1802 vehScheme.addColor(0.5, -10.);
1803 vehScheme.addColor(1, 0.);
1804 vehScheme.addColor(2, 10.);
1805 vehScheme.addColor(3, 60.);
1806 vehScheme.addColor(4, 120.);
1807 vehScheme.addColor(5, 300.);
1808 vehScheme.addColor(10, 900.);
1809 vehScheme.setAllowsNegativeValues(true);
1810 vehicleScaler.addScheme(vehScheme);
1812 vehScheme.setAllowsNegativeValues(true);
1813 vehicleScaler.addScheme(vehScheme);
1814 }
1815}
1816
1817
1818void
1820 // init color schemes
1821 GUIColorScheme scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor::BLACK, TL("road"), true);
1822 scheme.addColor(RGBColor::GREY, 1, TL("sidewalk"));
1823 scheme.addColor(RGBColor(192, 66, 44), 2, TL("bike lane"));
1824 scheme.addColor(RGBColor(200, 255, 200), 3, TL("green verge"));
1825 scheme.addColor(RGBColor(150, 200, 200), 4, TL("waterway"));
1826 scheme.addColor(RGBColor::BLACK, 5, TL("railway"));
1827 scheme.addColor(RGBColor(64, 0, 64), 6, TL("rails on road"));
1828 scheme.addColor(RGBColor(92, 92, 92), 7, TL("no passenger")); // paths, service roads etc
1829 scheme.addColor(RGBColor::RED, 8, TL("closed")); // road closing
1830 scheme.addColor(RGBColor::GREEN, 9, TL("connector")); // macro-connector
1831 scheme.addColor(RGBColor::ORANGE, 10, TL("forbidden")); // forbidden road
1832 scheme.addColor(RGBColor(145, 145, 145), 11, TL("data mode"));
1833 scheme.addColor(RGBColor(200, 240, 240), 12, TL("airway"));
1834 laneColorer.addScheme(scheme);
1835 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1836 scheme.addColor(RGBColor(0, 80, 180, 255), 1., TL("selected"));
1837 laneColorer.addScheme(scheme);
1838 scheme = GUIColorScheme("by permission code", TL("by permission code"), RGBColor(240, 240, 240), "nobody");
1839 scheme.addColor(RGBColor(10, 10, 10), (double)SVC_PASSENGER, "passenger");
1840 scheme.addColor(RGBColor(128, 128, 128), (double)SVC_PEDESTRIAN, "pedestrian");
1841 scheme.addColor(RGBColor(80, 80, 80), (double)(SVC_PEDESTRIAN | SVC_DELIVERY), "pedestrian_delivery");
1842 scheme.addColor(RGBColor(192, 66, 44), (double)SVC_BICYCLE, "bicycle");
1843 scheme.addColor(RGBColor(40, 100, 40), (double)SVC_BUS, "bus");
1844 scheme.addColor(RGBColor(166, 147, 26), (double)SVC_TAXI, "taxi");
1845 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~SVC_NON_ROAD), "normal_road");
1846 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_NON_ROAD)), "disallow_pedestrian");
1847 scheme.addColor(RGBColor(255, 206, 0), (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_MOPED | SVC_NON_ROAD)), "motorway");
1848 scheme.addColor(RGBColor(150, 200, 200), (double)SVC_SHIP, "waterway");
1849 scheme.addColor(RGBColor::GREEN, (double)SVCAll, "all");
1850 laneColorer.addScheme(scheme);
1851
1852 scheme = GUIColorScheme("by allowed speed (lanewise)", RGBColor::RED);
1853 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1854 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1855 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1856 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1857 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1858 laneColorer.addScheme(scheme);
1859
1860 scheme = GUIColorScheme("by lane number (streetwise)", RGBColor::RED);
1861 scheme.addColor(RGBColor::BLUE, 5.);
1862 laneColorer.addScheme(scheme);
1863
1864 scheme = GUIColorScheme("by given length/geometrical length", RGBColor::RED);
1865 scheme.addColor(RGBColor::ORANGE, 0.25);
1866 scheme.addColor(RGBColor::YELLOW, 0.5);
1867 scheme.addColor(RGBColor(179, 179, 179, 255), 1.);
1868 scheme.addColor(RGBColor::GREEN, 2.);
1869 scheme.addColor(RGBColor::CYAN, 4.);
1870 scheme.addColor(RGBColor::BLUE, 100.);
1871 laneColorer.addScheme(scheme);
1872 laneColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1873
1874 scheme = GUIColorScheme("by priority", TL("by priority"), RGBColor::YELLOW);
1875 scheme.addColor(RGBColor::RED, -20.);
1876 scheme.addColor(RGBColor::GREEN, 20.);
1877 scheme.setAllowsNegativeValues(true);
1878 laneColorer.addScheme(scheme);
1879 scheme = GUIColorScheme("by height at start", TL("by height at start"), RGBColor::RED);
1880 scheme.addColor(RGBColor::BLUE, -10.);
1881 scheme.addColor(RGBColor::YELLOW, 50.);
1882 scheme.addColor(RGBColor::GREEN, 100.);
1883 scheme.addColor(RGBColor::MAGENTA, 200.);
1884 scheme.setAllowsNegativeValues(true);
1885 laneColorer.addScheme(scheme);
1886 scheme = GUIColorScheme("by height at segment start", TL("by height at segment start"), RGBColor::RED);
1887 scheme.addColor(RGBColor::BLUE, -10.);
1888 scheme.addColor(RGBColor::YELLOW, 50.);
1889 scheme.addColor(RGBColor::GREEN, 100.);
1890 scheme.addColor(RGBColor::MAGENTA, 200.);
1891 scheme.setAllowsNegativeValues(true);
1892 laneColorer.addScheme(scheme);
1893 scheme = GUIColorScheme("by inclination", TL("by inclination"), RGBColor::GREY);
1894 scheme.addColor(RGBColor::YELLOW, 0.1);
1895 scheme.addColor(RGBColor::RED, 0.3);
1896 scheme.addColor(RGBColor::GREEN, -0.1);
1897 scheme.addColor(RGBColor::BLUE, -0.3);
1898 scheme.setAllowsNegativeValues(true);
1899 laneColorer.addScheme(scheme);
1900 scheme = GUIColorScheme("by segment inclination", TL("by segment inclination"), RGBColor::GREY);
1901 scheme.addColor(RGBColor::YELLOW, 0.1);
1902 scheme.addColor(RGBColor::RED, 0.3);
1903 scheme.addColor(RGBColor::GREEN, -0.1);
1904 scheme.addColor(RGBColor::BLUE, -0.3);
1905 scheme.setAllowsNegativeValues(true);
1906 laneColorer.addScheme(scheme);
1908 scheme.setAllowsNegativeValues(true);
1909 laneColorer.addScheme(scheme);
1911 scheme.setAllowsNegativeValues(true);
1912 laneColorer.addScheme(scheme);
1913 scheme = GUIColorScheme("by distance (kilometrage)", RGBColor(204, 204, 204));
1914 scheme.addColor(RGBColor::RED, 1.);
1915 scheme.addColor(RGBColor::RED, -1.);
1916 scheme.setAllowsNegativeValues(true);
1917 laneColorer.addScheme(scheme);
1918 scheme = GUIColorScheme("by abs distance (kilometrage)", RGBColor(204, 204, 204));
1919 scheme.addColor(RGBColor::RED, 1.);
1920 scheme.setAllowsNegativeValues(false);
1921 laneColorer.addScheme(scheme);
1923 scheme.setAllowsNegativeValues(true);
1924 laneColorer.addScheme(scheme);
1925
1926 scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor(102, 0, 0), "", true);
1927 scheme.addColor(RGBColor(204, 0, 0), 1, TL("junction bubble"));
1928 scheme.addColor(RGBColor(230, 100, 115), 2, TL("geometry points"));
1929 scheme.addColor(GUIVisualizationColorSettings::SUMO_color_DEADEND_SHOW, 3, TL("connections missing"));
1930 scheme.addColor(RGBColor::GREEN, 3, TL("custom shape"));
1931 scheme.addColor(RGBColor(205, 180, 180), 4, TL("data mode"));
1932 junctionColorer.addScheme(scheme);
1933 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1934 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
1935 junctionColorer.addScheme(scheme);
1936 scheme = GUIColorScheme(SCHEME_NAME_TYPE, RGBColor::GREEN, "traffic_light", true);
1937 scheme.addColor(RGBColor(0, 128, 0), 1, "traffic_light_unregulated");
1938 scheme.addColor(RGBColor::YELLOW, 2, "priority");
1939 scheme.addColor(RGBColor::RED, 3, "priority_stop");
1940 scheme.addColor(RGBColor::BLUE, 4, "right_before_left");
1941 scheme.addColor(RGBColor::CYAN, 5, "allway_stop");
1942 scheme.addColor(RGBColor::GREY, 6, "district");
1943 scheme.addColor(RGBColor::MAGENTA, 7, "unregulated");
1944 scheme.addColor(RGBColor::BLACK, 8, "dead_end");
1945 scheme.addColor(RGBColor::ORANGE, 9, "rail_signal");
1946 scheme.addColor(RGBColor(172, 108, 44), 10, "zipper"); // brown, darker than the zipper link rule
1947 scheme.addColor(RGBColor(192, 255, 192), 11, "traffic_light_right_on_red");
1948 scheme.addColor(RGBColor(128, 0, 128), 12, "rail_crossing"); // dark purple
1949 scheme.addColor(RGBColor(0, 0, 128), 13, "left_before_right"); // dark blue
1950 junctionColorer.addScheme(scheme);
1951 scheme = GUIColorScheme("by height", TL("by height"), RGBColor::GREY);
1952 scheme.addColor(RGBColor::BLUE, -10.);
1953 scheme.addColor(RGBColor::RED, 10.);
1954 scheme.addColor(RGBColor::YELLOW, 50.);
1955 scheme.addColor(RGBColor::GREEN, 100.);
1956 scheme.addColor(RGBColor::MAGENTA, 200.);
1957 scheme.setAllowsNegativeValues(true);
1958 junctionColorer.addScheme(scheme);
1959
1961 poiColorer.addScheme(GUIColorScheme("given POI color", TL("given POI color"), RGBColor::RED, "", true));
1962 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1963 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1964 poiColorer.addScheme(scheme);
1965 poiColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::RED, "", true));
1966
1968 polyColorer.addScheme(GUIColorScheme("given polygon color", TL("given polygon color"), RGBColor::ORANGE, "", true));
1969 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1970 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1971 polyColorer.addScheme(scheme);
1972 polyColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::ORANGE, "", true));
1973 polyColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1974
1976 {
1977 GUIScaleScheme edgeScheme = GUIScaleScheme(TL("default"), 1, TL("uniform"), true);
1978 laneScaler.addScheme(edgeScheme);
1979 }
1980
1982 dataColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::ORANGE, "", true));
1983 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1984 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
1985 dataColorer.addScheme(scheme);
1986 dataColorer.addScheme(GUIColorScheme("by origin taz", TL("by origin taz"), RGBColor::ORANGE, "", true));
1987 dataColorer.addScheme(GUIColorScheme("by destination taz", TL("by destination taz"), RGBColor::ORANGE, "", true));
1989 scheme.setAllowsNegativeValues(true);
1990 dataColorer.addScheme(scheme);
1991
1992 // dummy schemes
1993 vehicleColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1994 personColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1995 containerColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1996 vehicleScaler.addScheme(GUIScaleScheme(TL("uniform"), 1, "", true));
1997}
1998
1999
2000int
2002 if (UseMesoSim) {
2003 return edgeColorer.getActive();
2004 }
2005 return laneColorer.getActive();
2006}
2007
2008
2009int
2011 if (UseMesoSim) {
2012 return edgeScaler.getActive();
2013 }
2014 return laneScaler.getActive();
2015}
2016
2017
2025
2026
2034
2035
2036void
2041 dev.writeAttr("dither", dither);
2042 dev.writeAttr("fps", fps);
2043 dev.writeAttr("trueZ", trueZ);
2044 dev.writeAttr("drawBoundaries", drawBoundaries);
2045 dev.writeAttr("disableDottedContours", disableDottedContours);
2046 dev.writeAttr("forceDrawRectangleSelection", forceDrawForRectangleSelection);
2047 geometryIndices.print(dev, "geometryIndices");
2048 dev.closeTag();
2050 dev.writeAttr("backgroundColor", backgroundColor);
2051 dev.writeAttr("showGrid", showGrid);
2052 dev.writeAttr("gridXSize", gridXSize);
2053 dev.writeAttr("gridYSize", gridYSize);
2054 dev.closeTag();
2055 // edges
2057 dev.writeAttr("laneEdgeMode", getLaneEdgeMode());
2058 dev.writeAttr("scaleMode", getLaneEdgeScaleMode());
2059 dev.writeAttr("laneShowBorders", laneShowBorders);
2060 dev.writeAttr("showBikeMarkings", showBikeMarkings);
2061 dev.writeAttr("showLinkDecals", showLinkDecals);
2062 dev.writeAttr("realisticLinkRules", realisticLinkRules);
2063 dev.writeAttr("showLinkRules", showLinkRules);
2064 dev.writeAttr("showRails", showRails);
2065 dev.writeAttr("secondaryShape", secondaryShape);
2066 dev.writeAttr("hideConnectors", hideConnectors);
2067 dev.writeAttr("widthExaggeration", laneWidthExaggeration);
2068 dev.writeAttr("minSize", laneMinSize);
2069 dev.writeAttr("showDirection", showLaneDirection);
2070 dev.writeAttr("showSublanes", showSublanes);
2071 dev.writeAttr("spreadSuperposed", spreadSuperposed);
2072 dev.writeAttr("disableHideByZoom", disableHideByZoom);
2073 dev.writeAttr("edgeParam", edgeParam);
2074 dev.writeAttr("laneParam", laneParam);
2075 dev.writeAttr("vehicleParam", vehicleParam);
2076 dev.writeAttr("vehicleScaleParam", vehicleScaleParam);
2077 dev.writeAttr("vehicleTextParam", vehicleTextParam);
2078 dev.writeAttr("edgeData", edgeData);
2079 dev.writeAttr("edgeDataID", edgeDataID);
2080 dev.writeAttr("edgeDataScaling", edgeDataScaling);
2081 edgeValueRainBow.print(dev, "edgeValue");
2082 dev.lf();
2083 dev << " ";
2084 edgeName.print(dev, "edgeName");
2085 dev.lf();
2086 dev << " ";
2087 internalEdgeName.print(dev, "internalEdgeName");
2088 dev.lf();
2089 dev << " ";
2090 cwaEdgeName.print(dev, "cwaEdgeName");
2091 dev.lf();
2092 dev << " ";
2093 streetName.print(dev, "streetName");
2094 dev.lf();
2095 dev << " ";
2096 edgeValue.print(dev, "edgeValue");
2097 edgeScaleValue.print(dev, "edgeScaleValue");
2098 laneColorer.save(dev);
2099 laneScaler.save(dev);
2100 edgeColorer.save(dev, "meso:");
2101 edgeScaler.save(dev, "meso:");
2102 dev.closeTag();
2103 // vehicles
2105 dev.writeAttr("vehicleMode", vehicleColorer.getActive());
2106 dev.writeAttr("vehicleScaleMode", vehicleScaler.getActive());
2107 dev.writeAttr("vehicleQuality", vehicleQuality);
2108 vehicleSize.print(dev, "vehicle");
2109 dev.writeAttr("showBlinker", showBlinker);
2110 dev.writeAttr("drawMinGap", drawMinGap);
2111 dev.writeAttr("drawBrakeGap", drawBrakeGap);
2112 dev.writeAttr("showBTRange", showBTRange);
2113 dev.writeAttr("showRouteIndex", showRouteIndex);
2114 dev.writeAttr("scaleLength", scaleLength);
2115 dev.writeAttr("drawReversed", drawReversed);
2116 dev.writeAttr("showParkingInfo", showParkingInfo);
2117 dev.writeAttr("showChargingInfo", showChargingInfo);
2118 dev.lf();
2119 dev << " ";
2120 vehicleName.print(dev, "vehicleName");
2121 dev.lf();
2122 dev << " ";
2123 vehicleValue.print(dev, "vehicleValue");
2124 dev.lf();
2125 dev << " ";
2126 vehicleScaleValue.print(dev, "vehicleScaleValue");
2127 dev.lf();
2128 dev << " ";
2129 vehicleText.print(dev, "vehicleText");
2130 vehicleColorer.save(dev);
2131 vehicleScaler.save(dev);
2132 dev.closeTag();
2133 // persons
2135 dev.writeAttr("personMode", personColorer.getActive());
2136 dev.writeAttr("personQuality", personQuality);
2137 dev.writeAttr("showPedestrianNetwork", showPedestrianNetwork);
2138 dev.writeAttr("pedestrianNetworkColor", pedestrianNetworkColor);
2139 personSize.print(dev, "person");
2140 dev.lf();
2141 dev << " ";
2142 personName.print(dev, "personName");
2143 dev.lf();
2144 dev << " ";
2145 personValue.print(dev, "personValue");
2146 personColorer.save(dev);
2147 dev.closeTag();
2148 // containers
2150 dev.writeAttr("containerMode", containerColorer.getActive());
2151 dev.writeAttr("containerQuality", containerQuality);
2152 containerSize.print(dev, "container");
2153 dev.lf();
2154 dev << " ";
2155 containerName.print(dev, "containerName");
2157 dev.closeTag();
2158 // junctions
2160 dev.writeAttr("junctionMode", junctionColorer.getActive());
2161 dev.lf();
2162 dev << " ";
2163 drawLinkTLIndex.print(dev, "drawLinkTLIndex");
2164 dev.lf();
2165 dev << " ";
2166 drawLinkJunctionIndex.print(dev, "drawLinkJunctionIndex");
2167 dev.lf();
2168 dev << " ";
2169 junctionID.print(dev, "junctionID");
2170 dev.lf();
2171 dev << " ";
2172 junctionName.print(dev, "junctionName");
2173 dev.lf();
2174 dev << " ";
2175 internalJunctionName.print(dev, "internalJunctionName");
2176 dev.lf();
2177 dev << " ";
2178 tlsPhaseIndex.print(dev, "tlsPhaseIndex");
2179 tlsPhaseName.print(dev, "tlsPhaseName");
2180 dev.lf();
2181 dev << " ";
2182 dev.writeAttr("showLane2Lane", showLane2Lane);
2183 dev.writeAttr("drawShape", drawJunctionShape);
2184 dev.writeAttr("drawCrossingsAndWalkingareas", drawCrossingsAndWalkingareas);
2185 junctionSize.print(dev, "junction");
2186 junctionValueRainBow.print(dev, "junctionValue");
2187 junctionColorer.save(dev);
2188 dev.closeTag();
2189 // additionals
2191 dev.writeAttr("addMode", addMode);
2192 addSize.print(dev, "add");
2193 addName.print(dev, "addName");
2194 addFullName.print(dev, "addFullName");
2195 // temporal (will be integrated in a schema)
2196 dev.writeAttr("busStopColor", colorSettings.busStopColor);
2197 dev.writeAttr("busStopColorSign", colorSettings.busStopColorSign);
2198 dev.writeAttr("chargingStationColor", colorSettings.chargingStationColor);
2199 dev.writeAttr("chargingStationColorCharge", colorSettings.chargingStationColorCharge);
2200 dev.writeAttr("chargingStationColorSign", colorSettings.chargingStationColorSign);
2201 dev.writeAttr("containerStopColor", colorSettings.containerStopColor);
2202 dev.writeAttr("containerStopColorSign", colorSettings.containerStopColorSign);
2203 dev.writeAttr("parkingAreaColor", colorSettings.parkingAreaColor);
2204 dev.writeAttr("parkingAreaColorSign", colorSettings.parkingAreaColorSign);
2205 dev.writeAttr("parkingSpaceColor", colorSettings.parkingSpaceColor);
2206 dev.writeAttr("parkingSpaceColorContour", colorSettings.parkingSpaceColorContour);
2207 dev.writeAttr("personTripColor", colorSettings.personTripColor);
2208 dev.writeAttr("personTripWidth", widthSettings.personTripWidth);
2209 dev.writeAttr("rideColor", colorSettings.rideColor);
2210 dev.writeAttr("rideWidth", widthSettings.rideWidth);
2211 dev.writeAttr("selectedAdditionalColor", colorSettings.selectedAdditionalColor);
2212 dev.writeAttr("selectedConnectionColor", colorSettings.selectedConnectionColor);
2213 dev.writeAttr("selectedContainerColor", colorSettings.selectedContainerColor);
2214 dev.writeAttr("selectedContainerPlanColor", colorSettings.selectedContainerPlanColor);
2215 dev.writeAttr("selectedCrossingColor", colorSettings.selectedCrossingColor);
2216 dev.writeAttr("selectedEdgeColor", colorSettings.selectedEdgeColor);
2217 dev.writeAttr("selectedEdgeDataColor", colorSettings.selectedEdgeDataColor);
2218 dev.writeAttr("selectedLaneColor", colorSettings.selectedLaneColor);
2219 dev.writeAttr("selectedPersonColor", colorSettings.selectedPersonColor);
2220 dev.writeAttr("selectedPersonPlanColor", colorSettings.selectedPersonPlanColor);
2221 dev.writeAttr("selectedProhibitionColor", colorSettings.selectedProhibitionColor);
2222 dev.writeAttr("selectedRouteColor", colorSettings.selectedRouteColor);
2223 dev.writeAttr("selectedVehicleColor", colorSettings.selectedVehicleColor);
2224 dev.writeAttr("selectionColor", colorSettings.selectionColor);
2225 dev.writeAttr("stopColor", colorSettings.stopColor);
2226 dev.writeAttr("waypointColor", colorSettings.waypointColor);
2227 dev.writeAttr("stopContainerColor", colorSettings.stopContainerColor);
2228 dev.writeAttr("stopPersonColor", colorSettings.stopPersonColor);
2229 dev.writeAttr("trainStopColor", colorSettings.trainStopColor);
2230 dev.writeAttr("trainStopColorSign", colorSettings.trainStopColorSign);
2231 dev.writeAttr("transhipColor", colorSettings.transhipColor);
2232 dev.writeAttr("transhipWidth", widthSettings.transhipWidth);
2233 dev.writeAttr("transportColor", colorSettings.transportColor);
2234 dev.writeAttr("transportWidth", widthSettings.transportWidth);
2235 dev.writeAttr("tripWidth", widthSettings.tripWidth);
2236 dev.writeAttr("vehicleTripColor", colorSettings.personTripColor);
2237 dev.writeAttr("walkColor", colorSettings.walkColor);
2238 dev.writeAttr("walkWidth", widthSettings.walkWidth);
2239 dev.closeTag();
2240 // pois
2242 dev.writeAttr("poiTextParam", poiTextParam);
2243 poiSize.print(dev, "poi");
2244 dev.writeAttr("poiDetail", poiDetail);
2245 poiName.print(dev, "poiName");
2246 poiType.print(dev, "poiType");
2247 poiText.print(dev, "poiText");
2248 dev.writeAttr("poiUseCustomLayer", poiUseCustomLayer);
2249 dev.writeAttr("poiCustomLayer", poiCustomLayer);
2250 poiColorer.save(dev);
2251 dev.closeTag();
2252 // polys
2254 polySize.print(dev, "poly");
2255 polyName.print(dev, "polyName");
2256 polyType.print(dev, "polyType");
2257 dev.writeAttr("polyUseCustomLayer", polyUseCustomLayer);
2258 dev.writeAttr("polyCustomLayer", polyCustomLayer);
2259 polyColorer.save(dev);
2260 dev.closeTag();
2261 // 3D
2263 dev.writeAttr("show3DTLSLinkMarkers", show3DTLSLinkMarkers);
2264 dev.writeAttr("show3DTLSDomes", show3DTLSDomes);
2265 dev.writeAttr("show3DHeadUpDisplay", show3DHeadUpDisplay);
2266 dev.writeAttr("generate3DTLSModels", generate3DTLSModels);
2267 dev.writeAttr("ambient3DLight", ambient3DLight);
2268 dev.writeAttr("diffuse3DLight", diffuse3DLight);
2269 dev.closeTag();
2270 // legend
2272 dev.writeAttr("showSizeLegend", showSizeLegend);
2273 dev.writeAttr("showColorLegend", showColorLegend);
2274 dev.writeAttr("showVehicleColorLegend", showVehicleColorLegend);
2275 dev.closeTag();
2276
2277 dev.closeTag();
2278}
2279
2280
2281bool
2283 if (show3DTLSDomes != v2.show3DTLSDomes) {
2284 return false;
2285 }
2287 return false;
2288 }
2290 return false;
2291 }
2293 return false;
2294 }
2295 if (ambient3DLight != v2.ambient3DLight) {
2296 return false;
2297 }
2298 if (diffuse3DLight != v2.diffuse3DLight) {
2299 return false;
2300 }
2301 if (skyColor != v2.skyColor) {
2302 return false;
2303 }
2304 if (dither != v2.dither) {
2305 return false;
2306 }
2307 if (fps != v2.fps) {
2308 return false;
2309 }
2310 if (trueZ != v2.trueZ) {
2311 return false;
2312 }
2313 if (drawBoundaries != v2.drawBoundaries) {
2314 return false;
2315 }
2317 return false;
2318 }
2320 return false;
2321 }
2322 if (geometryIndices != v2.geometryIndices) {
2323 return false;
2324 }
2325 if (backgroundColor != v2.backgroundColor) {
2326 return false;
2327 }
2328 if (colorSettings != v2.colorSettings) {
2329 return false;
2330 }
2331 if (showGrid != v2.showGrid) {
2332 return false;
2333 }
2334 if (gridXSize != v2.gridXSize) {
2335 return false;
2336 }
2337 if (gridYSize != v2.gridYSize) {
2338 return false;
2339 }
2340
2341 if (!(edgeColorer == v2.edgeColorer)) {
2342 return false;
2343 }
2344 if (!(edgeScaler == v2.edgeScaler)) {
2345 return false;
2346 }
2347 if (!(laneColorer == v2.laneColorer)) {
2348 return false;
2349 }
2350 if (!(laneScaler == v2.laneScaler)) {
2351 return false;
2352 }
2353 if (laneShowBorders != v2.laneShowBorders) {
2354 return false;
2355 }
2357 return false;
2358 }
2359 if (showLinkDecals != v2.showLinkDecals) {
2360 return false;
2361 }
2363 return false;
2364 }
2365 if (showLinkRules != v2.showLinkRules) {
2366 return false;
2367 }
2368 if (showRails != v2.showRails) {
2369 return false;
2370 }
2371 if (secondaryShape != v2.secondaryShape) {
2372 return false;
2373 }
2374 if (edgeName != v2.edgeName) {
2375 return false;
2376 }
2378 return false;
2379 }
2380 if (cwaEdgeName != v2.cwaEdgeName) {
2381 return false;
2382 }
2383 if (streetName != v2.streetName) {
2384 return false;
2385 }
2386 if (edgeValue != v2.edgeValue) {
2387 return false;
2388 }
2389 if (edgeScaleValue != v2.edgeScaleValue) {
2390 return false;
2391 }
2392 if (hideConnectors != v2.hideConnectors) {
2393 return false;
2394 }
2396 return false;
2397 }
2398 if (laneMinSize != v2.laneMinSize) {
2399 return false;
2400 }
2402 return false;
2403 }
2404 if (showSublanes != v2.showSublanes) {
2405 return false;
2406 }
2408 return false;
2409 }
2411 return false;
2412 }
2413 if (edgeParam != v2.edgeParam) {
2414 return false;
2415 }
2416 if (laneParam != v2.laneParam) {
2417 return false;
2418 }
2419 if (vehicleParam != v2.vehicleParam) {
2420 return false;
2421 }
2423 return false;
2424 }
2426 return false;
2427 }
2428 if (edgeData != v2.edgeData) {
2429 return false;
2430 }
2431 if (edgeDataID != v2.edgeDataID) {
2432 return false;
2433 }
2434 if (edgeDataScaling != v2.edgeDataScaling) {
2435 return false;
2436 }
2438 return false;
2439 }
2440 if (!(vehicleColorer == v2.vehicleColorer)) {
2441 return false;
2442 }
2443 if (!(vehicleScaler == v2.vehicleScaler)) {
2444 return false;
2445 }
2446 if (vehicleQuality != v2.vehicleQuality) {
2447 return false;
2448 }
2449 if (vehicleSize != v2.vehicleSize) {
2450 return false;
2451 }
2452 if (showBlinker != v2.showBlinker) {
2453 return false;
2454 }
2456 return false;
2457 }
2458 if (drawMinGap != v2.drawMinGap) {
2459 return false;
2460 }
2461 if (drawBrakeGap != v2.drawBrakeGap) {
2462 return false;
2463 }
2464 if (showBTRange != v2.showBTRange) {
2465 return false;
2466 }
2467 if (showRouteIndex != v2.showRouteIndex) {
2468 return false;
2469 }
2470 if (scaleLength != v2.scaleLength) {
2471 return false;
2472 }
2473 if (drawReversed != v2.drawReversed) {
2474 return false;
2475 }
2476 if (showParkingInfo != v2.showParkingInfo) {
2477 return false;
2478 }
2480 return false;
2481 }
2482 if (vehicleName != v2.vehicleName) {
2483 return false;
2484 }
2485 if (vehicleValue != v2.vehicleValue) {
2486 return false;
2487 }
2489 return false;
2490 }
2491 if (vehicleText != v2.vehicleText) {
2492 return false;
2493 }
2494 if (!(personColorer == v2.personColorer)) {
2495 return false;
2496 }
2497 if (personQuality != v2.personQuality) {
2498 return false;
2499 }
2500 if (personSize != v2.personSize) {
2501 return false;
2502 }
2503 if (personName != v2.personName) {
2504 return false;
2505 }
2506 if (personValue != v2.personValue) {
2507 return false;
2508 }
2510 return false;
2511 }
2513 return false;
2514 }
2515 if (!(containerColorer == v2.containerColorer)) {
2516 return false;
2517 }
2519 return false;
2520 }
2521 if (containerSize != v2.containerSize) {
2522 return false;
2523 }
2524 if (containerName != v2.containerName) {
2525 return false;
2526 }
2527 if (!(junctionColorer == v2.junctionColorer)) {
2528 return false;
2529 }
2530 if (!(poiColorer == v2.poiColorer)) {
2531 return false;
2532 }
2533 if (!(polyColorer == v2.polyColorer)) {
2534 return false;
2535 }
2536 if (drawLinkTLIndex != v2.drawLinkTLIndex) {
2537 return false;
2538 }
2540 return false;
2541 }
2542 if (junctionID != v2.junctionID) {
2543 return false;
2544 }
2545 if (junctionName != v2.junctionName) {
2546 return false;
2547 }
2549 return false;
2550 }
2551 if (tlsPhaseIndex != v2.tlsPhaseIndex) {
2552 return false;
2553 }
2554 if (tlsPhaseName != v2.tlsPhaseName) {
2555 return false;
2556 }
2557
2558 if (showLane2Lane != v2.showLane2Lane) {
2559 return false;
2560 }
2561
2563 return false;
2564 }
2565
2567 return false;
2568 }
2569 if (junctionSize != v2.junctionSize) {
2570 return false;
2571 }
2573 return false;
2574 }
2575
2576 if (addMode != v2.addMode) {
2577 return false;
2578 }
2579 if (addSize != v2.addSize) {
2580 return false;
2581 }
2582 if (addName != v2.addName) {
2583 return false;
2584 }
2585 if (addFullName != v2.addFullName) {
2586 return false;
2587 }
2588 if (poiSize != v2.poiSize) {
2589 return false;
2590 }
2591 if (poiDetail != v2.poiDetail) {
2592 return false;
2593 }
2594 if (poiName != v2.poiName) {
2595 return false;
2596 }
2597 if (poiType != v2.poiType) {
2598 return false;
2599 }
2600 if (poiText != v2.poiText) {
2601 return false;
2602 }
2603 if (poiTextParam != v2.poiTextParam) {
2604 return false;
2605 }
2607 return false;
2608 }
2609 if (poiCustomLayer != v2.poiCustomLayer) {
2610 return false;
2611 }
2612 if (polySize != v2.polySize) {
2613 return false;
2614 }
2615 if (polyName != v2.polyName) {
2616 return false;
2617 }
2618 if (polyType != v2.polyType) {
2619 return false;
2620 }
2622 return false;
2623 }
2624 if (polyCustomLayer != v2.polyCustomLayer) {
2625 return false;
2626 }
2627
2628 if (showSizeLegend != v2.showSizeLegend) {
2629 return false;
2630 }
2631 if (showColorLegend != v2.showColorLegend) {
2632 return false;
2633 }
2635 return false;
2636 }
2637 if (!(dataColorer == v2.dataColorer)) {
2638 return false;
2639 }
2640 if (!(dataValue == v2.dataValue)) {
2641 return false;
2642 }
2644 return false;
2645 }
2647 return false;
2648 }
2649 if (!(relDataAttr == v2.relDataAttr)) {
2650 return false;
2651 }
2652 if (!(dataValueRainBow == v2.dataValueRainBow)) {
2653 return false;
2654 }
2655
2656 return true;
2657}
2658
2659
2660const RGBColor&
2662 switch (ls) {
2667 case LINKSTATE_TL_RED:
2668 return SUMO_color_TL_RED;
2679 case LINKSTATE_MAJOR:
2680 return realistic ? RGBColor::INVISIBLE : SUMO_color_MAJOR;
2681 case LINKSTATE_MINOR:
2682 return realistic ? SUMO_color_MAJOR : SUMO_color_MINOR;
2683 case LINKSTATE_EQUAL:
2684 return SUMO_color_EQUAL;
2685 case LINKSTATE_STOP:
2686 return realistic ? SUMO_color_MAJOR : SUMO_color_STOP;
2688 return realistic ? SUMO_color_MAJOR : SUMO_color_ALLWAY_STOP;
2689 case LINKSTATE_ZIPPER:
2690 return realistic ? RGBColor::INVISIBLE : SUMO_color_ZIPPER;
2691 case LINKSTATE_DEADEND:
2692 return SUMO_color_DEADEND;
2693 default:
2694 throw ProcessError(TLF("No color defined for LinkState '%'", std::string(ls, 1)));
2695 }
2696}
2697
2698
2699double
2701 double viewAngle = objectAngle - angle;
2702 while (viewAngle < 0) {
2703 viewAngle += 360;
2704 }
2705 // fmod round towards zero which is not want we want for negative numbers
2706 viewAngle = fmod(viewAngle, 360);
2707 if (viewAngle > 90 && viewAngle < 270) {
2708 // avoid reading text on its head
2709 objectAngle -= 180;
2710 }
2711 return objectAngle;
2712}
2713
2714
2715bool
2717 double viewAngle = objectAngle - angle;
2718 while (viewAngle < 0) {
2719 viewAngle += 360;
2720 }
2721 // fmod round towards zero which is not want we want for negative numbers
2722 viewAngle = fmod(viewAngle, 360);
2723 return (viewAngle > 90 && viewAngle < 270);
2724}
2725
2726
2728GUIVisualizationSettings::getDetailLevel(const double exaggeration) const {
2729 // calculate factor
2730 const auto factor = (scale * exaggeration);
2731 if (factor >= 10) {
2733 } else if (factor >= 5) {
2735 } else if (factor >= 2.5) {
2737 } else if (factor >= 1.25) {
2739 } else {
2741 }
2742}
2743
2744
2745bool
2746GUIVisualizationSettings::drawDetail(const double detail, const double exaggeration) const {
2747 if (detail <= 0) {
2748 return true;
2749 } else {
2750 return ((scale * exaggeration) >= detail);
2751 }
2752}
2753
2754
2755bool
2756GUIVisualizationSettings::drawMovingGeometryPoint(const double exaggeration, const double radius) const {
2757 return (scale * radius * exaggeration > 10);
2758}
2759
2760/****************************************************************************/
GUISelectedStorage gSelected
A global holder of selected objects.
GUIPropertyScheme< RGBColor > GUIColorScheme
GUIPropertyScheme< double > GUIScaleScheme
const RGBColor SUMO_color_EQUAL(128, 128, 128)
const RGBColor SUMO_color_TL_YELLOW_MAJOR(255, 255, 128)
#define COL_SCHEME_DYNAMIC
const RGBColor SUMO_color_ALLWAY_STOP(0, 0, 192)
const RGBColor SUMO_color_TL_YELLOW_MINOR(255, 255, 0)
const RGBColor SUMO_color_TL_OFF_NOSIGNAL(0, 255, 255)
const RGBColor OSG_color_SKY(51, 51, 102, 255)
const RGBColor SUMO_color_TL_REDYELLOW(255, 128, 0)
const RGBColor SUMO_color_TL_RED(255, 0, 0)
const RGBColor OSG_color_AMBIENT(32, 32, 32, 255)
const RGBColor SUMO_color_MAJOR(255, 255, 255)
const RGBColor OSG_color_DIFFUSE(64, 64, 64, 255)
const RGBColor SUMO_color_TL_GREEN_MINOR(0, 179, 0)
const RGBColor SUMO_color_ZIPPER(192, 128, 64)
#define COL_SCHEME_MISC
const RGBColor SUMO_color_TL_OFF_BLINKING(128, 64, 0)
#define COL_SCHEME_EMISSION
const RGBColor SUMO_color_DEADEND(0, 0, 0)
const RGBColor SUMO_color_MINOR(51, 51, 51)
const RGBColor SUMO_color_TL_GREEN_MAJOR(0, 255, 0)
const RGBColor SUMO_color_STOP(128, 0, 128)
#define TL(string)
Definition MsgHandler.h:315
#define TLF(string,...)
Definition MsgHandler.h:317
const SVCPermissions SVCAll
all VClasses are allowed
@ SVC_SHIP
is an arbitrary ship
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_NON_ROAD
classes which (normally) do not drive on normal roads
@ SVC_DELIVERY
vehicle is a small delivery vehicle
@ SVC_MOPED
vehicle is a moped
@ SVC_TAXI
vehicle is a taxi
@ SVC_BUS
vehicle is a bus
@ SVC_PEDESTRIAN
pedestrian
@ SUMO_TAG_VIEWSETTINGS_POIS
@ SUMO_TAG_VIEWSETTINGS_3D
@ SUMO_TAG_VIEWSETTINGS_BACKGROUND
@ SUMO_TAG_VIEWSETTINGS_LEGEND
@ SUMO_TAG_VIEWSETTINGS_OPENGL
@ SUMO_TAG_VIEWSETTINGS_ADDITIONALS
@ SUMO_TAG_VIEWSETTINGS_PERSONS
@ SUMO_TAG_VIEWSETTINGS_JUNCTIONS
@ SUMO_TAG_VIEWSETTINGS_VEHICLES
@ SUMO_TAG_VIEWSETTINGS_EDGES
@ SUMO_TAG_VIEWSETTINGS_SCHEME
@ SUMO_TAG_VIEWSETTINGS_POLYS
@ SUMO_TAG_VIEWSETTINGS_CONTAINERS
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
@ LINKSTATE_TL_REDYELLOW
The link has red light (must brake) but indicates upcoming green.
@ LINKSTATE_ALLWAY_STOP
This is an uncontrolled, all-way stop link.
@ LINKSTATE_MAJOR
This is an uncontrolled, major link, may pass.
@ LINKSTATE_STOP
This is an uncontrolled, minor link, has to stop.
@ LINKSTATE_TL_YELLOW_MAJOR
The link has yellow light, may pass.
@ LINKSTATE_TL_GREEN_MAJOR
The link has green light, may pass.
@ LINKSTATE_EQUAL
This is an uncontrolled, right-before-left link.
@ LINKSTATE_DEADEND
This is a dead end link.
@ LINKSTATE_ZIPPER
This is an uncontrolled, zipper-merge link.
@ LINKSTATE_TL_OFF_BLINKING
The link is controlled by a tls which is off and blinks, has to brake.
@ LINKSTATE_TL_YELLOW_MINOR
The link has yellow light, has to brake anyway.
@ LINKSTATE_TL_RED
The link has red light (must brake)
@ LINKSTATE_TL_GREEN_MINOR
The link has green light, has to brake.
@ LINKSTATE_MINOR
This is an uncontrolled, minor link, has to brake.
@ LINKSTATE_TL_OFF_NOSIGNAL
The link is controlled by a tls which is off, not blinking, may pass.
@ SUMO_ATTR_NAME
const double INVALID_DOUBLE
invalid double
Definition StdDefs.h:64
T MAX2(T a, T b)
Definition StdDefs.h:82
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
double getHeight() const
Returns the height of the boundary (y-axis)
Definition Boundary.cpp:160
double getWidth() const
Returns the width of the boudary (x-axis)
Definition Boundary.cpp:154
void setAllowsNegativeValues(bool value)
int addColor(const T &color, const double threshold, const std::string &name="")
void save(OutputDevice &dev, const std::string &prefix="") const
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
Stores the information about how to visualize structures.
GUIVisualizationTextSettings addName
GUIVisualizationTextSettings tlsPhaseIndex
bool poiUseCustomLayer
whether the rendering layer of POIs should be overriden
GUIVisualizationTextSettings vehicleName
GUIVisualizationTextSettings junctionName
void initNeteditDefaults()
init default settings
bool operator==(const GUIVisualizationSettings &vs2)
Comparison operator.
RGBColor backgroundColor
The background color to use.
GUIVisualizationSizeSettings vehicleSize
GUIVisualizationSizeSettings containerSize
bool showBlinker
Information whether vehicle blinkers shall be drawn.
GUIVisualizationTextSettings internalEdgeName
bool showPedestrianNetwork
Flag for visualizing the pedestrian network generated for JuPedSim.
RGBColor skyColor
sky background color
double polyCustomLayer
the custom layer for polygons
GUIVisualizationSizeSettings junctionSize
static const std::string SCHEME_NAME_DATA_ATTRIBUTE_NUMERICAL
bool drawBoundaries
enable or disable draw boundaries
static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
std::string edgeDataID
id for coloring by live edgeData
GUIScaler laneScaler
The lane scaler.
GUIVisualizationTextSettings edgeScaleValue
double BoundarySizeDrawing
constant for boundary size drawing (20 for slow computers, 10 for quick computers)
bool dither
Information whether dithering shall be enabled.
GUIColorer vehicleColorer
The vehicle colorer.
GUIVisualizationSettings(const std::string &_name, bool _netedit=false)
constructor
bool disableHideByZoom
disable hide by zoom
static const std::string SCHEME_NAME_EDGEDATA_LIVE
GUIVisualizationTextSettings personValue
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
GUIVisualizationTextSettings poiType
GUIVisualizationSizeSettings addSize
static const std::string SCHEME_NAME_SELECTION
std::string name
The name of this setting.
GUIColorer edgeColorer
The mesoscopic edge colorer.
int containerQuality
The quality of container drawing.
bool checkDrawAdditional(Detail d, const bool selected) const
check if draw additionals
RGBColor pedestrianNetworkColor
The color of the pedestrian network generated for JuPedSim.
GUIVisualizationTextSettings internalJunctionName
GUIVisualizationTextSettings vehicleScaleValue
GUIVisualizationSizeSettings poiSize
bool drawJunctionShape
whether the shape of the junction should be drawn
std::string edgeData
key for coloring by edgeData
GUIVisualizationTextSettings geometryIndices
GUIVisualizationTextSettings dataValue
bool show3DTLSDomes
whether the semi-transparent domes around 3D TL models should be drawn
bool flippedTextAngle(double objectAngle) const
return wether the text was flipped for reading at the given angle
bool realisticLinkRules
Information whether link rules (colored bars) shall be drawn with a realistic color scheme.
bool trueZ
drawl all objects according to their z data
bool myIgnoreHideByZoom
flag for ignore hide by zoom (used if we're drawing elements with constant size, their ID/name/etc....
int personQuality
The quality of person drawing.
GUIColorer poiColorer
The POI colorer.
GUIVisualizationWidthSettings widthSettings
width settings
GUIVisualizationTextSettings poiName
std::string vehicleScaleParam
key for scaling by vehicle parameter
bool showParkingInfo
Set whether parking related information should be shown.
GUIVisualizationTextSettings vehicleValue
bool disableDottedContours
flag for disable dotted contours in netedit
GUIColorer polyColorer
The polygon colorer.
int vehicleQuality
The quality of vehicle drawing.
GUIVisualizationTextSettings drawLinkJunctionIndex
bool checkDrawPoly(const Boundary &b, const bool selected) const
check if draw polygon
bool generate3DTLSModels
whether 3D TLS models should be generated automatically
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
GUIVisualizationTextSettings addFullName
GUIVisualizationTextSettings edgeValue
bool checkDrawVehicle(Detail d, const bool selected) const
check if draw vehicle
bool checkDrawPOI(const double w, const double h, const Detail d, const bool selected) const
check if draw POI
bool fps
Information whether frames-per-second should be drawn.
std::string vehicleParam
key for coloring by vehicle parameter
Detail getDetailLevel(const double exaggeration) const
return the detail level
bool showRails
Information whether rails shall be drawn.
GUIVisualizationSizeSettings personSize
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
GUIVisualizationTextSettings cwaEdgeName
GUIVisualizationTextSettings junctionID
std::string vehicleTextParam
key for rendering vehicle textual parameter
bool drawMovingGeometryPoint(const double exaggeration, const double radius) const
check if moving geometry point can be draw
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
GUIVisualizationColorSettings colorSettings
color settings
bool showSublanes
Whether to show sublane boundaries.
GUIVisualizationRainbowSettings edgeValueRainBow
checks and thresholds for rainbow coloring
bool showGrid
Information whether a grid shall be shown.
bool scaleLength
Whether vehicle length shall be scaled with length/geometry factor.
static const std::string SCHEME_NAME_TYPE
bool showVehicleColorLegend
Information whether the vehicle color legend shall be drawn.
double edgeRelWidthExaggeration
The edgeRelation exaggeration (upscale thickness)
bool hideConnectors
flag to show or hide connectors
GUIScaler vehicleScaler
The size scaling settings for vehicles.
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
GUIColorer personColorer
The person colorer.
void save(OutputDevice &dev) const
Writes the settings into an output device.
bool checkDrawContainer(Detail d, const bool selected) const
check if draw container
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
static const RGBColor & getLinkColor(const LinkState &ls, bool realistic=false)
map from LinkState to color constants
bool polyUseCustomLayer
whether the rendering layer of polygons should be overriden
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
double poiCustomLayer
the custom layer for POIs
bool showChargingInfo
Set whether the charging search related information should be shown.
RGBColor ambient3DLight
3D material light components
GUIVisualizationRainbowSettings junctionValueRainBow
double scale
information about a lane's width (temporary, used for a single view)
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
bool netedit
Whether the settings are for Netedit.
bool showLaneDirection
Whether to show direction indicators for lanes.
GUIVisualizationRainbowSettings dataValueRainBow
value below which edgeData and edgeRelation data value should not be rendered
void updateIgnoreHideByZoom()
update ignore hide by zoom (call BEFORE drawing all elements).
bool secondaryShape
whether secondary lane shape shall be drawn
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
bool checkDrawJunction(const Boundary &b, const bool selected) const
check if draw junction
GUIScaler edgeScaler
The mesoscopic edge scaler.
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
bool drawMinGap
Information whether the minimum gap shall be drawn.
GUIVisualizationTextSettings streetName
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
GUIVisualizationTextSettings poiText
GUIVisualizationTextSettings vehicleText
bool checkDrawPerson(Detail d, const bool selected) const
check if draw person
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
bool show3DHeadUpDisplay
whether to draw the head up display items
GUIColorer laneColorer
The lane colorer.
GUIVisualizationTextSettings polyName
double tazRelWidthExaggeration
The tazRelation exaggeration (upscale thickness)
bool laneShowBorders
Information whether lane borders shall be drawn.
GUIVisualizationTextSettings tlsPhaseName
GUIVisualizationTextSettings edgeName
Setting bundles for optional drawing names with size and color.
bool showSizeLegend
Information whether the size legend shall be drawn.
double laneMinSize
The minimum visual lane width for drawing.
GUIVisualizationTextSettings drawLinkTLIndex
GUIVisualizationTextSettings containerName
static std::map< std::string, std::vector< RGBColor > > RAINBOW_SCHEMES
GUIVisualizationSizeSettings polySize
GUIColorer containerColorer
The container colorer.
bool checkDrawEdge(const Boundary &b) const
check if draw edge
double gridXSize
Information about the grid spacings.
bool showBTRange
Information whether the communication range shall be drawn.
bool drawReversed
Whether to draw reversed vehicles in their reversed state.
GUIVisualizationTextSettings personName
bool showColorLegend
Information whether the edge color legend shall be drawn.
std::string poiTextParam
key for rendering poi textual parameter
bool showRouteIndex
Information whether the route index should be shown.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
scheme names
double selectorFrameScale
the current selection scaling in netedit (set in SelectorFrame)
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
int addMode
The additional structures visualization scheme.
std::string relDataAttr
key for coloring by edgeRelation / tazRelation attribute
GUIColorer junctionColorer
The junction colorer.
void copy(const GUIVisualizationSettings &s)
copy all content from another GUIVisualizationSettings (note: DON'T USE in DrawGL functions!...
static const std::string SCHEME_NAME_PERMISSION_CODE
static const std::string SCHEME_NAME_PARAM_NUMERICAL
std::string edgeParam
key for coloring by edge parameter
bool drawBrakeGap
Information whether the brake gap shall be drawn.
bool drawLaneChangePreference
Information whether the lane change preference shall be drawn.
double getTextAngle(double objectAngle) const
return an angle that is suitable for reading text aligned with the given angle (degrees)
GUIVisualizationTextSettings polyType
int poiDetail
The detail level for drawing POIs.
std::string edgeDataScaling
key for scaling by edgeData
double angle
The current view rotation angle.
Static storage of an output device and its base (abstract) implementation.
void lf()
writes a line feed if applicable
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static const RGBColor BLUE
Definition RGBColor.h:187
static const RGBColor GREY
Definition RGBColor.h:194
static const RGBColor YELLOW
Definition RGBColor.h:188
static const RGBColor INVISIBLE
Definition RGBColor.h:195
static const RGBColor ORANGE
Definition RGBColor.h:191
static const RGBColor CYAN
Definition RGBColor.h:189
static const RGBColor GREEN
Definition RGBColor.h:186
static const RGBColor BLACK
Definition RGBColor.h:193
static const RGBColor MAGENTA
Definition RGBColor.h:190
static const RGBColor RED
named colors
Definition RGBColor.h:185
static const double routeProbeSize
RouteProbe size.
static const RGBColor calibratorColor
color for Calibrators
static const double calibratorWidth
Calibrator width.
static const double vaporizerSize
Vaporizer size.
static const double arrowLength
arrow length
static const double rerouterSize
rerouter size
static const double calibratorHeight
Calibrator height.
static const RGBColor VSSColor
color for VSS
static const RGBColor overheadWireColorBot
overhead wire color bot
static const double arrowWidth
arrow width
static const RGBColor connectionColor
connection color
static const RGBColor overheadWireColorTop
overhead wire color top
static const double arrowOffset
arrow offset
static const RGBColor TLSConnectionColor
connection color between E1/junctions and TLS
static const double tractionSubstationSize
tractionSubstation size
static const RGBColor vaporizerColor
color for vaporizers
static const RGBColor overheadWireColorSelected
overhead wire color selected
static const RGBColor rerouterColor
color for rerouters
static const double stopEdgeSize
stopEdges size
static const RGBColor connectionColorSelected
connection color selected
static const RGBColor routeProbeColor
color for route probes
static const RGBColor special
color for selected special candidate element (Usually selected using shift+click)
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
static const RGBColor invalid
color for invalid elements
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element
static const RGBColor source
color for selected candidate source
RGBColor vehicleTripColor
color for vehicle trips
RGBColor parkingSpaceColorContour
color for parkingSpace contour
RGBColor selectionColor
basic selection color
static const RGBColor childConnectionColor
color for child connections between parents and child elements
RGBColor selectedEdgeColor
edge selection color
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, stopPersons...)
static const RGBColor SUMO_color_DEADEND_SHOW
color for highlighthing deadends
RGBColor stopPersonColor
color for stopPersons
RGBColor selectedCrossingColor
crossings selection color
static const RGBColor crossingPriorityColor
color for priority crossing
RGBColor chargingStationColor
color for chargingStations
RGBColor parkingSpaceColor
color for parkingSpace innen
RGBColor selectedLaneColor
lane selection color
static const RGBColor crossingInvalidColor
color for invalid crossing
RGBColor selectedRouteColor
route selection color (used for routes and vehicle stops)
RGBColor selectedEdgeDataColor
edge data selection color
bool operator==(const GUIVisualizationColorSettings &other)
equality comparator
RGBColor trainStopColorSign
color for trainStops signs
RGBColor transhipColor
color for tranships
RGBColor waypointColor
color for Waypoints
static const RGBColor crossingColor
color for crossings
static const RGBColor editShapeColor
color for edited shapes (Junctions, crossings and connections)
RGBColor containerStopColor
color for containerStops
RGBColor selectedProhibitionColor
prohibition selection color
RGBColor selectedConnectionColor
connection selection color
RGBColor busStopColorSign
color for busStops signs
RGBColor selectedContainerColor
container selection color
RGBColor containerStopColorSign
color for containerStop signs
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
RGBColor parkingAreaColorSign
color for parkingArea sign
RGBColor transportColor
color for transport
RGBColor busStopColor
color for busStops
bool operator!=(const GUIVisualizationColorSettings &other)
inequality comparator
RGBColor selectedVehicleColor
vehicle selection color
RGBColor chargingStationColorCharge
color for chargingStation during charging
RGBColor parkingAreaColor
color for parkingAreas
RGBColor selectedPersonColor
person selection color
RGBColor selectedContainerPlanColor
container plan selection color (Rides, Walks, containerStops...)
RGBColor personTripColor
color for stopPersons
RGBColor stopContainerColor
color for containerStops
RGBColor trainStopColor
color for trainStops
RGBColor chargingStationColorSign
color for chargingStation sign
static const double connectionWidth
connection width
static const double tmp
draw connections in demand mode
static const double E3EntryExitWidth
E3 Entry/Exit detector width.
static const RGBColor E2Color
color for E2 detectors
static const double E1InstantHeight
E1 Instant detector heights.
static const double E2Width
E2 detector widths.
static const RGBColor E3ExitColor
color for Exits
static const double E3Size
E3 detector size.
static const RGBColor E1Color
color for E1 detectors
static const double E1Width
E1 detector widths.
static const RGBColor E3EntryColor
color for Entrys
static const double E1InstantWidth
E1 Instant detector widths.
static const double E3EntryExitHeight
E3 Entry/Exit detector height.
static const RGBColor E1InstantColor
color for E1 Instant detectors
static const double E1Height
E1 Instant detector heights.
static const double segmentWidthSmall
width of small dotted contour segments
static const RGBColor firstFrontColor
first color of dotted front contour
static const RGBColor firstInspectedColor
first color of dotted inspected contour
static const RGBColor secondFrontColor
second color of dotted front contour
static const double segmentWidth
width of dotted contour segments
static const RGBColor secondInspectedColor
second color of dotted inspectedcontour
static const double segmentLength
length of dotted contour segments
static const double segmentWidthLarge
width of large dotted contour segments
static const double crossingGeometryPointRadius
moving crossing geometry point radius
static const double polygonGeometryPointRadius
moving geometry point radius
static const double connectionGeometryPointRadius
moving connection geometry point radius
static const double additionalGeometryPointRadius
moving additional geometry point radius
static const double junctionGeometryPointRadius
moving junction geometry point radius
static const double laneGeometryPointRadius
moving lane geometry point radius
static const double junctionBubbleRadius
junction bubble radius
static const double polygonContourWidth
polygon contour width
static const double polylineWidth
poly line width
static const double edgeGeometryPointRadius
moving edge geometry point radius
bool hideMax
whether data above threshold should not be colored
bool operator==(const GUIVisualizationRainbowSettings &other)
equality comparator
bool setNeutral
whether the scale should be centered at a specific value
bool fixRange
whether the color scale should be fixed to the given min/max values
double minThreshold
threshold below which value should not be colored
void print(OutputDevice &dev, const std::string &name) const
print values in output device
bool operator!=(const GUIVisualizationRainbowSettings &other)
inequality comparator
GUIVisualizationRainbowSettings(bool _hideMin, double _minThreshold, bool _hideMax, double _maxThreshold, bool _setNeutral, double _neutralThreshold, bool _fixRange)
constructor
bool hideMin
whether data below threshold should not be colored
double neutralThreshold
neutral point of scale
double maxThreshold
threshold above which value should not be colored
bool operator!=(const GUIVisualizationSizeSettings &other)
inequality comparator
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
GUIVisualizationSizeSettings(double _minSize, double _exaggeration=1.0, bool _constantSize=false, bool _constantSizeSelected=false)
constructor
double exaggeration
The size exaggeration (upscale)
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
void print(OutputDevice &dev, const std::string &name) const
print values in output device
double minSize
The minimum size to draw this object.
bool operator==(const GUIVisualizationSizeSettings &other)
equality comparator
bool constantSizeSelected
whether only selected objects shall be drawn with constant
static const double stoppingPlaceSignOffset
busStop offset
static const double symbolInternalRadius
symbol internal radius
static const double chargingStationWidth
chargingStation width
static const double busStopWidth
busStop width
static const double symbolExternalRadius
symbol external radius
static const double symbolInternalTextSize
symbol internal text size
static const double containerStopWidth
containerStop width
static const double trainStopWidth
trainStop width
void print(OutputDevice &dev, const std::string &name) const
print values in output device
bool operator==(const GUIVisualizationTextSettings &other)
equality comparator
bool show(const GUIGlObject *o) const
whether to show the text
RGBColor bgColor
background text color
bool operator!=(const GUIVisualizationTextSettings &other)
inequality comparator
GUIVisualizationTextSettings(bool _show, double _size, RGBColor _color, RGBColor _bgColor=RGBColor(128, 0, 0, 0), bool _constSize=true, bool _onlySelected=false)
constructor
bool onlySelected
whether only selected objects shall have text drawn
double scaledSize(double scale, double constFactor=0.1) const
get scale size
bool constSize
@brif flag to avoid size changes
bool operator!=(const GUIVisualizationWidthSettings &other)
inequality comparator
bool operator==(const GUIVisualizationWidthSettings &other)
equality comparator
double personTripWidth
width for person trips
static const double embeddedRouteWidth
width for embeddedroutes
static const double routeWidth
width for routes