 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
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) {
static const RGBColor GREY
static const double vehicleBoxes
details for draw person as boxes
GUIVisualizationSizeSettings polySize
std::string name
The name of this setting.
GUIColorer edgeColorer
The mesoscopic edge colorer.
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
bool fps
Information whether frames-per-second should be drawn.
RGBColor selectedEdgeColor
edge selection color
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
bool hideConnectors
flag to show or hidde connectors
This is an uncontrolled, right-before-left link.
static const RGBColor busStop
color for busStops
bool operator==(const GUIVisualizationColorSettings &other)
equality comparator
static const double personShapes
details for draw person as person shapes
bool laneShowBorders
Information whether lane borders shall be drawn.
std::string edgeParam
key for coloring by edge parameter
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
GUIVisualizationSizeSettings(double _minSize, double _exaggeration=1.0, bool _constantSize=false, bool _constantSizeSelected=false)
constructor
const RGBColor SUMO_color_TL_GREEN_MINOR(0, 179, 0)
double laneMinSize
The minimum visual lane width for drawing.
static const double stoppingPlaceDetails
details for stopping places
GUIVisualizationSizeSettings junctionSize
GUIVisualizationTextSettings vehicleValue
The link is controlled by a tls which is off and blinks, has to brake.
GUIVisualizationTextSettings tlsPhaseIndex
double getTextAngle(double objectAngle) const
return an angle that is suitable for reading text aligned with the given angle (degrees)
RGBColor bgColor
background text color
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
Static storage of an output device and its base (abstract) implementation.
bool operator==(const GUIVisualizationSizeSettings &other)
equality comparator
bool operator!=(const GUIVisualizationTextSettings &other)
inequality comparator
double angle
The current view rotation angle.
static const RGBColor BLACK
The link is controlled by a tls which is off, not blinking, may pass.
bool drawBoundaries
enable or disable draw boundaries
bool constantSizeSelected
whether only selected objects shall be drawn with constant
GUIVisualizationTextSettings containerName
static const double route
width for routes
static const RGBColor E2
color for E2 detectors
GUIPropertyScheme< double > GUIScaleScheme
static const std::string SCHEME_NAME_PERMISSION_CODE
static const double stopsText
details for stop texts
bool showGrid
Information whether a grid shall be shown.
static const RGBColor YELLOW
GUIPropertyScheme< RGBColor > GUIColorScheme
bool forceDrawForSelecting
flag to force draw to selecting (see drawForSelecting)
static const RGBColor CYAN
static const double personTriangles
details for draw person as triangles
GUIVisualizationSettings(bool _netedit=false)
constructor
bool netedit
Whether the settings are for Netedit.
static const double ride
width for rides
GUIColorer personColorer
The person colorer.
vehicle is a small delivery vehicle
The link has green light, has to brake.
static const RGBColor crossing
color for crossings
RGBColor selectedRouteColor
route selection color (used for routes and vehicle stops)
classes which (normally) do not drive on normal roads
GUIVisualizationSizeSettings containerSize
static const RGBColor childConnections
color for child connections between parents and child elements
GUIVisualizationTextSettings drawLinkJunctionIndex
GUIVisualizationSizeSettings vehicleSize
bool showRails
Information whether rails shall be drawn.
GUIColorer vehicleColorer
The vehicle colorer.
static const double additionalTextures
details for additional textures
The link has green light, may pass.
const RGBColor SUMO_color_MINOR(51, 51, 51)
RGBColor selectedConnectionColor
connection selection color
GUIScaler edgeScaler
The mesoscopic edge scaler.
static const RGBColor containerStop
color for containerStops
This is an uncontrolled, major link, may pass.
GUIVisualizationTextSettings polyName
void print(OutputDevice &dev, const std::string &name) const
print values in output device
bool drawMinGap
Information whether the minimum gap shall be drawn.
GUIColorer polyColorer
The polygon colorer.
static const RGBColor crossingPriority
color for priority crossing
static const double vehicleShapes
details for draw person as shapes
const RGBColor SUMO_color_EQUAL(128, 128, 128)
static const RGBColor chargingStation
color for chargingStations
static const double detectorDetails
details for detectors
void initNeteditDefaults()
init default settings
#define COL_SCHEME_DYNAMIC
static const double geometryPointsText
details for Geometry Points Texts
double scaledSize(double scale, double constFactor=0.1) const
get scale size
const RGBColor SUMO_color_ZIPPER(192, 128, 64)
RGBColor selectedProhibitionColor
prohibition selection color
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
GUIVisualizationTextSettings junctionName
void initSumoGuiDefaults()
GUIVisualizationTextSettings(bool _show, double _size, RGBColor _color, RGBColor _bgColor=RGBColor(128, 0, 0, 0), bool _constSize=true)
constructor
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
GUIColorer junctionColorer
The junction colorer.
GUIVisualizationTextSettings polyType
static const RGBColor containerStop_sign
color for containerStop signs
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static const RGBColor E1Instant
color for E1 Instant detectors
double gridXSize
Information about the grid spacings.
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic,...
RGBColor backgroundColor
The background color to use.
GUIVisualizationTextSettings internalEdgeName
GUIVisualizationTextSettings addName
const RGBColor SUMO_color_STOP(128, 0, 128)
static const double lockIcon
lock icons
void save(OutputDevice &dev) const
Writes the settings into an output device.
static const RGBColor MAGENTA
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
GUIVisualizationSizeSettings poiSize
The link has yellow light, has to brake anyway.
void save(OutputDevice &dev) const
#define COL_SCHEME_EMISSION
bool constSize
@brif flag to avoid size changes
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
static const RGBColor parkingAreaSign
color for parkingArea sign
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
static const double calibratorText
details for calibrator text
bool showColorLegend
Information whether the colo legend shall be drawn.
static const RGBColor ORANGE
The link has red light (must brake) but indicates upcoming green.
GUIScaler laneScaler
The lane scaler.
static const std::string SCHEME_NAME_SELECTION
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
static const double geometryPointsDetails
details for Geometry Points
int vehicleQuality
The quality of vehicle drawing.
static const RGBColor E3Entry
color for Entrys
vehicle is a passenger car (a "normal" car)
bool showSublanes
Whether to show sublane boundaries.
const RGBColor SUMO_color_TL_OFF_BLINKING(128, 64, 0)
static const RGBColor routeProbe
color for route probes
This is an uncontrolled, zipper-merge link.
static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL
RGBColor selectedPersonColor
person selection color
static const double personTrip
width for person trips
static const RGBColor BLUE
static const RGBColor personTrip
color for personStops
double scale
information about a lane's width (temporary, used for a single view)
const RGBColor SUMO_color_MAJOR(255, 255, 255)
GUIVisualizationTextSettings vehicleName
static const double personExaggeration
Exaggeration for persons (only used in NETEDIT)
static const RGBColor vaporizer
color for vaporizers
int containerQuality
The quality of container drawing.
static const double trip
width for trips
bool dither
Information whether dithering shall be enabled.
bool operator!=(const GUIVisualizationColorSettings &other)
inequality comparator
static const RGBColor RED
named colors
GUIVisualizationTextSettings addFullName
GUIVisualizationTextSettings drawLinkTLIndex
GUIVisualizationSizeSettings personSize
const RGBColor SUMO_color_TL_REDYELLOW(255, 128, 0)
This is an uncontrolled, minor link, has to brake.
static const double laneTextures
details for lane textures
static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
scheme names
static const RGBColor parkingArea
color for parkingAreas
GUIVisualizationTextSettings internalJunctionName
static const RGBColor crossingInvalid
color for invalid crossing
const RGBColor SUMO_color_TL_YELLOW_MAJOR(255, 255, 0)
double minSize
The minimum size to draw this object.
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
static const RGBColor calibrator
color for Calibrators
GUIVisualizationTextSettings streetName
GUIVisualizationColorSettings colorSettings
color settings
static const std::string SCHEME_NAME_TYPE
RGBColor selectionColor
basic selection color
int getCircleResolution() const
function to calculate circle resolution for all circles drawn in drawGL(...) functions
static const RGBColor & getLinkColor(const LinkState &ls)
map from LinkState to color constants
static const RGBColor chargingStation_sign
color for chargingStation sign
static const double vehicleTriangles
details for draw person as triangles
bool showSizeLegend
Information whether the size legend shall be drawn.
static const RGBColor E3Exit
color for Exits
GUIVisualizationTextSettings cwaEdgeName
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
const RGBColor SUMO_color_ALLWAY_STOP(0, 0, 192)
GUIVisualizationTextSettings poiType
GUIVisualizationTextSettings poiName
bool showLaneDirection
Whether to show direction indicators for lanes.
bool drawLaneChangePreference
Information whether the lane change preference shall be drawn.
int addMode
The additional structures visualization scheme.
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
The link has yellow light, may pass.
static const double detectorText
details for detector texts
bool showBlinker
Information whether vehicle blinkers shall be drawn.
static const RGBColor chargingStation_charge
color for chargingStation during charging
const SVCPermissions SVCAll
all VClasses are allowed
static const RGBColor busStop_sign
color for busStops signs
const RGBColor SUMO_color_TL_YELLOW_MINOR(255, 255, 0)
void lf()
writes a line feed if applicable
static const double stoppingPlaceText
details for stopping place texts
GUISelectedStorage gSelected
A global holder of selected objects.
bool operator!=(const GUIVisualizationSizeSettings &other)
inequality comparator
void setAllowsNegativeValues(bool value)
static const RGBColor ride
color for rides
static const RGBColor parkingSpaceInnen
color for parkingArea innen
GUIVisualizationColorSettings()
constructor
int personQuality
The quality of person drawing.
int addColor(const T &color, const double threshold, const std::string &name="")
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, personStops...)
This is an uncontrolled, all-way stop link.
static const RGBColor E1
color for E1 detectors
GUIVisualizationSizeSettings addSize
GUIVisualizationTextSettings personValue
GUIVisualizationTextSettings personName
GUIColorer laneColorer
The lane colorer.
void print(OutputDevice &dev, const std::string &name) const
print values in output device
const RGBColor SUMO_color_TL_OFF_NOSIGNAL(0, 255, 255)
GUIColorer containerColorer
The container colorer.
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
static const RGBColor stops
color for Stops
RGBColor selectedCrossingColor
crossings selection color
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
const RGBColor SUMO_color_DEADEND(0, 0, 0)
static const float dottedContour
width of dotted contours (note: must be float)
The link has red light (must brake)
static const RGBColor GREEN
static const RGBColor walk
color for walks
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 drawBrakeGap
Information whether the brake gap shall be drawn.
bool drawJunctionShape
whether the shape of the junction should be drawn
static const double stopsDetails
details for stops
struct for color settings
static const double connectionsDemandMode
draw connections in demand mode
GUIColorer poiColorer
The POI colorer.
static const RGBColor parkingSpace
color for parkingArea sign
Stores the information about how to visualize structures.
static const RGBColor vehicleTrips
color for vehicle trips
static const RGBColor personStops
color for personStops
bool operator==(const GUIVisualizationSettings &vs2)
Comparison operator.
RGBColor selectedVehicleColor
vehicle selection color
RGBColor selectedLaneColor
lane selection color
GUIVisualizationTextSettings edgeName
GUIVisualizationTextSettings edgeValue
std::string edgeData
key for coloring by edgeData
bool showBTRange
Information whether the communication range shall be drawn.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
static const double dottedContourSegmentLenght
lenght of dotted contour segments
const RGBColor SUMO_color_TL_RED(255, 0, 0)
static const RGBColor WHITE
static const double personCircles
details for draw person as circles
const RGBColor SUMO_color_TL_GREEN_MAJOR(0, 255, 0)
double exaggeration
The size exaggeration (upscale)
bool operator==(const GUIVisualizationTextSettings &other)
equality comparator
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
static const double walk
width for walks
This is an uncontrolled, minor link, has to stop.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.