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
708 if (disableHideByZoom) {
709 return true;
710 } else if (myIgnoreHideByZoom) {
711 return true;
712 } else {
713 return (scale * MAX2(b.getWidth(), b.getHeight())) > BoundarySizeDrawing;
714 }
715}
716
717
718void
720 // general
721 if (disableHideByZoom) {
722 myIgnoreHideByZoom = true;
723 // junctions
725 myIgnoreHideByZoom = true;
727 myIgnoreHideByZoom = true;
729 myIgnoreHideByZoom = true;
730 } else if (junctionID.showText && junctionID.constSize) {
731 myIgnoreHideByZoom = true;
733 myIgnoreHideByZoom = true;
735 myIgnoreHideByZoom = true;
737 myIgnoreHideByZoom = true;
739 myIgnoreHideByZoom = true;
740 // edges
741 } else if (edgeName.showText) {
742 myIgnoreHideByZoom = true;
744 myIgnoreHideByZoom = true;
746 myIgnoreHideByZoom = true;
747 } else if (streetName.showText && streetName.constSize) {
748 myIgnoreHideByZoom = true;
749 } else if (edgeValue.showText && edgeValue.constSize) {
750 myIgnoreHideByZoom = true;
752 myIgnoreHideByZoom = true;
753 // additionals
754 } else if (addSize.constantSize) {
755 myIgnoreHideByZoom = true;
756 } else if (addSize.constantSizeSelected) {
757 myIgnoreHideByZoom = true;
758 } else if (addName.showText && addName.constSize) {
759 myIgnoreHideByZoom = true;
761 myIgnoreHideByZoom = true;
762 // POIs
763 } else if (poiSize.constantSize) {
764 myIgnoreHideByZoom = true;
765 } else if (poiSize.constantSizeSelected) {
766 myIgnoreHideByZoom = true;
767 } else if (poiName.showText && poiName.constSize) {
768 myIgnoreHideByZoom = true;
769 } else if (poiType.showText && poiType.constSize) {
770 myIgnoreHideByZoom = true;
771 } else if (poiText.showText && poiText.constSize) {
772 myIgnoreHideByZoom = true;
773 // vehicles
774 } else if (vehicleSize.constantSize) {
775 myIgnoreHideByZoom = true;
777 myIgnoreHideByZoom = true;
779 myIgnoreHideByZoom = true;
781 myIgnoreHideByZoom = true;
783 myIgnoreHideByZoom = true;
785 myIgnoreHideByZoom = true;
786 // persons
787 } else if (personSize.constantSize) {
788 myIgnoreHideByZoom = true;
789 } else if (personSize.constantSizeSelected) {
790 myIgnoreHideByZoom = true;
791 } else if (personName.showText && personName.constSize) {
792 myIgnoreHideByZoom = true;
794 myIgnoreHideByZoom = true;
795 // containers
796 } else if (containerSize.constantSize) {
797 myIgnoreHideByZoom = true;
799 myIgnoreHideByZoom = true;
801 myIgnoreHideByZoom = true;
802 } else {
803 myIgnoreHideByZoom = false;
804 }
805}
806
807
808bool
809GUIVisualizationSettings::checkDrawAdditional(const Detail d, const bool selected) const {
811 return false;
812 } else if (myIgnoreHideByZoom) {
813 return true;
814 } else if (addSize.constantSize) {
815 return true;
816 } else if (addSize.constantSizeSelected && selected) {
817 return true;
818 } else if (addName.showText && addName.constSize) {
819 return true;
821 return true;
822 } else {
824 }
825}
826
827
828bool
829GUIVisualizationSettings::checkDrawPoly(const Boundary& b, const bool selected) const {
831 return false;
832 } else if (myIgnoreHideByZoom) {
833 return true;
834 } else if (polySize.constantSize) {
835 return true;
836 } else if (polySize.constantSizeSelected && selected) {
837 return true;
838 } else if (polyName.showText && polyName.constSize) {
839 return true;
840 } else if (polyType.showText && polyType.constSize) {
841 return true;
842 } else {
843 return (scale * MAX2(b.getWidth(), b.getHeight())) > BoundarySizeDrawing;
844 }
845}
846
847
848bool
849GUIVisualizationSettings::checkDrawPOI(const double w, const double h, const Detail d, const bool selected) const {
851 return false;
852 } else if (myIgnoreHideByZoom) {
853 return true;
854 } else if (poiSize.constantSize) {
855 return true;
856 } else if (poiSize.constantSizeSelected && selected) {
857 return true;
858 } else if (poiName.showText && poiName.constSize) {
859 return true;
860 } else if (poiType.showText && poiType.constSize) {
861 return true;
862 } else if (poiText.showText && poiText.constSize) {
863 return true;
864 } else if ((w > 0) && (h > 0)) {
865 return (scale * MAX2(w, h)) > BoundarySizeDrawing;
866 } else {
868 }
869}
870
871
872bool
873GUIVisualizationSettings::checkDrawVehicle(const Detail d, const bool selected) const {
875 return false;
876 } else if (myIgnoreHideByZoom) {
877 return true;
878 } else if (vehicleSize.constantSize) {
879 return true;
880 } else if (vehicleSize.constantSizeSelected && selected) {
881 return true;
883 return true;
885 return true;
887 return true;
889 return true;
890 } else {
892 }
893}
894
895
896bool
897GUIVisualizationSettings::checkDrawPerson(const Detail d, const bool selected) const {
899 return false;
900 } else if (myIgnoreHideByZoom) {
901 return true;
902 } else if (personSize.constantSize) {
903 return true;
904 } else if (personSize.constantSizeSelected && selected) {
905 return true;
906 } else if (personName.showText && personName.constSize) {
907 return true;
909 return true;
910 } else {
912 }
913}
914
915
916bool
917GUIVisualizationSettings::checkDrawContainer(const Detail d, const bool selected) const {
919 return false;
920 } else if (myIgnoreHideByZoom) {
921 return true;
922 } else if (containerSize.constantSize) {
923 return true;
924 } else if (containerSize.constantSizeSelected && selected) {
925 return true;
927 return true;
928 } else {
930 }
931}
932
933
934void
936 // just copy. Note: By default = operator is disabled to avoid accidental copies)
937 *this = s;
938}
939
940
941void
944 GUIColorScheme scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor::BLACK, TL("road"), true, 0);
945 scheme.addColor(RGBColor::GREY, 1, TL("sidewalk"));
946 scheme.addColor(RGBColor(192, 66, 44), 2, TL("bike lane"));
947 scheme.addColor(RGBColor(0, 0, 0, 0), 3, TL("green verge"));
948 scheme.addColor(RGBColor(150, 200, 200), 4, TL("waterway"));
949 scheme.addColor(RGBColor::BLACK, 5, TL("railway"));
950 scheme.addColor(RGBColor(64, 0, 64), 6, TL("rails on road"));
951 scheme.addColor(RGBColor(92, 92, 92), 7, TL("no passenger")); // paths, service roads etc
952 scheme.addColor(RGBColor::RED, 8, TL("closed")); // road closing
953 scheme.addColor(RGBColor::GREEN, 9, TL("connector")); // macro-connector
954 scheme.addColor(RGBColor::ORANGE, 10, TL("forbidden")); // forbidden road
955 scheme.addColor(RGBColor(200, 240, 240), 11, TL("airway"));
956 laneColorer.addScheme(scheme);
957 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
958 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
959 laneColorer.addScheme(scheme);
960 scheme = GUIColorScheme(SCHEME_NAME_PERMISSION_CODE, RGBColor(240, 240, 240), "nobody");
961 scheme.addColor(RGBColor(10, 10, 10), (double)SVC_PASSENGER, "passenger");
962 scheme.addColor(RGBColor(128, 128, 128), (double)SVC_PEDESTRIAN, "pedestrian");
963 scheme.addColor(RGBColor(80, 80, 80), (double)(SVC_PEDESTRIAN | SVC_DELIVERY), "pedestrian_delivery");
964 scheme.addColor(RGBColor(192, 66, 44), (double)SVC_BICYCLE, "bicycle");
965 scheme.addColor(RGBColor(40, 100, 40), (double)SVC_BUS, "bus");
966 scheme.addColor(RGBColor(166, 147, 26), (double)SVC_TAXI, "taxi");
967 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~SVC_NON_ROAD), "normal_road");
968 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_NON_ROAD)), "disallow_pedestrian");
969 scheme.addColor(RGBColor(255, 206, 0), (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_MOPED | SVC_NON_ROAD)), "motorway");
970 scheme.addColor(RGBColor(150, 200, 200), (double)SVC_SHIP, "waterway");
971 scheme.addColor(RGBColor::GREEN, (double)SVCAll, "all");
972 laneColorer.addScheme(scheme);
973 // ... traffic states ...
974 scheme = GUIColorScheme("by allowed speed (lanewise)", TL("by allowed speed (lanewise)"), RGBColor::RED);
975 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
976 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
977 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
978 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
979 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
980 laneColorer.addScheme(scheme);
981 scheme = GUIColorScheme("by current occupancy (lanewise, brutto)", TL("by current occupancy (lanewise, brutto)"), RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC);
982 scheme.addColor(RGBColor::GREEN, 0.25);
983 scheme.addColor(RGBColor::YELLOW, 0.5);
984 scheme.addColor(RGBColor::ORANGE, 0.75);
985 scheme.addColor(RGBColor::RED, 1.0);
986 laneColorer.addScheme(scheme);
987 scheme = GUIColorScheme("by current occupancy (lanewise, netto)", TL("by current occupancy (lanewise, netto)"), RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC);
988 scheme.addColor(RGBColor::GREEN, 0.25);
989 scheme.addColor(RGBColor::YELLOW, 0.5);
990 scheme.addColor(RGBColor::ORANGE, 0.75);
991 scheme.addColor(RGBColor::RED, 1.0);
992 laneColorer.addScheme(scheme);
993 scheme = GUIColorScheme("by first vehicle waiting time (lanewise)", TL("by first vehicle waiting time (lanewise)"), RGBColor(235, 235, 235), "", false, 0, COL_SCHEME_DYNAMIC);
994 scheme.addColor(RGBColor::CYAN, 30.);
995 scheme.addColor(RGBColor::GREEN, 100.);
996 scheme.addColor(RGBColor::YELLOW, 200.);
997 scheme.addColor(RGBColor::RED, 300.);
998 laneColorer.addScheme(scheme);
999 scheme = GUIColorScheme("by lane number (streetwise)", TL("by lane number (streetwise)"), RGBColor::RED);
1000 scheme.addColor(RGBColor::BLUE, 5.);
1001 laneColorer.addScheme(scheme);
1002 // ... emissions ...
1003 scheme = GUIColorScheme("by CO2 emissions", TL("by CO2 emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1004 scheme.addColor(RGBColor::CYAN, 450);
1005 scheme.addColor(RGBColor::GREEN, 900);
1006 scheme.addColor(RGBColor::YELLOW, 1350);
1007 scheme.addColor(RGBColor::ORANGE, 1800);
1008 scheme.addColor(RGBColor::RED, 2250);
1009 scheme.addColor(RGBColor::MAGENTA, 3000);
1010 laneColorer.addScheme(scheme);
1011 scheme = GUIColorScheme("by CO emissions", TL("by CO emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1012 scheme.addColor(RGBColor::CYAN, 30);
1013 scheme.addColor(RGBColor::GREEN, 60);
1014 scheme.addColor(RGBColor::YELLOW, 90);
1015 scheme.addColor(RGBColor::ORANGE, 120);
1016 scheme.addColor(RGBColor::RED, 150);
1017 scheme.addColor(RGBColor::MAGENTA, 200);
1018 laneColorer.addScheme(scheme);
1019 scheme = GUIColorScheme("by PMx emissions", TL("by PMx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1020 scheme.addColor(RGBColor::CYAN, 0.3);
1021 scheme.addColor(RGBColor::GREEN, 0.5);
1022 scheme.addColor(RGBColor::YELLOW, 0.8);
1023 scheme.addColor(RGBColor::ORANGE, 1);
1024 scheme.addColor(RGBColor::RED, 1.3);
1025 scheme.addColor(RGBColor::MAGENTA, 1.6);
1026 laneColorer.addScheme(scheme);
1027 scheme = GUIColorScheme("by NOx emissions", TL("by NOx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1028 scheme.addColor(RGBColor::CYAN, 6);
1029 scheme.addColor(RGBColor::GREEN, 12);
1030 scheme.addColor(RGBColor::YELLOW, 18);
1031 scheme.addColor(RGBColor::ORANGE, 24);
1032 scheme.addColor(RGBColor::RED, 30);
1033 scheme.addColor(RGBColor::MAGENTA, 40);
1034 laneColorer.addScheme(scheme);
1035 scheme = GUIColorScheme("by HC emissions", TL("by HC emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1036 scheme.addColor(RGBColor::CYAN, 8);
1037 scheme.addColor(RGBColor::GREEN, 16);
1038 scheme.addColor(RGBColor::YELLOW, 24);
1039 scheme.addColor(RGBColor::ORANGE, 32);
1040 scheme.addColor(RGBColor::RED, 40);
1041 scheme.addColor(RGBColor::MAGENTA, 50);
1042 laneColorer.addScheme(scheme);
1043 scheme = GUIColorScheme("by fuel consumption", TL("by fuel consumption"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1044 scheme.addColor(RGBColor::CYAN, 0.2);
1045 scheme.addColor(RGBColor::GREEN, 0.4);
1046 scheme.addColor(RGBColor::YELLOW, 0.6);
1047 scheme.addColor(RGBColor::ORANGE, 0.8);
1048 scheme.addColor(RGBColor::RED, 1);
1049 scheme.addColor(RGBColor::MAGENTA, 1.3);
1050 laneColorer.addScheme(scheme);
1051 scheme = GUIColorScheme("by noise emissions (Harmonoise)", TL("by noise emissions (Harmonoise)"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1052 scheme.addColor(RGBColor::CYAN, 1.3);
1053 scheme.addColor(RGBColor::GREEN, 1.4);
1054 scheme.addColor(RGBColor::YELLOW, 1.6);
1055 scheme.addColor(RGBColor::ORANGE, 1.7);
1056 scheme.addColor(RGBColor::RED, 1.9);
1057 scheme.addColor(RGBColor::MAGENTA, 2.4);
1058 laneColorer.addScheme(scheme);
1059 // ... weights (experimental) ...
1060 scheme = GUIColorScheme("by global travel time", TL("by global travel time"), RGBColor::GREEN);
1061 scheme.addColor(RGBColor::RED, 100.);
1062 scheme.setAllowsNegativeValues(true);
1063 laneColorer.addScheme(scheme);
1064 scheme = GUIColorScheme("by global speed percentage", TL("by global speed percentage"), RGBColor::RED);
1065 scheme.addColor(RGBColor::YELLOW, 50.);
1066 scheme.addColor(RGBColor::GREEN, 100.);
1067 scheme.setAllowsNegativeValues(true);
1068 laneColorer.addScheme(scheme);
1069 scheme = GUIColorScheme("by given length/geometrical length", TL("by given length/geometrical length"), RGBColor::RED);
1070 scheme.addColor(RGBColor::ORANGE, 0.25);
1071 scheme.addColor(RGBColor::YELLOW, 0.5);
1072 scheme.addColor(RGBColor(179, 179, 179, 255), 1.);
1073 scheme.addColor(RGBColor::GREEN, 2.);
1074 scheme.addColor(RGBColor::CYAN, 4.);
1075 scheme.addColor(RGBColor::BLUE, 100.);
1076 laneColorer.addScheme(scheme);
1077 laneColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1078 scheme = GUIColorScheme("by loaded weight", TL("by loaded weight"), RGBColor::GREEN);
1079 scheme.addColor(RGBColor::RED, 100.);
1080 scheme.setAllowsNegativeValues(true);
1081 laneColorer.addScheme(scheme);
1082 scheme = GUIColorScheme("by priority", TL("by priority"), RGBColor::YELLOW);
1083 scheme.addColor(RGBColor::RED, -20.);
1084 scheme.addColor(RGBColor::GREEN, 20.);
1085 scheme.setAllowsNegativeValues(true);
1086 laneColorer.addScheme(scheme);
1087 scheme = GUIColorScheme("by height at start", TL("by height at start"), RGBColor::GREY);
1088 scheme.addColor(RGBColor::BLUE, -10.);
1089 scheme.addColor(RGBColor::RED, 10.);
1090 scheme.addColor(RGBColor::YELLOW, 50.);
1091 scheme.addColor(RGBColor::GREEN, 100.);
1092 scheme.addColor(RGBColor::MAGENTA, 200.);
1093 scheme.setAllowsNegativeValues(true);
1094 laneColorer.addScheme(scheme);
1095 scheme = GUIColorScheme("by height at geometry-segment start", TL("by height at geometry-segment start"), RGBColor::GREY);
1096 scheme.addColor(RGBColor::BLUE, -10.);
1097 scheme.addColor(RGBColor::RED, 10.);
1098 scheme.addColor(RGBColor::YELLOW, 50.);
1099 scheme.addColor(RGBColor::GREEN, 100.);
1100 scheme.addColor(RGBColor::MAGENTA, 200.);
1101 scheme.setAllowsNegativeValues(true);
1102 laneColorer.addScheme(scheme);
1103 scheme = GUIColorScheme("by inclination", TL("by inclination"), RGBColor::GREY);
1104 scheme.addColor(RGBColor::YELLOW, 0.1);
1105 scheme.addColor(RGBColor::RED, 0.3);
1106 scheme.addColor(RGBColor::GREEN, -0.1);
1107 scheme.addColor(RGBColor::BLUE, -0.3);
1108 scheme.setAllowsNegativeValues(true);
1109 laneColorer.addScheme(scheme);
1110 scheme = GUIColorScheme("by geometry-segment inclination", TL("by geometry-segment inclination"), RGBColor::GREY);
1111 scheme.addColor(RGBColor::YELLOW, 0.1);
1112 scheme.addColor(RGBColor::RED, 0.3);
1113 scheme.addColor(RGBColor::GREEN, -0.1);
1114 scheme.addColor(RGBColor::BLUE, -0.3);
1115 scheme.setAllowsNegativeValues(true);
1116 laneColorer.addScheme(scheme);
1117 scheme = GUIColorScheme("by average speed", TL("by average speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1118 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1119 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1120 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1121 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1122 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1123 laneColorer.addScheme(scheme);
1124 scheme = GUIColorScheme("by average relative speed ", TL("by average relative speed "), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1125 scheme.addColor(RGBColor::YELLOW, 0.25);
1126 scheme.addColor(RGBColor::GREEN, 0.5);
1127 scheme.addColor(RGBColor::CYAN, 0.75);
1128 scheme.addColor(RGBColor::BLUE, 1.);
1129 scheme.addColor(RGBColor::MAGENTA, 1.25);
1130 laneColorer.addScheme(scheme);
1131 scheme = GUIColorScheme("by routing device assumed speed ", TL("by routing device assumed speed "), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1132 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1133 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1134 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1135 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1136 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1137 laneColorer.addScheme(scheme);
1138 scheme = GUIColorScheme("by electricity consumption", TL("by electricity consumption"), RGBColor::GREEN, "", false, 0, COL_SCHEME_EMISSION);
1139 scheme.addColor(RGBColor::CYAN, 0.2);
1140 scheme.addColor(RGBColor::GREEN, 0.4);
1141 scheme.addColor(RGBColor::YELLOW, 0.6);
1142 scheme.addColor(RGBColor::ORANGE, 0.8);
1143 scheme.addColor(RGBColor::RED, 1.0);
1144 scheme.addColor(RGBColor::MAGENTA, 2.0);
1145 laneColorer.addScheme(scheme);
1146 scheme = GUIColorScheme("by insertion-backlog (streetwise)", TL("by insertion-backlog (streetwise)"), RGBColor(204, 204, 204), "", false, 0, COL_SCHEME_DYNAMIC);
1147 scheme.addColor(RGBColor::GREEN, 1.);
1148 scheme.addColor(RGBColor::YELLOW, 10.);
1149 scheme.addColor(RGBColor::RED, 100.);
1150 laneColorer.addScheme(scheme);
1151 scheme = GUIColorScheme("by TAZ (streetwise)", TL("by TAZ (streetwise)"), RGBColor(204, 204, 204), "no TAZ", true);
1152 laneColorer.addScheme(scheme);
1154 scheme.setAllowsNegativeValues(true);
1155 laneColorer.addScheme(scheme);
1157 scheme.setAllowsNegativeValues(true);
1158 laneColorer.addScheme(scheme);
1160 scheme.setAllowsNegativeValues(true);
1161 laneColorer.addScheme(scheme);
1162 scheme = GUIColorScheme("by distance (kilometrage)", TL("by distance (kilometrage)"), RGBColor(204, 204, 204));
1163 scheme.addColor(RGBColor(255, 204, 204), 1.);
1164 scheme.addColor(RGBColor::RED, 10000.);
1165 scheme.addColor(RGBColor(204, 204, 255), -1.);
1166 scheme.addColor(RGBColor::BLUE, -10000.);
1167 scheme.setAllowsNegativeValues(true);
1168 laneColorer.addScheme(scheme);
1169 scheme = GUIColorScheme("by abs distance (kilometrage)", TL("by abs distance (kilometrage)"), RGBColor(204, 204, 204));
1170 scheme.addColor(RGBColor::RED, 1.);
1171 scheme.setAllowsNegativeValues(false);
1172 laneColorer.addScheme(scheme);
1173 scheme = GUIColorScheme("by reachability (traveltime)", TL("by reachability (traveltime)"), RGBColor::RED);
1174 scheme.addColor(RGBColor::GREY, INVALID_DOUBLE, "unreachable");
1175 scheme.setAllowsNegativeValues(true);
1176 laneColorer.addScheme(scheme);
1177 scheme = GUIColorScheme("by thread index", TL("by thread index"), RGBColor(204, 204, 204));
1178 scheme.addColor(RGBColor::RED, 1.);
1179 laneColorer.addScheme(scheme);
1180 scheme = GUIColorScheme("free parking spaces", TL("free parking spaces"), RGBColor(204, 204, 204), "", false, 0, COL_SCHEME_DYNAMIC);
1181 scheme.addColor(RGBColor::RED, 1.);
1182 scheme.addColor(RGBColor::YELLOW, 10.);
1183 scheme.addColor(RGBColor::GREEN, 100.);
1184 scheme.addColor(RGBColor::BLUE, 1000.);
1185 laneColorer.addScheme(scheme);
1187 scheme.setAllowsNegativeValues(true);
1188 laneColorer.addScheme(scheme);
1189
1191 vehicleColorer.addScheme(GUIColorScheme("given vehicle/type/route color", TL("given vehicle/type/route color"), RGBColor::YELLOW, "", true));
1192 vehicleColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1193 vehicleColorer.addScheme(GUIColorScheme("given/assigned vehicle color", TL("given/assigned vehicle color"), RGBColor::YELLOW, "", true));
1194 vehicleColorer.addScheme(GUIColorScheme("given/assigned type color", TL("given/assigned type color"), RGBColor::YELLOW, "", true));
1195 vehicleColorer.addScheme(GUIColorScheme("given/assigned route color", TL("given/assigned route color"), RGBColor::YELLOW, "", true));
1196 vehicleColorer.addScheme(GUIColorScheme("depart position as HSV", TL("depart position as HSV"), RGBColor::YELLOW, "", true));
1197 vehicleColorer.addScheme(GUIColorScheme("arrival position as HSV", TL("arrival position as HSV"), RGBColor::YELLOW, "", true));
1198 vehicleColorer.addScheme(GUIColorScheme("direction/distance as HSV", TL("direction/distance as HSV"), RGBColor::YELLOW, "", true));
1199 scheme = GUIColorScheme("by speed", TL("by speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1200 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1201 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1202 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1203 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1204 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1205 scheme.setAllowsNegativeValues(true); // negative speed indicates stopped
1206 scheme.addColor(RGBColor::RED, -1); // stopped on road
1207 scheme.addColor(RGBColor::GREY, -2); // stopped off-road (parking)
1208 vehicleColorer.addScheme(scheme);
1209 scheme = GUIColorScheme("by action step", TL("by action step"), RGBColor::GREY, TL("no action"), true, 0, COL_SCHEME_DYNAMIC);
1210 scheme.addColor(RGBColor(0, 255, 0, 255), 1., TL("action in next step"));
1211 scheme.addColor(RGBColor(80, 160, 80, 255), 2., TL("had action step"));
1212 vehicleColorer.addScheme(scheme);
1213 scheme = GUIColorScheme("by waiting time", TL("by waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1214 scheme.addColor(RGBColor::CYAN, 30.);
1215 scheme.addColor(RGBColor::GREEN, 100.);
1216 scheme.addColor(RGBColor::YELLOW, 200.);
1217 scheme.addColor(RGBColor::RED, 300.);
1218 vehicleColorer.addScheme(scheme);
1219 scheme = GUIColorScheme("by accumulated waiting time", TL("by accumulated waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1220 scheme.addColor(RGBColor::CYAN, 25.);
1221 scheme.addColor(RGBColor::GREEN, 50.);
1222 scheme.addColor(RGBColor::YELLOW, 75.);
1223 scheme.addColor(RGBColor::RED, 100.);
1224 vehicleColorer.addScheme(scheme);
1225 scheme = GUIColorScheme("by time since lane change", TL("by time since lane change"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1226 scheme.addColor(RGBColor(189, 189, 179, 255), -180);
1227 scheme.addColor(RGBColor(255, 255, 0, 255), -20);
1228 scheme.addColor(RGBColor(255, 0, 0, 255), -0.01);
1229 scheme.addColor(RGBColor(0, 0, 255, 255), 0.01);
1230 scheme.addColor(RGBColor(0, 255, 255, 255), 20);
1231 scheme.addColor(RGBColor(179, 189, 189, 255), 180);
1232 scheme.setAllowsNegativeValues(true);
1233 vehicleColorer.addScheme(scheme);
1234 scheme = GUIColorScheme("by max speed", TL("by max speed"), RGBColor::RED);
1235 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1236 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1237 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1238 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1239 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1240 vehicleColorer.addScheme(scheme);
1241 // ... emissions ...
1242 scheme = GUIColorScheme("by CO2 emissions", TL("by CO2 emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1243 scheme.addColor(RGBColor::CYAN, 23000);
1244 scheme.addColor(RGBColor::GREEN, 46000);
1245 scheme.addColor(RGBColor::YELLOW, 69000);
1246 scheme.addColor(RGBColor::ORANGE, 92000);
1247 scheme.addColor(RGBColor::RED, 115000);
1248 scheme.addColor(RGBColor::MAGENTA, 150000);
1249 vehicleColorer.addScheme(scheme);
1250 scheme = GUIColorScheme("by CO emissions", TL("by CO emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1251 scheme.addColor(RGBColor::CYAN, 1500);
1252 scheme.addColor(RGBColor::GREEN, 3000);
1253 scheme.addColor(RGBColor::YELLOW, 4500);
1254 scheme.addColor(RGBColor::ORANGE, 6000);
1255 scheme.addColor(RGBColor::RED, 7500);
1256 scheme.addColor(RGBColor::MAGENTA, 10000);
1257 vehicleColorer.addScheme(scheme);
1258 scheme = GUIColorScheme("by PMx emissions", TL("by PMx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1259 scheme.addColor(RGBColor::CYAN, 12);
1260 scheme.addColor(RGBColor::GREEN, 24);
1261 scheme.addColor(RGBColor::YELLOW, 36);
1262 scheme.addColor(RGBColor::ORANGE, 48);
1263 scheme.addColor(RGBColor::RED, 60);
1264 scheme.addColor(RGBColor::MAGENTA, 80);
1265 vehicleColorer.addScheme(scheme);
1266 scheme = GUIColorScheme("by NOx emissions", TL("by NOx emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1267 scheme.addColor(RGBColor::CYAN, 300);
1268 scheme.addColor(RGBColor::GREEN, 600);
1269 scheme.addColor(RGBColor::YELLOW, 900);
1270 scheme.addColor(RGBColor::ORANGE, 1200);
1271 scheme.addColor(RGBColor::RED, 1500);
1272 scheme.addColor(RGBColor::MAGENTA, 2000);
1273 vehicleColorer.addScheme(scheme);
1274 scheme = GUIColorScheme("by HC emissions", TL("by HC emissions"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1275 scheme.addColor(RGBColor::CYAN, 400);
1276 scheme.addColor(RGBColor::GREEN, 800);
1277 scheme.addColor(RGBColor::YELLOW, 1200);
1278 scheme.addColor(RGBColor::ORANGE, 1600);
1279 scheme.addColor(RGBColor::RED, 2000);
1280 scheme.addColor(RGBColor::MAGENTA, 2500);
1281 vehicleColorer.addScheme(scheme);
1282 scheme = GUIColorScheme("by fuel consumption", TL("by fuel consumption"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1283 scheme.addColor(RGBColor::CYAN, 10);
1284 scheme.addColor(RGBColor::GREEN, 20);
1285 scheme.addColor(RGBColor::YELLOW, 30);
1286 scheme.addColor(RGBColor::ORANGE, 40);
1287 scheme.addColor(RGBColor::RED, 50);
1288 scheme.addColor(RGBColor::MAGENTA, 60);
1289 vehicleColorer.addScheme(scheme);
1290 scheme = GUIColorScheme("by noise emissions (Harmonoise)", RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1291 scheme.addColor(RGBColor::CYAN, 60);
1292 scheme.addColor(RGBColor::GREEN, 70);
1293 scheme.addColor(RGBColor::YELLOW, 80);
1294 scheme.addColor(RGBColor::ORANGE, 90);
1295 scheme.addColor(RGBColor::RED, 100);
1296 scheme.addColor(RGBColor::MAGENTA, 120);
1297 vehicleColorer.addScheme(scheme);
1298 scheme = GUIColorScheme("by reroute number", TL("by reroute number"), RGBColor::GREY, "", false, 0, COL_SCHEME_DYNAMIC);
1299 scheme.addColor(RGBColor::YELLOW, 1.);
1300 scheme.addColor(RGBColor::RED, 10.);
1301 vehicleColorer.addScheme(scheme);
1302 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1303 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1304 vehicleColorer.addScheme(scheme);
1305 scheme = GUIColorScheme("by offset from best lane", TL("by offset from best lane"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1306 scheme.addColor(RGBColor(255, 0, 255, 255), -100, TL("opposite lane"));
1307 scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-3");
1308 scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-1");
1309 scheme.addColor(RGBColor(0, 255, 255, 255), 1, "1");
1310 scheme.addColor(RGBColor(0, 0, 255, 255), 3, "3");
1311 scheme.setAllowsNegativeValues(true);
1312 vehicleColorer.addScheme(scheme);
1313 scheme = GUIColorScheme("by acceleration", TL("by acceleration"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1314 scheme.addColor(RGBColor(64, 0, 0, 255), -9.0);
1315 scheme.addColor(RGBColor(255, 0, 0, 255), -4.5 /* -SUMOVTypeParameter::getDefaultDecel() */);
1316 scheme.addColor(RGBColor(255, 255, 0, 255), -0.1);
1317 scheme.addColor(RGBColor(0, 255, 255, 255), 0.1);
1318 scheme.addColor(RGBColor(0, 0, 255, 255), 2.6 /* SUMOVTypeParameter::getDefaultAccel() */);
1319 scheme.addColor(RGBColor(255, 0, 255, 255), 5.2);
1320 scheme.setAllowsNegativeValues(true);
1321 vehicleColorer.addScheme(scheme);
1322 scheme = GUIColorScheme("by time gap on lane", TL("by time gap on lane"), RGBColor(255, 255, 0, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1323 scheme.addColor(RGBColor(179, 179, 179, 255), -1);
1324 scheme.addColor(RGBColor(0, 255, 255, 255), 1);
1325 scheme.addColor(RGBColor(0, 0, 255, 255), 2);
1326 scheme.setAllowsNegativeValues(true);
1327 vehicleColorer.addScheme(scheme);
1328 scheme = GUIColorScheme("by depart delay", TL("by depart delay"), RGBColor::BLUE);
1329 scheme.addColor(RGBColor::CYAN, 30.);
1330 scheme.addColor(RGBColor::GREEN, 100.);
1331 scheme.addColor(RGBColor::YELLOW, 200.);
1332 scheme.addColor(RGBColor::RED, 300.);
1333 vehicleColorer.addScheme(scheme);
1334 scheme = GUIColorScheme("by electricity consumption", TL("by electricity consumption"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1335 scheme.addColor(RGBColor::CYAN, 10);
1336 scheme.addColor(RGBColor::GREEN, 20);
1337 scheme.addColor(RGBColor::YELLOW, 30);
1338 scheme.addColor(RGBColor::ORANGE, 40);
1339 scheme.addColor(RGBColor::RED, 60);
1340 scheme.addColor(RGBColor::MAGENTA, 100);
1341 vehicleColorer.addScheme(scheme);
1342 scheme = GUIColorScheme("by relative battery charge", TL("by relative battery charge"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1343 scheme.setAllowsNegativeValues(true);
1344 scheme.addColor(RGBColor::MAGENTA, 0.1);
1345 scheme.addColor(RGBColor::RED, 0.2);
1346 scheme.addColor(RGBColor::ORANGE, 0.3);
1347 scheme.addColor(RGBColor::YELLOW, 0.4);
1348 scheme.addColor(RGBColor::GREEN, 0.6);
1349 scheme.addColor(RGBColor::CYAN, 1.);
1350 vehicleColorer.addScheme(scheme);
1351 scheme = GUIColorScheme("by charged energy", TL("by charged energy"), RGBColor::GREY, "", false, 0, COL_SCHEME_EMISSION);
1352 scheme.setAllowsNegativeValues(true);
1353 scheme.addColor(RGBColor::MAGENTA, 10);
1354 scheme.addColor(RGBColor::RED, 20);
1355 scheme.addColor(RGBColor::ORANGE, 30);
1356 scheme.addColor(RGBColor::YELLOW, 100);
1357 scheme.addColor(RGBColor::GREEN, 200);
1358 scheme.addColor(RGBColor::CYAN, 500);
1359 vehicleColorer.addScheme(scheme);
1360 scheme = GUIColorScheme("by time loss", TL("by time loss"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1361 scheme.addColor(RGBColor::CYAN, 10.);
1362 scheme.addColor(RGBColor::GREEN, 60.);
1363 scheme.addColor(RGBColor::YELLOW, 180.);
1364 scheme.addColor(RGBColor::RED, 900.);
1365 vehicleColorer.addScheme(scheme);
1366 scheme = GUIColorScheme("by stop delay", TL("by stop delay"), RGBColor::GREY, "", false, -1, COL_SCHEME_DYNAMIC);
1367 scheme.addColor(RGBColor::BLUE, 0.);
1368 scheme.addColor(RGBColor::CYAN, 10.);
1369 scheme.addColor(RGBColor::GREEN, 60.);
1370 scheme.addColor(RGBColor::YELLOW, 120.);
1371 scheme.addColor(RGBColor::ORANGE, 300.);
1372 scheme.addColor(RGBColor::RED, 900.);
1373 scheme.setAllowsNegativeValues(true);
1374 vehicleColorer.addScheme(scheme);
1375 scheme = GUIColorScheme("by stop arrival delay", TL("by stop arrival delay"), RGBColor::GREY, "", false, INVALID_DOUBLE, COL_SCHEME_DYNAMIC);
1376 scheme.addColor(RGBColor::MAGENTA, -10.);
1377 scheme.addColor(RGBColor::BLUE, 0.);
1378 scheme.addColor(RGBColor::CYAN, 10.);
1379 scheme.addColor(RGBColor::GREEN, 60.);
1380 scheme.addColor(RGBColor::YELLOW, 120.);
1381 scheme.addColor(RGBColor::ORANGE, 300.);
1382 scheme.addColor(RGBColor::RED, 900.);
1383 scheme.setAllowsNegativeValues(true);
1384 vehicleColorer.addScheme(scheme);
1385 scheme = GUIColorScheme("by lateral speed", TL("by lateral speed"), RGBColor(179, 179, 179, 255), "0", false, 0, COL_SCHEME_DYNAMIC);
1386 scheme.addColor(RGBColor(255, 0, 0, 255), -3, "-1.5");
1387 scheme.addColor(RGBColor(255, 255, 0, 255), -1, "-0.5");
1388 scheme.addColor(RGBColor(0, 255, 255, 255), 1, "0.5");
1389 scheme.addColor(RGBColor(0, 0, 255, 255), 3, "1.5");
1390 scheme.setAllowsNegativeValues(true);
1391 vehicleColorer.addScheme(scheme);
1392 scheme = GUIColorScheme(SCHEME_NAME_PARAM_NUMERICAL, RGBColor(204, 204, 204));
1393 scheme.setAllowsNegativeValues(true);
1394 vehicleColorer.addScheme(scheme);
1395 vehicleColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1396 vehicleColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1397
1399 personColorer.addScheme(GUIColorScheme("given person/type color", TL("given person/type color"), RGBColor::BLUE, "", true));
1400 personColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::BLUE, "", true));
1401 personColorer.addScheme(GUIColorScheme("given/assigned person color", TL("given/assigned person color"), RGBColor::BLUE, "", true));
1402 personColorer.addScheme(GUIColorScheme("given/assigned type color", TL("given/assigned type color"), RGBColor::BLUE, "", true));
1403 scheme = GUIColorScheme("by speed", TL("by speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1404 scheme.addColor(RGBColor::YELLOW, 2.5 / 3.6);
1405 scheme.addColor(RGBColor::GREEN, 5. / 3.6);
1406 scheme.addColor(RGBColor::BLUE, 10. / 3.6);
1407 scheme.setAllowsNegativeValues(true); // negative speed indicates stopped
1408 scheme.addColor(RGBColor::GREY, -1.); // stop stage
1409 scheme.addColor(RGBColor::GREY, -2.); // stop stage (departure)
1410 personColorer.addScheme(scheme);
1411 scheme = GUIColorScheme("by mode", TL("by mode"), RGBColor::GREY, TL("waiting for insertion"), true, 0, COL_SCHEME_DYNAMIC);
1412 scheme.addColor(RGBColor::RED, 1., TL("stopped"));
1413 scheme.addColor(RGBColor::GREEN, 2., TL("walking"));
1414 scheme.addColor(RGBColor::BLUE, 3., TL("riding"));
1415 scheme.addColor(RGBColor::CYAN, 4., TL("accessing trainStop"));
1416 scheme.addColor(RGBColor::YELLOW, 5., TL("waiting for ride"));
1417 personColorer.addScheme(scheme);
1418 scheme = GUIColorScheme("by waiting time", TL("by waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1419 scheme.addColor(RGBColor::CYAN, 30.);
1420 scheme.addColor(RGBColor::GREEN, 100.);
1421 scheme.addColor(RGBColor::YELLOW, 200.);
1422 scheme.addColor(RGBColor::RED, 300.);
1423 personColorer.addScheme(scheme);
1424 scheme = GUIColorScheme("by jammed state", TL("by jammed state"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1425 scheme.addColor(RGBColor::RED, 1.);
1426 personColorer.addScheme(scheme);
1427 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1428 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1429 personColorer.addScheme(scheme);
1430 personColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1431 personColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1432
1434 containerColorer.addScheme(GUIColorScheme("given container/type color", TL("given container/type color"), RGBColor::YELLOW, "", true));
1435 containerColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1436 containerColorer.addScheme(GUIColorScheme("given/assigned container color", TL("given/assigned container color"), RGBColor::YELLOW, "", true));
1437 containerColorer.addScheme(GUIColorScheme("given/assigned type color", TL("given/assigned type color"), RGBColor::YELLOW, "", true));
1438 scheme = GUIColorScheme("by speed", TL("by speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1439 scheme.addColor(RGBColor::YELLOW, 2.5 / 3.6);
1440 scheme.addColor(RGBColor::GREEN, 5. / 3.6);
1441 scheme.addColor(RGBColor::BLUE, 10. / 3.6);
1443 scheme = GUIColorScheme("by mode", TL("by mode"), RGBColor::GREY, TL("waiting for insertion"), true, 0, COL_SCHEME_DYNAMIC);
1444 scheme.addColor(RGBColor::RED, 1., TL("stopped"));
1445 scheme.addColor(RGBColor::BLUE, 3., TL("transport"));
1446 scheme.addColor(RGBColor::CYAN, 4., TL("accessing trainStop"));
1447 scheme.addColor(RGBColor::YELLOW, 5., TL("waiting for transport"));
1448 scheme.addColor(RGBColor::GREEN, 6., TL("tranship")); // (moving without vehicle)
1450 scheme = GUIColorScheme("by waiting time", TL("by waiting time"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1451 scheme.addColor(RGBColor::CYAN, 30.);
1452 scheme.addColor(RGBColor::GREEN, 100.);
1453 scheme.addColor(RGBColor::YELLOW, 200.);
1454 scheme.addColor(RGBColor::RED, 300.);
1456 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1457 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1459 containerColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1460 containerColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1461
1463 scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor::BLACK, "", true);
1464 scheme.addColor(RGBColor(150, 200, 200), 1, TL("waterway"));
1465 scheme.addColor(RGBColor(0, 0, 0, 0), 2, TL("railway"));
1466 scheme.addColor(RGBColor(200, 240, 240), 3, TL("airway"));
1467 junctionColorer.addScheme(scheme);
1468 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1469 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
1470 junctionColorer.addScheme(scheme);
1471 scheme = GUIColorScheme(SCHEME_NAME_TYPE, RGBColor::GREEN, "traffic_light", true);
1472 scheme.addColor(RGBColor(0, 128, 0), 1, "traffic_light_unregulated");
1473 scheme.addColor(RGBColor::YELLOW, 2, "priority");
1474 scheme.addColor(RGBColor::RED, 3, "priority_stop");
1475 scheme.addColor(RGBColor::BLUE, 4, "right_before_left");
1476 scheme.addColor(RGBColor::CYAN, 5, "allway_stop");
1477 scheme.addColor(RGBColor::GREY, 6, "district");
1478 scheme.addColor(RGBColor::MAGENTA, 7, "unregulated");
1479 scheme.addColor(RGBColor::BLACK, 8, "dead_end");
1480 scheme.addColor(RGBColor::ORANGE, 9, "rail_signal");
1481 scheme.addColor(RGBColor(172, 108, 44), 10, "zipper"); // brown, darker than the zipper link rule
1482 scheme.addColor(RGBColor(192, 255, 192), 11, "traffic_light_right_on_red"); // light green
1483 scheme.addColor(RGBColor(128, 0, 128), 12, "rail_crossing"); // dark purple
1484 scheme.addColor(RGBColor(0, 0, 128), 13, "left_before_right"); // dark blue
1485 junctionColorer.addScheme(scheme);
1486 scheme = GUIColorScheme("by height", TL("by height"), RGBColor::GREY);
1487 scheme.addColor(RGBColor::BLUE, -10.);
1488 scheme.addColor(RGBColor::RED, 10.);
1489 scheme.addColor(RGBColor::YELLOW, 50.);
1490 scheme.addColor(RGBColor::GREEN, 100.);
1491 scheme.addColor(RGBColor::MAGENTA, 200.);
1492 scheme.setAllowsNegativeValues(true);
1493 junctionColorer.addScheme(scheme);
1494
1496 poiColorer.addScheme(GUIColorScheme("given POI color", TL("given POI color"), RGBColor::RED, "", true));
1497 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1498 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1499 poiColorer.addScheme(scheme);
1500 poiColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::RED, "", true));
1501
1503 polyColorer.addScheme(GUIColorScheme("given polygon color", TL("given polygon color"), RGBColor::ORANGE, "", true));
1504 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1505 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1506 polyColorer.addScheme(scheme);
1507 polyColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::ORANGE, "", true));
1508 polyColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1509
1511 {
1512 GUIScaleScheme laneScheme = GUIScaleScheme(TL("default"), 1, TL("uniform"), true);
1513 laneScaler.addScheme(laneScheme);
1514 laneScheme = GUIScaleScheme(SCHEME_NAME_SELECTION, 0.5, TL("unselected"), true, 0, COL_SCHEME_MISC);
1515 laneScheme.addColor(5, 1, TL("selected"));
1516 laneScaler.addScheme(laneScheme);
1517 // ... traffic states ...
1518 laneScheme = GUIScaleScheme(TL("by allowed speed (lanewise)"), 0);
1519 laneScheme.addColor(10, 150. / 3.6);
1520 laneScaler.addScheme(laneScheme);
1521 laneScheme = GUIScaleScheme(TL("by current occupancy (lanewise, brutto)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1522 laneScheme.addColor(10, 0.95);
1523 laneScaler.addScheme(laneScheme);
1524 laneScheme = GUIScaleScheme(TL("by current occupancy (lanewise, netto)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1525 laneScheme.addColor(10, 0.95);
1526 laneScaler.addScheme(laneScheme);
1527 laneScheme = GUIScaleScheme(TL("by first vehicle waiting time (lanewise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1528 laneScheme.addColor(10, 300.);
1529 laneScaler.addScheme(laneScheme);
1530 laneScheme = GUIScaleScheme(TL("by lane number (streetwise)"), 1);
1531 laneScheme.addColor(10, 5.);
1532 laneScaler.addScheme(laneScheme);
1533 // ... emissions ...
1534 laneScheme = GUIScaleScheme(TL("by CO2 emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1535 laneScheme.addColor(10, 10. / 7.5 / 5.);
1536 laneScaler.addScheme(laneScheme);
1537 laneScheme = GUIScaleScheme(TL("by CO emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1538 laneScheme.addColor(10, 0.05 / 7.5 / 2.);
1539 laneScaler.addScheme(laneScheme);
1540 laneScheme = GUIScaleScheme(TL("by PMx emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1541 laneScheme.addColor(10, .005 / 7.5 / 5.);
1542 laneScaler.addScheme(laneScheme);
1543 laneScheme = GUIScaleScheme(TL("by NOx emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1544 laneScheme.addColor(10, .125 / 7.5 / 5.);
1545 laneScaler.addScheme(laneScheme);
1546 laneScheme = GUIScaleScheme(TL("by HC emissions"), 0, "", false, 0, COL_SCHEME_EMISSION);
1547 laneScheme.addColor(10, .02 / 7.5 / 4.);
1548 laneScaler.addScheme(laneScheme);
1549 laneScheme = GUIScaleScheme(TL("by fuel consumption"), 0, "", false, 0, COL_SCHEME_EMISSION);
1550 laneScheme.addColor(10, .005 / 7.5 * 100.);
1551 laneScaler.addScheme(laneScheme);
1552 laneScheme = GUIScaleScheme(TL("by noise emissions (Harmonoise)"), 0, "", false, 0, COL_SCHEME_EMISSION);
1553 laneScheme.addColor(10, 100.);
1554 laneScaler.addScheme(laneScheme);
1555 // ... weights (experimental) ...
1556 laneScheme = GUIScaleScheme(TL("by global travel time"), 0);
1557 laneScheme.addColor(10, 100.);
1558 laneScheme.setAllowsNegativeValues(true);
1559 laneScaler.addScheme(laneScheme);
1560 laneScheme = GUIScaleScheme(TL("by global speed percentage"), 0);
1561 laneScheme.addColor(10, 100.);
1562 laneScheme.setAllowsNegativeValues(true);
1563 laneScaler.addScheme(laneScheme);
1564 laneScheme = GUIScaleScheme(TL("by given length/geometrical length"), 0);
1565 laneScheme.addColor(10, 10.);
1566 laneScaler.addScheme(laneScheme);
1567 laneScheme = GUIScaleScheme(TL("by loaded weight"), 0);
1568 laneScheme.addColor(-1000, -1000.);
1569 laneScheme.addColor(1000, 1000.);
1570 laneScheme.setAllowsNegativeValues(true);
1571 laneScaler.addScheme(laneScheme);
1572 laneScheme = GUIScaleScheme(TL("by priority"), 1);
1573 laneScheme.addColor(0.5, -20.);
1574 laneScheme.addColor(5, 20.);
1575 laneScheme.setAllowsNegativeValues(true);
1576 laneScaler.addScheme(laneScheme);
1577 laneScheme = GUIScaleScheme(TL("by average speed"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1578 laneScheme.addColor(10, 150. / 3.6);
1579 laneScaler.addScheme(laneScheme);
1580 laneScheme = GUIScaleScheme(TL("by average relative speed"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1581 laneScheme.addColor(0.5, 0.5);
1582 laneScheme.addColor(2, 1.);
1583 laneScheme.addColor(10, 2.);
1584 laneScaler.addScheme(laneScheme);
1585 laneScheme = GUIScaleScheme(TL("by electricity consumption"), 0, "", false, 0, COL_SCHEME_EMISSION);
1586 laneScheme.addColor(10, 1. / 7.5 / 5.);
1587 laneScaler.addScheme(laneScheme);
1588 laneScheme = GUIScaleScheme(TL("by insertion-backlog (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1589 laneScheme.addColor(1, 1.);
1590 laneScheme.addColor(10, 10.);
1591 laneScheme.addColor(50, 100.);
1592 laneScaler.addScheme(laneScheme);
1593 laneScheme = GUIScaleScheme(SCHEME_NAME_EDGEDATA_NUMERICAL, 0.1, TL("missing data"), false, MISSING_DATA);
1594 laneScheme.addColor(1, 1.);
1595 laneScheme.addColor(2, 10.);
1596 laneScheme.addColor(5, 100.);
1597 laneScheme.addColor(10, 1000.);
1598 laneScheme.setAllowsNegativeValues(true);
1599 laneScaler.addScheme(laneScheme);
1600 }
1601
1603 edgeColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor(0, 0, 0, 0), "", true));
1604 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1605 scheme.addColor(RGBColor(0, 80, 180, 255), 1., TL("selected"));
1606 edgeColorer.addScheme(scheme);
1607 scheme = GUIColorScheme("by purpose (streetwise)", TL("by purpose (streetwise)"), RGBColor(), TL("normal"), true);
1608 scheme.addColor(RGBColor(128, 0, 128, 255), 1., TL("connector")); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_CONNECTOR
1609 scheme.addColor(RGBColor::BLUE, 2., TL("internal")); // see MSEdge::EdgeBasicFunction::EDGEFUNCTION_INTERNAL
1610 edgeColorer.addScheme(scheme);
1611 scheme = GUIColorScheme("by allowed speed (streetwise)", TL("by allowed speed (streetwise)"), RGBColor::RED);
1612 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1613 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1614 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1615 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1616 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1617 edgeColorer.addScheme(scheme);
1618 scheme = GUIColorScheme("by current occupancy (streetwise, brutto)", TL("by current occupancy (streetwise, brutto)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1619 scheme.addColor(RGBColor::RED, 0.95);
1620 edgeColorer.addScheme(scheme);
1621 scheme = GUIColorScheme("by current speed (streetwise)", TL("by current speed (streetwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1622 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1623 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1624 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1625 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1626 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1627 edgeColorer.addScheme(scheme);
1628 scheme = GUIColorScheme("by current flow (streetwise)", TL("by current flow (streetwise)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1629 scheme.addColor(RGBColor::RED, 5000.);
1630 edgeColorer.addScheme(scheme);
1631 scheme = GUIColorScheme("by relative speed (streetwise)", TL("by relative speed (streetwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1632 scheme.addColor(RGBColor::YELLOW, 0.25);
1633 scheme.addColor(RGBColor::GREEN, 0.5);
1634 scheme.addColor(RGBColor::CYAN, 0.75);
1635 scheme.addColor(RGBColor::BLUE, 1.);
1636 scheme.addColor(RGBColor::MAGENTA, 1.25);
1637 edgeColorer.addScheme(scheme);
1638 scheme = GUIColorScheme("by routing device assumed speed", TL("by routing device assumed speed"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1639 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1640 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1641 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1642 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1643 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1644 edgeColorer.addScheme(scheme);
1645 edgeColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1646 scheme = GUIColorScheme("by segments (alternating)", TL("by segments (alternating)"), RGBColor::BLUE, TL("odd"), true);
1647 scheme.addColor(RGBColor::RED, 1., TL("even"));
1648 edgeColorer.addScheme(scheme);
1649 scheme = GUIColorScheme("by jammed state (segmentwise)", TL("by jammed state (segmentwise)"), RGBColor::GREEN, TL("free"), true, 0, COL_SCHEME_DYNAMIC);
1650 scheme.addColor(RGBColor::YELLOW, 1., TL("limitedControl"));
1651 scheme.addColor(RGBColor::RED, 2., TL("jammed"));
1652 edgeColorer.addScheme(scheme);
1653 scheme = GUIColorScheme("by current occupancy (segmentwise, brutto)", TL("by current occupancy (segmentwise, brutto)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1654 scheme.addColor(RGBColor::RED, 0.95);
1655 edgeColorer.addScheme(scheme);
1656 scheme = GUIColorScheme("by current speed (segmentwise)", TL("by current speed (segmentwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1657 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1658 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1659 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1660 scheme.addColor(RGBColor::BLUE, 120 / 3.6);
1661 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1662 edgeColorer.addScheme(scheme);
1663 scheme = GUIColorScheme("by current flow (segmentwise)", TL("by current flow (segmentwise)"), RGBColor::BLUE, "", false, 0, COL_SCHEME_DYNAMIC);
1664 scheme.addColor(RGBColor::RED, 5000.);
1665 edgeColorer.addScheme(scheme);
1666 scheme = GUIColorScheme("by relative speed (segmentwise)", TL("by relative speed (segmentwise)"), RGBColor::RED, "", false, 0, COL_SCHEME_DYNAMIC);
1667 scheme.addColor(RGBColor::YELLOW, 0.25);
1668 scheme.addColor(RGBColor::GREEN, 0.5);
1669 scheme.addColor(RGBColor::CYAN, 0.75);
1670 scheme.addColor(RGBColor::BLUE, 1.);
1671 scheme.addColor(RGBColor::MAGENTA, 1.25);
1672 edgeColorer.addScheme(scheme);
1673 scheme = GUIColorScheme("by insertion-backlog (streetwise)", TL("by insertion-backlog (streetwise)"), RGBColor::GREY, "", false, 0, COL_SCHEME_DYNAMIC);
1674 scheme.addColor(RGBColor::GREEN, 1.);
1675 scheme.addColor(RGBColor::YELLOW, 10.);
1676 scheme.addColor(RGBColor::RED, 100.);
1677 edgeColorer.addScheme(scheme);
1678 scheme = GUIColorScheme("by TAZ (streetwise)", TL("by TAZ (streetwise)"), RGBColor(204, 204, 204), TL("no TAZ"), true);
1679 edgeColorer.addScheme(scheme);
1681 scheme.setAllowsNegativeValues(true);
1682 edgeColorer.addScheme(scheme);
1684 scheme.setAllowsNegativeValues(true);
1685 edgeColorer.addScheme(scheme);
1686
1688 {
1689 edgeScaler.addScheme(GUIScaleScheme(TL("uniform"), 1, "", true));
1690 GUIScaleScheme edgeScheme = GUIScaleScheme(SCHEME_NAME_SELECTION, 0.5, TL("unselected"), true, 0, COL_SCHEME_MISC);
1691 edgeScheme.addColor(5, 1., TL("selected"));
1692 edgeScaler.addScheme(edgeScheme);
1693 edgeScheme = GUIScaleScheme(TL("by allowed speed (streetwise)"), 0);
1694 edgeScheme.addColor(10, 150. / 3.6);
1695 edgeScaler.addScheme(edgeScheme);
1696 edgeScheme = GUIScaleScheme(TL("by current occupancy (streetwise, brutto)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1697 edgeScheme.addColor(10, 0.95);
1698 edgeScaler.addScheme(edgeScheme);
1699 edgeScheme = GUIScaleScheme(TL("by current speed (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1700 edgeScheme.addColor(10, 150. / 3.6);
1701 edgeScaler.addScheme(edgeScheme);
1702 edgeScheme = GUIScaleScheme(TL("by current flow (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1703 edgeScheme.addColor(20, 5000.);
1704 edgeScaler.addScheme(edgeScheme);
1705 edgeScheme = GUIScaleScheme(TL("by relative speed (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1706 edgeScheme.addColor(20, 1.);
1707 edgeScaler.addScheme(edgeScheme);
1708 edgeScheme = GUIScaleScheme(TL("by insertion-backlog (streetwise)"), 0, "", false, 0, COL_SCHEME_DYNAMIC);
1709 edgeScheme.addColor(1, 1.);
1710 edgeScheme.addColor(10, 10.);
1711 edgeScheme.addColor(50, 100.);
1712 edgeScaler.addScheme(edgeScheme);
1713 edgeScheme = GUIScaleScheme(SCHEME_NAME_EDGEDATA_NUMERICAL, 0.1, TL("missing data"), false, MISSING_DATA);
1714 edgeScheme.addColor(1, 1.);
1715 edgeScheme.addColor(2, 10.);
1716 edgeScheme.addColor(5, 100.);
1717 edgeScheme.addColor(10, 1000.);
1718 edgeScaler.addScheme(edgeScheme);
1719 edgeScheme.setAllowsNegativeValues(true);
1720 edgeScaler.addScheme(edgeScheme);
1721 }
1722
1724 {
1725 vehicleScaler.addScheme(GUIScaleScheme(TL("uniform"), 1, "", true));
1726 GUIScaleScheme vehScheme = GUIScaleScheme(SCHEME_NAME_SELECTION, 1, TL("unselected"), true, 0, COL_SCHEME_MISC);
1727 vehScheme.addColor(5, 1., TL("selected"));
1728 vehicleScaler.addScheme(vehScheme);
1729 vehScheme = GUIScaleScheme(TL("by speed"), 1, "", false, 1, COL_SCHEME_DYNAMIC);
1730 vehScheme.addColor(5, 150. / 3.6);
1731 vehScheme.setAllowsNegativeValues(true); // negative speed indicates stopped
1732 vehScheme.addColor(1, -1.); // stopped on road
1733 vehScheme.addColor(0.5, -2.); // stopped off-road (parking)
1734 vehicleScaler.addScheme(vehScheme);
1735 vehScheme = GUIScaleScheme(TL("by waiting time"), 1, "", false, 1, COL_SCHEME_DYNAMIC);
1736 vehScheme.addColor(1, 30.);
1737 vehScheme.addColor(2, 100.);
1738 vehScheme.addColor(4, 200.);
1739 vehScheme.addColor(10, 300.);
1740 vehicleScaler.addScheme(vehScheme);
1741 vehScheme = GUIScaleScheme(TL("by accumulated waiting time"), 1, "", false, 1, COL_SCHEME_DYNAMIC);
1742 vehScheme.addColor(5, 100.);
1743 vehicleScaler.addScheme(vehScheme);
1744 vehScheme = GUIScaleScheme(TL("by max speed"), 1);
1745 vehScheme.addColor(1, 30. / 3.6);
1746 vehScheme.addColor(1, 55. / 3.6);
1747 vehScheme.addColor(1, 80. / 3.6);
1748 vehScheme.addColor(1, 120. / 3.6);
1749 vehScheme.addColor(1, 150. / 3.6);
1750 vehicleScaler.addScheme(vehScheme);
1751 vehScheme = GUIScaleScheme(TL("by reroute number"), 1, "", false, 0, COL_SCHEME_DYNAMIC);
1752 vehScheme.addColor(1, 1.);
1753 vehScheme.addColor(5, 10.);
1754 vehicleScaler.addScheme(vehScheme);
1755 vehScheme = GUIScaleScheme(TL("by offset from best lane"), 0.8, "0", false, 0, COL_SCHEME_DYNAMIC);
1756 vehScheme.addColor(5, -100, TL("opposite lane"));
1757 vehScheme.addColor(3, -3, "-3");
1758 vehScheme.addColor(1.5, -1, "-1");
1759 vehScheme.addColor(1.5, 1, "1");
1760 vehScheme.addColor(3, 3, "3");
1761 vehScheme.setAllowsNegativeValues(true);
1762 vehicleScaler.addScheme(vehScheme);
1763 vehScheme = GUIScaleScheme(TL("by acceleration"), 0.8, "0", false, 0, COL_SCHEME_DYNAMIC);
1764 vehScheme.addColor(4, -9.0);
1765 vehScheme.addColor(2, -4.5 /* -SUMOVTypeParameter::getDefaultDecel() */);
1766 vehScheme.addColor(1, -0.1);
1767 vehScheme.addColor(1, 0.1);
1768 vehScheme.addColor(1, 2.6 /* SUMOVTypeParameter::getDefaultAccel() */);
1769 vehScheme.addColor(3, 5.2);
1770 vehScheme.setAllowsNegativeValues(true);
1771 vehicleScaler.addScheme(vehScheme);
1772 vehScheme = GUIScaleScheme(TL("by time gap on lane"), 5, "0", false, 0, COL_SCHEME_DYNAMIC);
1773 vehScheme.addColor(1, -1);
1774 vehScheme.addColor(1, 1);
1775 vehScheme.addColor(0.5, 2);
1776 vehScheme.setAllowsNegativeValues(true);
1777 vehicleScaler.addScheme(vehScheme);
1778 vehScheme = GUIScaleScheme(TL("by depart delay"), 0.8);
1779 vehScheme.addColor(1, 10.);
1780 vehScheme.addColor(2, 100.);
1781 vehScheme.addColor(3, 200.);
1782 vehScheme.addColor(5, 300.);
1783 vehicleScaler.addScheme(vehScheme);
1784 vehScheme = GUIScaleScheme(TL("by time loss"), 1, "", false, 0, COL_SCHEME_DYNAMIC);
1785 vehScheme.addColor(1, 10.);
1786 vehScheme.addColor(2, 60.);
1787 vehScheme.addColor(3, 180.);
1788 vehScheme.addColor(10, 900.);
1789 vehicleScaler.addScheme(vehScheme);
1790 vehScheme = GUIScaleScheme(TL("by stop delay"), 0.1, "", false, -1, COL_SCHEME_DYNAMIC);
1791 vehScheme.addColor(1, 0.);
1792 vehScheme.addColor(2, 10.);
1793 vehScheme.addColor(3, 60.);
1794 vehScheme.addColor(4, 120.);
1795 vehScheme.addColor(5, 300.);
1796 vehScheme.addColor(10, 900.);
1797 vehScheme.setAllowsNegativeValues(true);
1798 vehicleScaler.addScheme(vehScheme);
1799 vehScheme = GUIScaleScheme(TL("by stop arrival delay"), 0.1, "", false, INVALID_DOUBLE, COL_SCHEME_DYNAMIC);
1800 vehScheme.addColor(0.5, -10.);
1801 vehScheme.addColor(1, 0.);
1802 vehScheme.addColor(2, 10.);
1803 vehScheme.addColor(3, 60.);
1804 vehScheme.addColor(4, 120.);
1805 vehScheme.addColor(5, 300.);
1806 vehScheme.addColor(10, 900.);
1807 vehScheme.setAllowsNegativeValues(true);
1808 vehicleScaler.addScheme(vehScheme);
1810 vehScheme.setAllowsNegativeValues(true);
1811 vehicleScaler.addScheme(vehScheme);
1812 }
1813}
1814
1815
1816void
1818 // init color schemes
1819 GUIColorScheme scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor::BLACK, TL("road"), true);
1820 scheme.addColor(RGBColor::GREY, 1, TL("sidewalk"));
1821 scheme.addColor(RGBColor(192, 66, 44), 2, TL("bike lane"));
1822 scheme.addColor(RGBColor(200, 255, 200), 3, TL("green verge"));
1823 scheme.addColor(RGBColor(150, 200, 200), 4, TL("waterway"));
1824 scheme.addColor(RGBColor::BLACK, 5, TL("railway"));
1825 scheme.addColor(RGBColor(64, 0, 64), 6, TL("rails on road"));
1826 scheme.addColor(RGBColor(92, 92, 92), 7, TL("no passenger")); // paths, service roads etc
1827 scheme.addColor(RGBColor::RED, 8, TL("closed")); // road closing
1828 scheme.addColor(RGBColor::GREEN, 9, TL("connector")); // macro-connector
1829 scheme.addColor(RGBColor::ORANGE, 10, TL("forbidden")); // forbidden road
1830 scheme.addColor(RGBColor(145, 145, 145), 11, TL("data mode"));
1831 scheme.addColor(RGBColor(200, 240, 240), 12, TL("airway"));
1832 laneColorer.addScheme(scheme);
1833 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1834 scheme.addColor(RGBColor(0, 80, 180, 255), 1., TL("selected"));
1835 laneColorer.addScheme(scheme);
1836 scheme = GUIColorScheme("by permission code", TL("by permission code"), RGBColor(240, 240, 240), "nobody");
1837 scheme.addColor(RGBColor(10, 10, 10), (double)SVC_PASSENGER, "passenger");
1838 scheme.addColor(RGBColor(128, 128, 128), (double)SVC_PEDESTRIAN, "pedestrian");
1839 scheme.addColor(RGBColor(80, 80, 80), (double)(SVC_PEDESTRIAN | SVC_DELIVERY), "pedestrian_delivery");
1840 scheme.addColor(RGBColor(192, 66, 44), (double)SVC_BICYCLE, "bicycle");
1841 scheme.addColor(RGBColor(40, 100, 40), (double)SVC_BUS, "bus");
1842 scheme.addColor(RGBColor(166, 147, 26), (double)SVC_TAXI, "taxi");
1843 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~SVC_NON_ROAD), "normal_road");
1844 scheme.addColor(RGBColor::BLACK, (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_NON_ROAD)), "disallow_pedestrian");
1845 scheme.addColor(RGBColor(255, 206, 0), (double)(SVCAll & ~(SVC_PEDESTRIAN | SVC_BICYCLE | SVC_MOPED | SVC_NON_ROAD)), "motorway");
1846 scheme.addColor(RGBColor(150, 200, 200), (double)SVC_SHIP, "waterway");
1847 scheme.addColor(RGBColor::GREEN, (double)SVCAll, "all");
1848 laneColorer.addScheme(scheme);
1849
1850 scheme = GUIColorScheme("by allowed speed (lanewise)", RGBColor::RED);
1851 scheme.addColor(RGBColor::YELLOW, 30. / 3.6);
1852 scheme.addColor(RGBColor::GREEN, 55. / 3.6);
1853 scheme.addColor(RGBColor::CYAN, 80. / 3.6);
1854 scheme.addColor(RGBColor::BLUE, 120. / 3.6);
1855 scheme.addColor(RGBColor::MAGENTA, 150. / 3.6);
1856 laneColorer.addScheme(scheme);
1857
1858 scheme = GUIColorScheme("by lane number (streetwise)", RGBColor::RED);
1859 scheme.addColor(RGBColor::BLUE, 5.);
1860 laneColorer.addScheme(scheme);
1861
1862 scheme = GUIColorScheme("by given length/geometrical length", RGBColor::RED);
1863 scheme.addColor(RGBColor::ORANGE, 0.25);
1864 scheme.addColor(RGBColor::YELLOW, 0.5);
1865 scheme.addColor(RGBColor(179, 179, 179, 255), 1.);
1866 scheme.addColor(RGBColor::GREEN, 2.);
1867 scheme.addColor(RGBColor::CYAN, 4.);
1868 scheme.addColor(RGBColor::BLUE, 100.);
1869 laneColorer.addScheme(scheme);
1870 laneColorer.addScheme(GUIColorScheme("by angle", TL("by angle"), RGBColor::YELLOW, "", true));
1871
1872 scheme = GUIColorScheme("by priority", TL("by priority"), RGBColor::YELLOW);
1873 scheme.addColor(RGBColor::RED, -20.);
1874 scheme.addColor(RGBColor::GREEN, 20.);
1875 scheme.setAllowsNegativeValues(true);
1876 laneColorer.addScheme(scheme);
1877 scheme = GUIColorScheme("by height at start", TL("by height at start"), RGBColor::RED);
1878 scheme.addColor(RGBColor::BLUE, -10.);
1879 scheme.addColor(RGBColor::YELLOW, 50.);
1880 scheme.addColor(RGBColor::GREEN, 100.);
1881 scheme.addColor(RGBColor::MAGENTA, 200.);
1882 scheme.setAllowsNegativeValues(true);
1883 laneColorer.addScheme(scheme);
1884 scheme = GUIColorScheme("by height at segment start", TL("by height at segment start"), RGBColor::RED);
1885 scheme.addColor(RGBColor::BLUE, -10.);
1886 scheme.addColor(RGBColor::YELLOW, 50.);
1887 scheme.addColor(RGBColor::GREEN, 100.);
1888 scheme.addColor(RGBColor::MAGENTA, 200.);
1889 scheme.setAllowsNegativeValues(true);
1890 laneColorer.addScheme(scheme);
1891 scheme = GUIColorScheme("by inclination", TL("by inclination"), RGBColor::GREY);
1892 scheme.addColor(RGBColor::YELLOW, 0.1);
1893 scheme.addColor(RGBColor::RED, 0.3);
1894 scheme.addColor(RGBColor::GREEN, -0.1);
1895 scheme.addColor(RGBColor::BLUE, -0.3);
1896 scheme.setAllowsNegativeValues(true);
1897 laneColorer.addScheme(scheme);
1898 scheme = GUIColorScheme("by segment inclination", TL("by segment inclination"), RGBColor::GREY);
1899 scheme.addColor(RGBColor::YELLOW, 0.1);
1900 scheme.addColor(RGBColor::RED, 0.3);
1901 scheme.addColor(RGBColor::GREEN, -0.1);
1902 scheme.addColor(RGBColor::BLUE, -0.3);
1903 scheme.setAllowsNegativeValues(true);
1904 laneColorer.addScheme(scheme);
1906 scheme.setAllowsNegativeValues(true);
1907 laneColorer.addScheme(scheme);
1909 scheme.setAllowsNegativeValues(true);
1910 laneColorer.addScheme(scheme);
1911 scheme = GUIColorScheme("by distance (kilometrage)", RGBColor(204, 204, 204));
1912 scheme.addColor(RGBColor::RED, 1.);
1913 scheme.addColor(RGBColor::RED, -1.);
1914 scheme.setAllowsNegativeValues(true);
1915 laneColorer.addScheme(scheme);
1916 scheme = GUIColorScheme("by abs distance (kilometrage)", RGBColor(204, 204, 204));
1917 scheme.addColor(RGBColor::RED, 1.);
1918 scheme.setAllowsNegativeValues(false);
1919 laneColorer.addScheme(scheme);
1921 scheme.setAllowsNegativeValues(true);
1922 laneColorer.addScheme(scheme);
1923
1924 scheme = GUIColorScheme("uniform", TL("uniform"), RGBColor(102, 0, 0), "", true);
1925 scheme.addColor(RGBColor(204, 0, 0), 1, TL("junction bubble"));
1926 scheme.addColor(RGBColor(230, 100, 115), 2, TL("geometry points"));
1927 scheme.addColor(GUIVisualizationColorSettings::SUMO_color_DEADEND_SHOW, 3, TL("connections missing"));
1928 scheme.addColor(RGBColor::GREEN, 3, TL("custom shape"));
1929 scheme.addColor(RGBColor(205, 180, 180), 4, TL("data mode"));
1930 junctionColorer.addScheme(scheme);
1931 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1932 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
1933 junctionColorer.addScheme(scheme);
1934 scheme = GUIColorScheme(SCHEME_NAME_TYPE, RGBColor::GREEN, "traffic_light", true);
1935 scheme.addColor(RGBColor(0, 128, 0), 1, "traffic_light_unregulated");
1936 scheme.addColor(RGBColor::YELLOW, 2, "priority");
1937 scheme.addColor(RGBColor::RED, 3, "priority_stop");
1938 scheme.addColor(RGBColor::BLUE, 4, "right_before_left");
1939 scheme.addColor(RGBColor::CYAN, 5, "allway_stop");
1940 scheme.addColor(RGBColor::GREY, 6, "district");
1941 scheme.addColor(RGBColor::MAGENTA, 7, "unregulated");
1942 scheme.addColor(RGBColor::BLACK, 8, "dead_end");
1943 scheme.addColor(RGBColor::ORANGE, 9, "rail_signal");
1944 scheme.addColor(RGBColor(172, 108, 44), 10, "zipper"); // brown, darker than the zipper link rule
1945 scheme.addColor(RGBColor(192, 255, 192), 11, "traffic_light_right_on_red");
1946 scheme.addColor(RGBColor(128, 0, 128), 12, "rail_crossing"); // dark purple
1947 scheme.addColor(RGBColor(0, 0, 128), 13, "left_before_right"); // dark blue
1948 junctionColorer.addScheme(scheme);
1949 scheme = GUIColorScheme("by height", TL("by height"), RGBColor::GREY);
1950 scheme.addColor(RGBColor::BLUE, -10.);
1951 scheme.addColor(RGBColor::RED, 10.);
1952 scheme.addColor(RGBColor::YELLOW, 50.);
1953 scheme.addColor(RGBColor::GREEN, 100.);
1954 scheme.addColor(RGBColor::MAGENTA, 200.);
1955 scheme.setAllowsNegativeValues(true);
1956 junctionColorer.addScheme(scheme);
1957
1959 poiColorer.addScheme(GUIColorScheme("given POI color", TL("given POI color"), RGBColor::RED, "", true));
1960 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1961 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1962 poiColorer.addScheme(scheme);
1963 poiColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::RED, "", true));
1964
1966 polyColorer.addScheme(GUIColorScheme("given polygon color", TL("given polygon color"), RGBColor::ORANGE, "", true));
1967 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(179, 179, 179, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1968 scheme.addColor(RGBColor(0, 102, 204, 255), 1, TL("selected"));
1969 polyColorer.addScheme(scheme);
1970 polyColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::ORANGE, "", true));
1971 polyColorer.addScheme(GUIColorScheme("random", TL("random"), RGBColor::YELLOW, "", true));
1972
1974 {
1975 GUIScaleScheme edgeScheme = GUIScaleScheme(TL("default"), 1, TL("uniform"), true);
1976 laneScaler.addScheme(edgeScheme);
1977 }
1978
1980 dataColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::ORANGE, "", true));
1981 scheme = GUIColorScheme(SCHEME_NAME_SELECTION, RGBColor(128, 128, 128, 255), TL("unselected"), true, 0, COL_SCHEME_MISC);
1982 scheme.addColor(RGBColor(0, 80, 180, 255), 1, TL("selected"));
1983 dataColorer.addScheme(scheme);
1984 dataColorer.addScheme(GUIColorScheme("by origin taz", TL("by origin taz"), RGBColor::ORANGE, "", true));
1985 dataColorer.addScheme(GUIColorScheme("by destination taz", TL("by destination taz"), RGBColor::ORANGE, "", true));
1987 scheme.setAllowsNegativeValues(true);
1988 dataColorer.addScheme(scheme);
1989
1990 // dummy schemes
1991 vehicleColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1992 personColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1993 containerColorer.addScheme(GUIColorScheme("uniform", TL("uniform"), RGBColor::YELLOW, "", true));
1994 vehicleScaler.addScheme(GUIScaleScheme(TL("uniform"), 1, "", true));
1995}
1996
1997
1998int
2000 if (UseMesoSim) {
2001 return edgeColorer.getActive();
2002 }
2003 return laneColorer.getActive();
2004}
2005
2006
2007int
2009 if (UseMesoSim) {
2010 return edgeScaler.getActive();
2011 }
2012 return laneScaler.getActive();
2013}
2014
2015
2023
2024
2032
2033
2034void
2039 dev.writeAttr("dither", dither);
2040 dev.writeAttr("fps", fps);
2041 dev.writeAttr("trueZ", trueZ);
2042 dev.writeAttr("drawBoundaries", drawBoundaries);
2043 dev.writeAttr("disableDottedContours", disableDottedContours);
2044 dev.writeAttr("forceDrawRectangleSelection", forceDrawForRectangleSelection);
2045 geometryIndices.print(dev, "geometryIndices");
2046 dev.closeTag();
2048 dev.writeAttr("backgroundColor", backgroundColor);
2049 dev.writeAttr("showGrid", showGrid);
2050 dev.writeAttr("gridXSize", gridXSize);
2051 dev.writeAttr("gridYSize", gridYSize);
2052 dev.closeTag();
2053 // edges
2055 dev.writeAttr("laneEdgeMode", getLaneEdgeMode());
2056 dev.writeAttr("scaleMode", getLaneEdgeScaleMode());
2057 dev.writeAttr("laneShowBorders", laneShowBorders);
2058 dev.writeAttr("showBikeMarkings", showBikeMarkings);
2059 dev.writeAttr("showLinkDecals", showLinkDecals);
2060 dev.writeAttr("realisticLinkRules", realisticLinkRules);
2061 dev.writeAttr("showLinkRules", showLinkRules);
2062 dev.writeAttr("showRails", showRails);
2063 dev.writeAttr("secondaryShape", secondaryShape);
2064 dev.writeAttr("hideConnectors", hideConnectors);
2065 dev.writeAttr("widthExaggeration", laneWidthExaggeration);
2066 dev.writeAttr("minSize", laneMinSize);
2067 dev.writeAttr("showDirection", showLaneDirection);
2068 dev.writeAttr("showSublanes", showSublanes);
2069 dev.writeAttr("spreadSuperposed", spreadSuperposed);
2070 dev.writeAttr("disableHideByZoom", disableHideByZoom);
2071 dev.writeAttr("edgeParam", edgeParam);
2072 dev.writeAttr("laneParam", laneParam);
2073 dev.writeAttr("vehicleParam", vehicleParam);
2074 dev.writeAttr("vehicleScaleParam", vehicleScaleParam);
2075 dev.writeAttr("vehicleTextParam", vehicleTextParam);
2076 dev.writeAttr("edgeData", edgeData);
2077 dev.writeAttr("edgeDataID", edgeDataID);
2078 dev.writeAttr("edgeDataScaling", edgeDataScaling);
2079 edgeValueRainBow.print(dev, "edgeValue");
2080 dev.lf();
2081 dev << " ";
2082 edgeName.print(dev, "edgeName");
2083 dev.lf();
2084 dev << " ";
2085 internalEdgeName.print(dev, "internalEdgeName");
2086 dev.lf();
2087 dev << " ";
2088 cwaEdgeName.print(dev, "cwaEdgeName");
2089 dev.lf();
2090 dev << " ";
2091 streetName.print(dev, "streetName");
2092 dev.lf();
2093 dev << " ";
2094 edgeValue.print(dev, "edgeValue");
2095 edgeScaleValue.print(dev, "edgeScaleValue");
2096 laneColorer.save(dev);
2097 laneScaler.save(dev);
2098 edgeColorer.save(dev, "meso:");
2099 edgeScaler.save(dev);
2100 dev.closeTag();
2101 // vehicles
2103 dev.writeAttr("vehicleMode", vehicleColorer.getActive());
2104 dev.writeAttr("vehicleScaleMode", vehicleScaler.getActive());
2105 dev.writeAttr("vehicleQuality", vehicleQuality);
2106 vehicleSize.print(dev, "vehicle");
2107 dev.writeAttr("showBlinker", showBlinker);
2108 dev.writeAttr("drawMinGap", drawMinGap);
2109 dev.writeAttr("drawBrakeGap", drawBrakeGap);
2110 dev.writeAttr("showBTRange", showBTRange);
2111 dev.writeAttr("showRouteIndex", showRouteIndex);
2112 dev.writeAttr("scaleLength", scaleLength);
2113 dev.writeAttr("drawReversed", drawReversed);
2114 dev.writeAttr("showParkingInfo", showParkingInfo);
2115 dev.writeAttr("showChargingInfo", showChargingInfo);
2116 dev.lf();
2117 dev << " ";
2118 vehicleName.print(dev, "vehicleName");
2119 dev.lf();
2120 dev << " ";
2121 vehicleValue.print(dev, "vehicleValue");
2122 dev.lf();
2123 dev << " ";
2124 vehicleScaleValue.print(dev, "vehicleScaleValue");
2125 dev.lf();
2126 dev << " ";
2127 vehicleText.print(dev, "vehicleText");
2128 vehicleColorer.save(dev);
2129 vehicleScaler.save(dev);
2130 dev.closeTag();
2131 // persons
2133 dev.writeAttr("personMode", personColorer.getActive());
2134 dev.writeAttr("personQuality", personQuality);
2135 dev.writeAttr("showPedestrianNetwork", showPedestrianNetwork);
2136 dev.writeAttr("pedestrianNetworkColor", pedestrianNetworkColor);
2137 personSize.print(dev, "person");
2138 dev.lf();
2139 dev << " ";
2140 personName.print(dev, "personName");
2141 dev.lf();
2142 dev << " ";
2143 personValue.print(dev, "personValue");
2144 personColorer.save(dev);
2145 dev.closeTag();
2146 // containers
2148 dev.writeAttr("containerMode", containerColorer.getActive());
2149 dev.writeAttr("containerQuality", containerQuality);
2150 containerSize.print(dev, "container");
2151 dev.lf();
2152 dev << " ";
2153 containerName.print(dev, "containerName");
2155 dev.closeTag();
2156 // junctions
2158 dev.writeAttr("junctionMode", junctionColorer.getActive());
2159 dev.lf();
2160 dev << " ";
2161 drawLinkTLIndex.print(dev, "drawLinkTLIndex");
2162 dev.lf();
2163 dev << " ";
2164 drawLinkJunctionIndex.print(dev, "drawLinkJunctionIndex");
2165 dev.lf();
2166 dev << " ";
2167 junctionID.print(dev, "junctionID");
2168 dev.lf();
2169 dev << " ";
2170 junctionName.print(dev, "junctionName");
2171 dev.lf();
2172 dev << " ";
2173 internalJunctionName.print(dev, "internalJunctionName");
2174 dev.lf();
2175 dev << " ";
2176 tlsPhaseIndex.print(dev, "tlsPhaseIndex");
2177 tlsPhaseName.print(dev, "tlsPhaseName");
2178 dev.lf();
2179 dev << " ";
2180 dev.writeAttr("showLane2Lane", showLane2Lane);
2181 dev.writeAttr("drawShape", drawJunctionShape);
2182 dev.writeAttr("drawCrossingsAndWalkingareas", drawCrossingsAndWalkingareas);
2183 junctionSize.print(dev, "junction");
2184 junctionValueRainBow.print(dev, "junctionValue");
2185 junctionColorer.save(dev);
2186 dev.closeTag();
2187 // additionals
2189 dev.writeAttr("addMode", addMode);
2190 addSize.print(dev, "add");
2191 addName.print(dev, "addName");
2192 addFullName.print(dev, "addFullName");
2193 // temporal (will be integrated in a schema)
2194 dev.writeAttr("busStopColor", colorSettings.busStopColor);
2195 dev.writeAttr("busStopColorSign", colorSettings.busStopColorSign);
2196 dev.writeAttr("chargingStationColor", colorSettings.chargingStationColor);
2197 dev.writeAttr("chargingStationColorCharge", colorSettings.chargingStationColorCharge);
2198 dev.writeAttr("chargingStationColorSign", colorSettings.chargingStationColorSign);
2199 dev.writeAttr("containerStopColor", colorSettings.containerStopColor);
2200 dev.writeAttr("containerStopColorSign", colorSettings.containerStopColorSign);
2201 dev.writeAttr("parkingAreaColor", colorSettings.parkingAreaColor);
2202 dev.writeAttr("parkingAreaColorSign", colorSettings.parkingAreaColorSign);
2203 dev.writeAttr("parkingSpaceColor", colorSettings.parkingSpaceColor);
2204 dev.writeAttr("parkingSpaceColorContour", colorSettings.parkingSpaceColorContour);
2205 dev.writeAttr("personTripColor", colorSettings.personTripColor);
2206 dev.writeAttr("personTripWidth", widthSettings.personTripWidth);
2207 dev.writeAttr("rideColor", colorSettings.rideColor);
2208 dev.writeAttr("rideWidth", widthSettings.rideWidth);
2209 dev.writeAttr("selectedAdditionalColor", colorSettings.selectedAdditionalColor);
2210 dev.writeAttr("selectedConnectionColor", colorSettings.selectedConnectionColor);
2211 dev.writeAttr("selectedContainerColor", colorSettings.selectedContainerColor);
2212 dev.writeAttr("selectedContainerPlanColor", colorSettings.selectedContainerPlanColor);
2213 dev.writeAttr("selectedCrossingColor", colorSettings.selectedCrossingColor);
2214 dev.writeAttr("selectedEdgeColor", colorSettings.selectedEdgeColor);
2215 dev.writeAttr("selectedEdgeDataColor", colorSettings.selectedEdgeDataColor);
2216 dev.writeAttr("selectedLaneColor", colorSettings.selectedLaneColor);
2217 dev.writeAttr("selectedPersonColor", colorSettings.selectedPersonColor);
2218 dev.writeAttr("selectedPersonPlanColor", colorSettings.selectedPersonPlanColor);
2219 dev.writeAttr("selectedProhibitionColor", colorSettings.selectedProhibitionColor);
2220 dev.writeAttr("selectedRouteColor", colorSettings.selectedRouteColor);
2221 dev.writeAttr("selectedVehicleColor", colorSettings.selectedVehicleColor);
2222 dev.writeAttr("selectionColor", colorSettings.selectionColor);
2223 dev.writeAttr("stopColor", colorSettings.stopColor);
2224 dev.writeAttr("waypointColor", colorSettings.waypointColor);
2225 dev.writeAttr("stopContainerColor", colorSettings.stopContainerColor);
2226 dev.writeAttr("stopPersonColor", colorSettings.stopPersonColor);
2227 dev.writeAttr("trainStopColor", colorSettings.trainStopColor);
2228 dev.writeAttr("trainStopColorSign", colorSettings.trainStopColorSign);
2229 dev.writeAttr("transhipColor", colorSettings.transhipColor);
2230 dev.writeAttr("transhipWidth", widthSettings.transhipWidth);
2231 dev.writeAttr("transportColor", colorSettings.transportColor);
2232 dev.writeAttr("transportWidth", widthSettings.transportWidth);
2233 dev.writeAttr("tripWidth", widthSettings.tripWidth);
2234 dev.writeAttr("vehicleTripColor", colorSettings.personTripColor);
2235 dev.writeAttr("walkColor", colorSettings.walkColor);
2236 dev.writeAttr("walkWidth", widthSettings.walkWidth);
2237 dev.closeTag();
2238 // pois
2240 dev.writeAttr("poiTextParam", poiTextParam);
2241 poiSize.print(dev, "poi");
2242 dev.writeAttr("poiDetail", poiDetail);
2243 poiName.print(dev, "poiName");
2244 poiType.print(dev, "poiType");
2245 poiText.print(dev, "poiText");
2246 dev.writeAttr("poiUseCustomLayer", poiUseCustomLayer);
2247 dev.writeAttr("poiCustomLayer", poiCustomLayer);
2248 poiColorer.save(dev);
2249 dev.closeTag();
2250 // polys
2252 polySize.print(dev, "poly");
2253 polyName.print(dev, "polyName");
2254 polyType.print(dev, "polyType");
2255 dev.writeAttr("polyUseCustomLayer", polyUseCustomLayer);
2256 dev.writeAttr("polyCustomLayer", polyCustomLayer);
2257 polyColorer.save(dev);
2258 dev.closeTag();
2259 // 3D
2261 dev.writeAttr("show3DTLSLinkMarkers", show3DTLSLinkMarkers);
2262 dev.writeAttr("show3DTLSDomes", show3DTLSDomes);
2263 dev.writeAttr("show3DHeadUpDisplay", show3DHeadUpDisplay);
2264 dev.writeAttr("generate3DTLSModels", generate3DTLSModels);
2265 dev.writeAttr("ambient3DLight", ambient3DLight);
2266 dev.writeAttr("diffuse3DLight", diffuse3DLight);
2267 dev.closeTag();
2268 // legend
2270 dev.writeAttr("showSizeLegend", showSizeLegend);
2271 dev.writeAttr("showColorLegend", showColorLegend);
2272 dev.writeAttr("showVehicleColorLegend", showVehicleColorLegend);
2273 dev.closeTag();
2274
2275 dev.closeTag();
2276}
2277
2278
2279bool
2281 if (show3DTLSDomes != v2.show3DTLSDomes) {
2282 return false;
2283 }
2285 return false;
2286 }
2288 return false;
2289 }
2291 return false;
2292 }
2293 if (ambient3DLight != v2.ambient3DLight) {
2294 return false;
2295 }
2296 if (diffuse3DLight != v2.diffuse3DLight) {
2297 return false;
2298 }
2299 if (skyColor != v2.skyColor) {
2300 return false;
2301 }
2302 if (dither != v2.dither) {
2303 return false;
2304 }
2305 if (fps != v2.fps) {
2306 return false;
2307 }
2308 if (trueZ != v2.trueZ) {
2309 return false;
2310 }
2311 if (drawBoundaries != v2.drawBoundaries) {
2312 return false;
2313 }
2315 return false;
2316 }
2318 return false;
2319 }
2320 if (geometryIndices != v2.geometryIndices) {
2321 return false;
2322 }
2323 if (backgroundColor != v2.backgroundColor) {
2324 return false;
2325 }
2326 if (colorSettings != v2.colorSettings) {
2327 return false;
2328 }
2329 if (showGrid != v2.showGrid) {
2330 return false;
2331 }
2332 if (gridXSize != v2.gridXSize) {
2333 return false;
2334 }
2335 if (gridYSize != v2.gridYSize) {
2336 return false;
2337 }
2338
2339 if (!(edgeColorer == v2.edgeColorer)) {
2340 return false;
2341 }
2342 if (!(edgeScaler == v2.edgeScaler)) {
2343 return false;
2344 }
2345 if (!(laneColorer == v2.laneColorer)) {
2346 return false;
2347 }
2348 if (!(laneScaler == v2.laneScaler)) {
2349 return false;
2350 }
2351 if (laneShowBorders != v2.laneShowBorders) {
2352 return false;
2353 }
2355 return false;
2356 }
2357 if (showLinkDecals != v2.showLinkDecals) {
2358 return false;
2359 }
2361 return false;
2362 }
2363 if (showLinkRules != v2.showLinkRules) {
2364 return false;
2365 }
2366 if (showRails != v2.showRails) {
2367 return false;
2368 }
2369 if (secondaryShape != v2.secondaryShape) {
2370 return false;
2371 }
2372 if (edgeName != v2.edgeName) {
2373 return false;
2374 }
2376 return false;
2377 }
2378 if (cwaEdgeName != v2.cwaEdgeName) {
2379 return false;
2380 }
2381 if (streetName != v2.streetName) {
2382 return false;
2383 }
2384 if (edgeValue != v2.edgeValue) {
2385 return false;
2386 }
2387 if (edgeScaleValue != v2.edgeScaleValue) {
2388 return false;
2389 }
2390 if (hideConnectors != v2.hideConnectors) {
2391 return false;
2392 }
2394 return false;
2395 }
2396 if (laneMinSize != v2.laneMinSize) {
2397 return false;
2398 }
2400 return false;
2401 }
2402 if (showSublanes != v2.showSublanes) {
2403 return false;
2404 }
2406 return false;
2407 }
2409 return false;
2410 }
2411 if (edgeParam != v2.edgeParam) {
2412 return false;
2413 }
2414 if (laneParam != v2.laneParam) {
2415 return false;
2416 }
2417 if (vehicleParam != v2.vehicleParam) {
2418 return false;
2419 }
2421 return false;
2422 }
2424 return false;
2425 }
2426 if (edgeData != v2.edgeData) {
2427 return false;
2428 }
2429 if (edgeDataID != v2.edgeDataID) {
2430 return false;
2431 }
2432 if (edgeDataScaling != v2.edgeDataScaling) {
2433 return false;
2434 }
2436 return false;
2437 }
2438 if (!(vehicleColorer == v2.vehicleColorer)) {
2439 return false;
2440 }
2441 if (!(vehicleScaler == v2.vehicleScaler)) {
2442 return false;
2443 }
2444 if (vehicleQuality != v2.vehicleQuality) {
2445 return false;
2446 }
2447 if (vehicleSize != v2.vehicleSize) {
2448 return false;
2449 }
2450 if (showBlinker != v2.showBlinker) {
2451 return false;
2452 }
2454 return false;
2455 }
2456 if (drawMinGap != v2.drawMinGap) {
2457 return false;
2458 }
2459 if (drawBrakeGap != v2.drawBrakeGap) {
2460 return false;
2461 }
2462 if (showBTRange != v2.showBTRange) {
2463 return false;
2464 }
2465 if (showRouteIndex != v2.showRouteIndex) {
2466 return false;
2467 }
2468 if (scaleLength != v2.scaleLength) {
2469 return false;
2470 }
2471 if (drawReversed != v2.drawReversed) {
2472 return false;
2473 }
2474 if (showParkingInfo != v2.showParkingInfo) {
2475 return false;
2476 }
2478 return false;
2479 }
2480 if (vehicleName != v2.vehicleName) {
2481 return false;
2482 }
2483 if (vehicleValue != v2.vehicleValue) {
2484 return false;
2485 }
2487 return false;
2488 }
2489 if (vehicleText != v2.vehicleText) {
2490 return false;
2491 }
2492 if (!(personColorer == v2.personColorer)) {
2493 return false;
2494 }
2495 if (personQuality != v2.personQuality) {
2496 return false;
2497 }
2498 if (personSize != v2.personSize) {
2499 return false;
2500 }
2501 if (personName != v2.personName) {
2502 return false;
2503 }
2504 if (personValue != v2.personValue) {
2505 return false;
2506 }
2508 return false;
2509 }
2511 return false;
2512 }
2513 if (!(containerColorer == v2.containerColorer)) {
2514 return false;
2515 }
2517 return false;
2518 }
2519 if (containerSize != v2.containerSize) {
2520 return false;
2521 }
2522 if (containerName != v2.containerName) {
2523 return false;
2524 }
2525 if (!(junctionColorer == v2.junctionColorer)) {
2526 return false;
2527 }
2528 if (!(poiColorer == v2.poiColorer)) {
2529 return false;
2530 }
2531 if (!(polyColorer == v2.polyColorer)) {
2532 return false;
2533 }
2534 if (drawLinkTLIndex != v2.drawLinkTLIndex) {
2535 return false;
2536 }
2538 return false;
2539 }
2540 if (junctionID != v2.junctionID) {
2541 return false;
2542 }
2543 if (junctionName != v2.junctionName) {
2544 return false;
2545 }
2547 return false;
2548 }
2549 if (tlsPhaseIndex != v2.tlsPhaseIndex) {
2550 return false;
2551 }
2552 if (tlsPhaseName != v2.tlsPhaseName) {
2553 return false;
2554 }
2555
2556 if (showLane2Lane != v2.showLane2Lane) {
2557 return false;
2558 }
2559
2561 return false;
2562 }
2563
2565 return false;
2566 }
2567 if (junctionSize != v2.junctionSize) {
2568 return false;
2569 }
2571 return false;
2572 }
2573
2574 if (addMode != v2.addMode) {
2575 return false;
2576 }
2577 if (addSize != v2.addSize) {
2578 return false;
2579 }
2580 if (addName != v2.addName) {
2581 return false;
2582 }
2583 if (addFullName != v2.addFullName) {
2584 return false;
2585 }
2586 if (poiSize != v2.poiSize) {
2587 return false;
2588 }
2589 if (poiDetail != v2.poiDetail) {
2590 return false;
2591 }
2592 if (poiName != v2.poiName) {
2593 return false;
2594 }
2595 if (poiType != v2.poiType) {
2596 return false;
2597 }
2598 if (poiText != v2.poiText) {
2599 return false;
2600 }
2601 if (poiTextParam != v2.poiTextParam) {
2602 return false;
2603 }
2605 return false;
2606 }
2607 if (poiCustomLayer != v2.poiCustomLayer) {
2608 return false;
2609 }
2610 if (polySize != v2.polySize) {
2611 return false;
2612 }
2613 if (polyName != v2.polyName) {
2614 return false;
2615 }
2616 if (polyType != v2.polyType) {
2617 return false;
2618 }
2620 return false;
2621 }
2622 if (polyCustomLayer != v2.polyCustomLayer) {
2623 return false;
2624 }
2625
2626 if (showSizeLegend != v2.showSizeLegend) {
2627 return false;
2628 }
2629 if (showColorLegend != v2.showColorLegend) {
2630 return false;
2631 }
2633 return false;
2634 }
2635 if (!(dataColorer == v2.dataColorer)) {
2636 return false;
2637 }
2638 if (!(dataValue == v2.dataValue)) {
2639 return false;
2640 }
2642 return false;
2643 }
2645 return false;
2646 }
2647 if (!(relDataAttr == v2.relDataAttr)) {
2648 return false;
2649 }
2650 if (!(dataValueRainBow == v2.dataValueRainBow)) {
2651 return false;
2652 }
2653
2654 return true;
2655}
2656
2657
2658const RGBColor&
2660 switch (ls) {
2665 case LINKSTATE_TL_RED:
2666 return SUMO_color_TL_RED;
2677 case LINKSTATE_MAJOR:
2678 return realistic ? RGBColor::INVISIBLE : SUMO_color_MAJOR;
2679 case LINKSTATE_MINOR:
2680 return realistic ? SUMO_color_MAJOR : SUMO_color_MINOR;
2681 case LINKSTATE_EQUAL:
2682 return SUMO_color_EQUAL;
2683 case LINKSTATE_STOP:
2684 return realistic ? SUMO_color_MAJOR : SUMO_color_STOP;
2686 return realistic ? SUMO_color_MAJOR : SUMO_color_ALLWAY_STOP;
2687 case LINKSTATE_ZIPPER:
2688 return realistic ? RGBColor::INVISIBLE : SUMO_color_ZIPPER;
2689 case LINKSTATE_DEADEND:
2690 return SUMO_color_DEADEND;
2691 default:
2692 throw ProcessError(TLF("No color defined for LinkState '%'", std::string(ls, 1)));
2693 }
2694}
2695
2696
2697double
2699 double viewAngle = objectAngle - angle;
2700 while (viewAngle < 0) {
2701 viewAngle += 360;
2702 }
2703 // fmod round towards zero which is not want we want for negative numbers
2704 viewAngle = fmod(viewAngle, 360);
2705 if (viewAngle > 90 && viewAngle < 270) {
2706 // avoid reading text on its head
2707 objectAngle -= 180;
2708 }
2709 return objectAngle;
2710}
2711
2712
2713bool
2715 double viewAngle = objectAngle - angle;
2716 while (viewAngle < 0) {
2717 viewAngle += 360;
2718 }
2719 // fmod round towards zero which is not want we want for negative numbers
2720 viewAngle = fmod(viewAngle, 360);
2721 return (viewAngle > 90 && viewAngle < 270);
2722}
2723
2724
2726GUIVisualizationSettings::getDetailLevel(const double exaggeration) const {
2727 // calculate factor
2728 const auto factor = (scale * exaggeration);
2729 if (factor >= 10) {
2731 } else if (factor >= 5) {
2733 } else if (factor >= 2.5) {
2735 } else if (factor >= 1.25) {
2737 } else {
2739 }
2740}
2741
2742
2743bool
2744GUIVisualizationSettings::drawDetail(const double detail, const double exaggeration) const {
2745 if (detail <= 0) {
2746 return true;
2747 } else {
2748 return ((scale * exaggeration) >= detail);
2749 }
2750}
2751
2752
2753bool
2754GUIVisualizationSettings::drawMovingGeometryPoint(const double exaggeration, const double radius) const {
2755 return (scale * radius * exaggeration > 10);
2756}
2757
2758/****************************************************************************/
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