142 #define COL_SCHEME_EMISSION RGBColor(255,255,210) 143 #define COL_SCHEME_MISC RGBColor(210,220,255) 144 #define COL_SCHEME_STATIC RGBColor(230,230,230) 145 #define COL_SCHEME_DYNAMIC RGBColor(220,255,220) 160 constSize(_constSize) {
205 exaggeration(_exaggeration),
206 constantSize(_constantSize),
207 constantSizeSelected(_constantSizeSelected) {
255 selectionColor(0, 0, 204, 255),
256 selectedEdgeColor(0, 0, 204, 255),
257 selectedLaneColor(0, 0, 128, 255),
258 selectedConnectionColor(0, 0, 100, 255),
259 selectedProhibitionColor(0, 0, 120, 255),
260 selectedCrossingColor(0, 100, 196, 255),
261 selectedAdditionalColor(0, 0, 150, 255),
262 selectedRouteColor(0, 0, 150, 255),
263 selectedVehicleColor(0, 0, 100, 255),
264 selectedPersonColor(0, 0, 120, 255),
265 selectedPersonPlanColor(0, 0, 130, 255) {
311 showGrid(false), gridXSize(100), gridYSize(100),
312 laneShowBorders(false), showBikeMarkings(true), showLinkDecals(true),
313 showLinkRules(true), showRails(true),
314 edgeName(false, 60,
RGBColor(255, 128, 0, 255)),
315 internalEdgeName(false, 45,
RGBColor(128, 64, 0, 255)),
316 cwaEdgeName(false, 60,
RGBColor::MAGENTA),
317 streetName(false, 60,
RGBColor::YELLOW),
318 edgeValue(false, 100,
RGBColor::CYAN),
319 hideConnectors(false),
320 laneWidthExaggeration(1),
322 showLaneDirection(false),
324 spreadSuperposed(false),
325 edgeParam(
"EDGE_KEY"),
326 laneParam(
"LANE_KEY"),
328 vehicleQuality(0), showBlinker(true),
329 drawLaneChangePreference(false),
332 showBTRange(false), vehicleSize(1),
333 vehicleName(false, 60,
RGBColor(204, 153, 0, 255)),
334 vehicleValue(false, 80,
RGBColor::CYAN),
337 personName(false, 60,
RGBColor(0, 153, 204, 255)),
338 personValue(false, 80,
RGBColor::CYAN),
341 containerName(false, 60,
RGBColor(0, 153, 204, 255)),
342 drawLinkTLIndex(false, 50,
RGBColor(128, 128, 255, 255)),
343 drawLinkJunctionIndex(false, 50,
RGBColor(128, 128, 255, 255)),
344 junctionName(false, 60,
RGBColor(0, 255, 128, 255)),
345 internalJunctionName(false, 50,
RGBColor(0, 204, 128, 255)),
346 tlsPhaseIndex(false, 150,
RGBColor(255, 255, 0, 255)),
347 showLane2Lane(false),
348 drawJunctionShape(true),
349 drawCrossingsAndWalkingareas(true),
353 addName(false, 60,
RGBColor(255, 0, 128, 255)),
354 addFullName(false, 60,
RGBColor(255, 0, 128, 255)),
355 poiSize(0), poiName(false, 50,
RGBColor(255, 0, 128, 255)),
356 poiType(false, 60,
RGBColor(255, 0, 128, 255)),
357 polySize(0), polyName(false, 50,
RGBColor(255, 0, 128, 255)),
358 polyType(false, 60,
RGBColor(255, 0, 128, 255)),
359 showSizeLegend(true),
360 showColorLegend(false),
362 drawBoundaries(false),
364 drawForSelecting(false),
365 forceDrawForSelecting(false) {
796 laneScheme.
addColor(5, 1,
"selected");
800 laneScheme.
addColor(10, (
double)(150.0 / 3.6));
809 laneScheme.
addColor(10, (
double)300);
816 laneScheme.
addColor(10, (
double)(10. / 7.5 / 5.));
819 laneScheme.
addColor(10, (
double)(0.05 / 7.5 / 2.));
822 laneScheme.
addColor(10, (
double)(.005 / 7.5 / 5.));
825 laneScheme.
addColor(10, (
double)(.125 / 7.5 / 5.));
828 laneScheme.
addColor(10, (
double)(.02 / 7.5 / 4.));
831 laneScheme.
addColor(10, (
double)(.005 / 7.5 * 100.));
834 laneScheme.
addColor(10, (
double)100);
838 laneScheme.
addColor(10, (
double)100);
842 laneScheme.
addColor(10, (
double)100);
845 laneScheme =
GUIScaleScheme(
"by given length/geometrical length", 0);
846 laneScheme.
addColor(10, (
double)10.0);
849 laneScheme.
addColor(-1000, (
double) - 1000);
850 laneScheme.
addColor(1000, (
double)1000);
854 laneScheme.
addColor(0.5, (
double) - 20);
859 laneScheme.
addColor(10, (
double)(150.0 / 3.6));
862 laneScheme.
addColor(0.5, (
double)(0.5));
863 laneScheme.
addColor(2, (
double)(1));
864 laneScheme.
addColor(10, (
double)(2));
867 laneScheme.
addColor(10, (
double)(1 / 7.5 / 5.));
871 laneScheme.
addColor(10, (
double)10);
872 laneScheme.
addColor(50, (
double)100);
958 edgeScheme.
addColor(5, 1,
"selected");
961 edgeScheme.
addColor(10, (
double)(150.0 / 3.6));
967 edgeScheme.
addColor(10, (
double)(150.0 / 3.6));
970 edgeScheme.
addColor(20, (
double)5000);
977 edgeScheme.
addColor(10, (
double)10);
978 edgeScheme.
addColor(50, (
double)100);
1102 scheme.
addColor(
RGBColor(192, 255, 192), 11,
"traffic_light_right_on_red");
1599 throw ProcessError(
"No color defined for LinkState '" + std::string(ls, 1) +
"'");
1606 double viewAngle = objectAngle -
angle;
1607 while (viewAngle < 0) {
1611 viewAngle = fmod(viewAngle, 360);
1612 if (viewAngle > 90 && viewAngle < 270) {
1625 return ((
scale * exaggeration) >= detail);
1634 }
else if (
scale >= 10) {
1636 }
else if (
scale >= 2) {
GUIVisualizationSizeSettings junctionSize
static const double personCircles
details for draw person as circles
bool drawBrakeGap
Information whether the brake gap shall be drawn.
GUIVisualizationTextSettings junctionName
static const RGBColor walk
color for walks
GUIVisualizationSizeSettings(double _minSize, double _exaggeration=1.0, bool _constantSize=false, bool _constantSizeSelected=false)
constructor
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, personStops...)
The link has green light, may pass.
static const std::string SCHEME_NAME_TYPE
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static const RGBColor BLUE
static const RGBColor crossing
color for crossings
const RGBColor SUMO_color_TL_GREEN_MAJOR(0, 255, 0)
const RGBColor SUMO_color_TL_RED(255, 0, 0)
bool showSizeLegend
Information whether the size legend shall be drawn.
static const RGBColor childConnections
color for child connections between parents and child elements
double scale
information about a lane's width (temporary, used for a single view)
static const RGBColor personStops
color for personStops
GUIVisualizationTextSettings poiType
GUIVisualizationTextSettings streetName
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
GUIPropertyScheme< double > GUIScaleScheme
static const double personShapes
details for draw person as person shapes
bool showBlinker
Information whether vehicle blinkers shall be drawn.
static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL
GUIVisualizationTextSettings addName
GUIVisualizationTextSettings personValue
GUIVisualizationTextSettings personName
void initSumoGuiDefaults()
RGBColor selectedVehicleColor
vehicle selection color
static const double personExaggeration
Exaggeration for persons (only used in NETEDIT)
void setAllowsNegativeValues(bool value)
const RGBColor SUMO_color_TL_GREEN_MINOR(0, 179, 0)
GUIVisualizationTextSettings poiName
static const RGBColor WHITE
RGBColor selectedLaneColor
lane selection color
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
bool operator!=(const GUIVisualizationTextSettings &other)
inequality comparator
bool showBTRange
Information whether the communication range shall be drawn.
double exaggeration
The size exaggeration (upscale)
bool operator==(const GUIVisualizationTextSettings &other)
equality comparator
GUIColorer laneColorer
The lane colorer.
GUIColorer containerColorer
The container colorer.
The link has green light, has to brake.
bool operator==(const GUIVisualizationSizeSettings &other)
equality comparator
Stores the information about how to visualize structures.
This is an uncontrolled, minor link, has to stop.
static const RGBColor chargingStation
color for chargingStations
static const RGBColor containerStop_sign
color for containerStop signs
RGBColor bgColor
background text color
GUIColorer edgeColorer
The mesoscopic edge colorer.
#define COL_SCHEME_DYNAMIC
GUIVisualizationTextSettings edgeValue
static const double stoppingPlaceText
details for stopping place texts
vehicle is a small delivery vehicle
bool drawLaneChangePreference
Information whether the lane change preference shall be drawn.
bool showRails
Information whether rails shall be drawn.
static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
scheme names
bool operator==(const GUIVisualizationColorSettings &other)
equality comparator
bool constantSizeSelected
whether only selected objects shall be drawn with constant
GUIVisualizationTextSettings vehicleName
classes which (normally) do not drive on normal roads
const RGBColor SUMO_color_MINOR(51, 51, 51)
static const RGBColor E1Instant
color for E1 Instant detectors
bool operator==(const GUIVisualizationSettings &vs2)
Comparison operator.
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
static const RGBColor ORANGE
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
bool showLaneDirection
Whether to show direction indicators for lanes.
void print(OutputDevice &dev, const std::string &name) const
print values in output device
GUIVisualizationTextSettings cwaEdgeName
const RGBColor SUMO_color_EQUAL(128, 128, 128)
bool laneShowBorders
Information whether lane borders shall be drawn.
static const double ride
width for rides
This is an uncontrolled, right-before-left link.
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
bool netedit
Whether the settings are for Netedit.
static const RGBColor BLACK
const SVCPermissions SVCAll
all VClasses are allowed
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
static const double stopsDetails
details for stops
The link is controlled by a tls which is off, not blinking, may pass.
This is an uncontrolled, all-way stop link.
bool dither
Information whether dithering shall be enabled.
const RGBColor SUMO_color_STOP(128, 0, 128)
static const RGBColor routeProbe
color for route probes
This is an uncontrolled, zipper-merge link.
static const double vehicleShapes
details for draw person as shapes
GUIVisualizationSettings(bool _netedit=false)
constructor
static const RGBColor vaporizer
color for vaporizers
GUIVisualizationSizeSettings polySize
const RGBColor SUMO_color_ZIPPER(192, 128, 64)
GUIColorer vehicleColorer
The vehicle colorer.
std::string edgeParam
key for coloring by edge parameter
GUIVisualizationTextSettings edgeName
int getCircleResolution() const
function to calculate circle resolution for all circles drawn in drawGL(...) functions ...
static const double personTrip
width for person trips
GUIVisualizationSizeSettings addSize
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
GUIColorer poiColorer
The POI colorer.
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
void save(OutputDevice &dev) const
Writes the settings into an output device.
static const RGBColor GREEN
GUIVisualizationTextSettings vehicleValue
static const RGBColor GREY
static const double additionalTextures
details for additional textures
RGBColor selectedConnectionColor
connection selection color
static const RGBColor containerStop
color for containerStops
int addColor(const T &color, const double threshold, const std::string &name="")
std::string name
The name of this setting.
double gridXSize
Information about the grid spacings.
double getTextAngle(double objectAngle) const
return an angle that is suitable for reading text aligned with the given angle (degrees) ...
static const double connectionsDemandMode
draw connections in demand mode
RGBColor selectedRouteColor
route selection color (used for routes and vehicle stops)
static const RGBColor E3Exit
color for Exits
const RGBColor SUMO_color_MAJOR(255, 255, 255)
double minSize
The minimum size to draw this object.
static const RGBColor crossingPriority
color for priority crossing
GUIVisualizationTextSettings internalEdgeName
This is an uncontrolled, minor link, has to brake.
bool constSize
flag to avoid size changes
RGBColor selectionColor
basic selection color
RGBColor selectedProhibitionColor
prohibition selection color
double scaledSize(double scale, double constFactor=0.1) const
get scale size
bool drawMinGap
Information whether the minimum gap shall be drawn.
static const double route
width for routes
int addMode
The additional structures visualization scheme.
const RGBColor SUMO_color_ALLWAY_STOP(0, 0, 192)
GUIVisualizationTextSettings polyType
bool showSublanes
Whether to show sublane boundaries.
GUIVisualizationTextSettings(bool _show, double _size, RGBColor _color, RGBColor _bgColor=RGBColor(128, 0, 0, 0), bool _constSize=true)
constructor
static const std::string SCHEME_NAME_PERMISSION_CODE
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
const RGBColor SUMO_color_TL_OFF_BLINKING(128, 64, 0)
static const double laneTextures
details for lane textures
static const RGBColor MAGENTA
GUIVisualizationTextSettings drawLinkTLIndex
GUIColorer polyColorer
The polygon colorer.
static const double detectorDetails
details for detectors
GUIColorer personColorer
The person colorer.
#define COL_SCHEME_EMISSION
bool showColorLegend
Information whether the colo legend shall be drawn.
GUIVisualizationTextSettings internalJunctionName
bool fps
Information whether frames-per-second should be drawn.
GUIColorer junctionColorer
The junction colorer.
GUIVisualizationColorSettings()
constructor
static const double personTriangles
details for draw person as triangles
double angle
The current view rotation angle.
double laneMinSize
The minimum visual lane width for drawing.
GUIScaler edgeScaler
The mesoscopic edge scaler.
static const double vehicleBoxes
details for draw person as boxes
static const RGBColor ride
color for rides
vehicle is a passenger car (a "normal" car)
static const double geometryPointsDetails
details for Geometry Points
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
int containerQuality
The quality of container drawing.
RGBColor backgroundColor
The background color to use.
static const RGBColor stops
color for Stops
static const RGBColor parkingAreaSign
color for parkingArea sign
const RGBColor SUMO_color_TL_YELLOW_MAJOR(255, 255, 0)
static const RGBColor E1
color for E1 detectors
static const double vehicleTriangles
details for draw person as triangles
void print(OutputDevice &dev, const std::string &name) const
print values in output device
static const double walk
width for walks
static const RGBColor vehicleTrips
color for vehicle trips
GUIVisualizationSizeSettings poiSize
static const RGBColor E3Entry
color for Entrys
RGBColor selectedCrossingColor
crossings selection color
static const RGBColor YELLOW
bool operator!=(const GUIVisualizationColorSettings &other)
inequality comparator
static const RGBColor RED
named colors
RGBColor selectedPersonColor
person selection color
const RGBColor SUMO_color_TL_REDYELLOW(255, 128, 0)
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
static const RGBColor CYAN
static const RGBColor personTrip
color for personStops
static const RGBColor parkingSpace
color for parkingArea sign
The link has yellow light, may pass.
GUIVisualizationSizeSettings containerSize
static const double stopsText
details for stop texts
std::string edgeData
key for coloring by edgeData
The link is controlled by a tls which is off and blinks, has to brake.
GUIVisualizationTextSettings addFullName
static const RGBColor parkingArea
color for parkingAreas
static const double detectorText
details for detector texts
GUIVisualizationTextSettings tlsPhaseIndex
static const RGBColor crossingInvalid
color for invalid crossing
The link has red light (must brake)
static const double lockIcon
lock icons
const RGBColor SUMO_color_TL_OFF_NOSIGNAL(0, 255, 255)
static const RGBColor calibrator
color for Calibrators
This is an uncontrolled, major link, may pass.
GUIVisualizationSizeSettings personSize
int personQuality
The quality of person drawing.
bool showGrid
Information whether a grid shall be shown.
static const RGBColor chargingStation_sign
color for chargingStation sign
static const float dottedContour
width of dotted contours (note: must be float)
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
const RGBColor SUMO_color_TL_YELLOW_MINOR(255, 255, 0)
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
bool operator!=(const GUIVisualizationSizeSettings &other)
inequality comparator
Static storage of an output device and its base (abstract) implementation.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static const double stoppingPlaceDetails
details for stopping places
struct for color settings
static const double calibratorText
details for calibrator text
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationSizeSettings vehicleSize
bool drawJunctionShape
whether the shape of the junction should be drawn
GUIPropertyScheme< RGBColor > GUIColorScheme
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
int vehicleQuality
The quality of vehicle drawing.
RGBColor selectedEdgeColor
edge selection color
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
The link has yellow light, has to brake anyway.
static const RGBColor busStop
color for busStops
const RGBColor SUMO_color_DEADEND(0, 0, 0)
static const std::string SCHEME_NAME_SELECTION
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool forceDrawForSelecting
flag to force draw to selecting (see drawForSelecting)
static const double geometryPointsText
details for Geometry Points Texts
GUIScaler laneScaler
The lane scaler.
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
GUISelectedStorage gSelected
A global holder of selected objects.
void save(OutputDevice &dev) const
static const RGBColor & getLinkColor(const LinkState &ls)
map from LinkState to color constants
The link has red light (must brake) but indicates upcoming green.
bool drawBoundaries
enable or disable draw boundaries
static const RGBColor parkingSpaceInnen
color for parkingArea innen
static const RGBColor E2
color for E2 detectors
static const RGBColor chargingStation_charge
color for chargingStation during charging
GUIVisualizationTextSettings drawLinkJunctionIndex
static const RGBColor busStop_sign
color for busStops signs
bool hideConnectors
flag to show or hidde connectors
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
void lf()
writes a line feed if applicable
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
static const double trip
width for trips
static const double dottedContourSegmentLenght
lenght of dotted contour segments
void initNeteditDefaults()
init default settings
GUIVisualizationTextSettings polyName
GUIVisualizationTextSettings containerName