SUMO - Simulation of Urban MObility
GUIVisualizationSettings Class Reference

Stores the information about how to visualize structures. More...

#include <GUIVisualizationSettings.h>

Collaboration diagram for GUIVisualizationSettings:
Collaboration graph

Public Member Functions

int getLaneEdgeMode () const
 Returns the number of the active lane (edge) coloring schme. More...
 
int getLaneEdgeScaleMode () const
 Returns the number of the active lane (edge) scaling schme. More...
 
GUIScaleSchemegetLaneEdgeScaleScheme ()
 Returns the current lane (edge) scaling schme. More...
 
GUIColorSchemegetLaneEdgeScheme ()
 Returns the current lane (edge) coloring schme. More...
 
double getTextAngle (double objectAngle) const
 return an angle that is suitable for reading text aligned with the given angle (degrees) More...
 
 GUIVisualizationSettings (bool _netedit=false)
 constructor More...
 
void initNeteditDefaults ()
 init default settings More...
 
void initSumoGuiDefaults ()
 
bool operator== (const GUIVisualizationSettings &vs2)
 Comparison operator. More...
 
void save (OutputDevice &dev) const
 Writes the settings into an output device. More...
 

Static Public Member Functions

static const RGBColorgetLinkColor (const LinkState &ls)
 map from LinkState to color constants More...
 

Data Fields

double angle
 The current view rotation angle. More...
 
bool dither
 Information whether dithering shall be enabled. More...
 
bool drawForSelecting
 whether drawing is performed for the purpose of selecting objects More...
 
int editAdditionalMode
 the current NETEDIT additional mode (temporary) More...
 
int editMode
 the current NETEDIT mode (temporary) More...
 
bool gaming
 whether the application is in gaming mode or not More...
 
std::string name
 The name of this setting. More...
 
bool netedit
 Whether the settings are for Netedit. More...
 
double scale
 information about a lane's width (temporary, used for a single view) More...
 
RGBColor selectedAdditionalColor
 
RGBColor selectedConnectionColor
 
RGBColor selectedEdgeColor
 
RGBColor selectedLaneColor
 
RGBColor selectionColor
 NETEDIT special colors. More...
 
double selectionScale
 the current selection scaling in NETEDIT (temporary) More...
 
bool showSizeLegend
 Information whether the size legend shall be drawn. More...
 
Background visualization settings
RGBColor backgroundColor
 The background color to use. More...
 
bool showGrid
 Information whether a grid shall be shown. More...
 
double gridXSize
 Information about the grid spacings. More...
 
double gridYSize
 
vehicle visualization settings
GUIColorer vehicleColorer
 The vehicle colorer. More...
 
int vehicleQuality
 The quality of vehicle drawing. More...
 
bool showBlinker
 Information whether vehicle blinkers shall be drawn. More...
 
bool drawLaneChangePreference
 Information whether the lane change preference shall be drawn. More...
 
bool drawMinGap
 Information whether the minimum gap shall be drawn. More...
 
bool showBTRange
 Information whether the communication range shall be drawn. More...
 
GUIVisualizationSizeSettings vehicleSize
 
GUIVisualizationTextSettings vehicleName
 
GUIVisualizationTextSettings vehicleValue
 
person visualization settings
GUIColorer personColorer
 The person colorer. More...
 
int personQuality
 The quality of person drawing. More...
 
GUIVisualizationSizeSettings personSize
 
GUIVisualizationTextSettings personName
 
GUIVisualizationTextSettings personValue
 
container visualization settings
GUIColorer containerColorer
 The container colorer. More...
 
int containerQuality
 The quality of container drawing. More...
 
GUIVisualizationSizeSettings containerSize
 
GUIVisualizationTextSettings containerName
 
junction visualization settings
GUIColorer junctionColorer
 The junction colorer. More...
 
GUIVisualizationTextSettings drawLinkTLIndex
 
GUIVisualizationTextSettings drawLinkJunctionIndex
 
GUIVisualizationTextSettings junctionName
 
GUIVisualizationTextSettings internalJunctionName
 
bool showLane2Lane
 Information whether lane-to-lane arrows shall be drawn. More...
 
bool drawJunctionShape
 whether the shape of the junction should be drawn More...
 
bool drawCrossingsAndWalkingareas
 whether crosings and walkingareas shall be drawn More...
 
GUIVisualizationSizeSettings junctionSize
 
Additional structures visualization settings
int addMode
 The additional structures visualization scheme. More...
 
GUIVisualizationSizeSettings addSize
 
GUIVisualizationTextSettings addName
 
GUIVisualizationTextSettings addFullName
 
shapes visualization settings
GUIColorer poiColorer
 The POI colorer. More...
 
GUIVisualizationSizeSettings poiSize
 
GUIVisualizationTextSettings poiName
 
GUIVisualizationTextSettings poiType
 
GUIColorer polyColorer
 The polygon colorer. More...
 
GUIVisualizationSizeSettings polySize
 
GUIVisualizationTextSettings polyName
 
GUIVisualizationTextSettings polyType
 

Static Public Attributes

static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
 
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
 
static const RGBColor SUMO_color_busStop
 color for busStops More...
 
static const RGBColor SUMO_color_busStop_sign
 color for busStops signs More...
 
static const RGBColor SUMO_color_chargingStation
 color for chargingStations More...
 
static const RGBColor SUMO_color_chargingStation_charge
 color for chargingStation during charging More...
 
static const RGBColor SUMO_color_chargingStation_sign
 color for chargingStation sign More...
 
static const RGBColor SUMO_color_containerStop
 color for containerStops More...
 
static const RGBColor SUMO_color_containerStop_sign
 color for containerStop signs More...
 
static const RGBColor SUMO_color_E1
 color for E1 detectors More...
 
static const RGBColor SUMO_color_E1Instant
 color for E1 Instant detectors More...
 
static const RGBColor SUMO_color_E2
 color for E2 detectors More...
 
static const RGBColor SUMO_color_E3Entry
 color for Entrys More...
 
static const RGBColor SUMO_color_E3Exit
 color for Exits More...
 

lane visualization settings

GUIColorer edgeColorer
 The mesoscopic edge colorer. More...
 
GUIScaler edgeScaler
 The mesoscopic edge scaler. More...
 
GUIColorer laneColorer
 The lane colorer. More...
 
GUIScaler laneScaler
 The lane scaler. More...
 
bool laneShowBorders
 Information whether lane borders shall be drawn. More...
 
bool showBikeMarkings
 Information whether bicycle lane marking shall be drawn. More...
 
bool showLinkDecals
 Information whether link textures (arrows) shall be drawn. More...
 
bool showLinkRules
 Information whether link rules (colored bars) shall be drawn. More...
 
bool showRails
 Information whether rails shall be drawn. More...
 
GUIVisualizationTextSettings edgeName
 
GUIVisualizationTextSettings internalEdgeName
 
GUIVisualizationTextSettings cwaEdgeName
 
GUIVisualizationTextSettings streetName
 
GUIVisualizationTextSettings edgeValue
 
bool hideConnectors
 
double laneWidthExaggeration
 The lane exaggeration (upscale thickness) More...
 
double laneMinSize
 The minimum visual lane width for drawing. More...
 
bool showLaneDirection
 Whether to show direction indicators for lanes. More...
 
bool showSublanes
 Whether to show sublane boundaries. More...
 
bool spreadSuperposed
 Whether to improve visualisation of superposed (rail) edges. More...
 
std::string edgeParam
 key for coloring by edge parameter More...
 
std::string laneParam
 
static bool UseMesoSim = false
 this should be set at the same time as MSGlobals::gUseMesoSim More...
 

Detailed Description

Stores the information about how to visualize structures.

Definition at line 125 of file GUIVisualizationSettings.h.

Constructor & Destructor Documentation

◆ GUIVisualizationSettings()

GUIVisualizationSettings::GUIVisualizationSettings ( bool  _netedit = false)

constructor

Definition at line 79 of file GUIVisualizationSettings.cpp.

References initNeteditDefaults(), initSumoGuiDefaults(), and netedit.

Member Function Documentation

◆ getLaneEdgeMode()

int GUIVisualizationSettings::getLaneEdgeMode ( ) const

Returns the number of the active lane (edge) coloring schme.

Returns
number of the active scheme

Definition at line 885 of file GUIVisualizationSettings.cpp.

References edgeColorer, GUIPropertySchemeStorage< T >::getActive(), laneColorer, and UseMesoSim.

Referenced by GUIEdge::drawGL(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), save(), and GUISUMOAbstractView::showToolTipFor().

◆ getLaneEdgeScaleMode()

int GUIVisualizationSettings::getLaneEdgeScaleMode ( ) const

Returns the number of the active lane (edge) scaling schme.

Returns
number of the active scheme

Definition at line 894 of file GUIVisualizationSettings.cpp.

References edgeScaler, GUIPropertySchemeStorage< T >::getActive(), laneScaler, and UseMesoSim.

Referenced by GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), and save().

◆ getLaneEdgeScaleScheme()

GUIScaleScheme & GUIVisualizationSettings::getLaneEdgeScaleScheme ( )

Returns the current lane (edge) scaling schme.

Returns
current scheme

Definition at line 912 of file GUIVisualizationSettings.cpp.

References edgeScaler, GUIPropertySchemeStorage< T >::getScheme(), laneScaler, and UseMesoSim.

Referenced by GUIDialog_ViewSettings::onCmdColorChange(), and GUIDialog_ViewSettings::rebuildColorMatrices().

◆ getLaneEdgeScheme()

GUIColorScheme & GUIVisualizationSettings::getLaneEdgeScheme ( )

Returns the current lane (edge) coloring schme.

Returns
current scheme

Definition at line 903 of file GUIVisualizationSettings.cpp.

References edgeColorer, GUIPropertySchemeStorage< T >::getScheme(), laneColorer, and UseMesoSim.

Referenced by GUIDialog_ViewSettings::onCmdColorChange(), and GUIDialog_ViewSettings::rebuildColorMatrices().

◆ getLinkColor()

◆ getTextAngle()

double GUIVisualizationSettings::getTextAngle ( double  objectAngle) const

return an angle that is suitable for reading text aligned with the given angle (degrees)

Definition at line 1337 of file GUIVisualizationSettings.cpp.

References angle.

Referenced by GUIChargingStation::drawGL(), GUIBusStop::drawGL(), GUIParkingArea::drawGL(), and GUIEdge::drawGL().

◆ initNeteditDefaults()

◆ initSumoGuiDefaults()

void GUIVisualizationSettings::initSumoGuiDefaults ( )

◆ operator==()

◆ save()

void GUIVisualizationSettings::save ( OutputDevice dev) const

Writes the settings into an output device.

Parameters
[in]devThe device to write the settings into

Definition at line 920 of file GUIVisualizationSettings.cpp.

References addFullName, addMode, addName, addSize, backgroundColor, OutputDevice::closeTag(), containerColorer, containerName, containerQuality, containerSize, cwaEdgeName, dither, drawCrossingsAndWalkingareas, drawJunctionShape, drawLinkJunctionIndex, drawLinkTLIndex, drawMinGap, edgeColorer, edgeName, edgeParam, edgeScaler, edgeValue, GUIPropertySchemeStorage< T >::getActive(), getLaneEdgeMode(), getLaneEdgeScaleMode(), gridXSize, gridYSize, hideConnectors, internalEdgeName, internalJunctionName, junctionColorer, junctionName, junctionSize, laneColorer, laneMinSize, laneParam, laneScaler, laneShowBorders, laneWidthExaggeration, OutputDevice::lf(), name, OutputDevice::openTag(), personColorer, personName, personQuality, personSize, personValue, poiColorer, poiName, poiSize, poiType, polyColorer, polyName, polySize, polyType, GUIVisualizationTextSettings::print(), GUIVisualizationSizeSettings::print(), GUIPropertySchemeStorage< T >::save(), showBikeMarkings, showBlinker, showGrid, showLane2Lane, showLaneDirection, showLinkDecals, showLinkRules, showRails, showSizeLegend, showSublanes, spreadSuperposed, streetName, SUMO_ATTR_NAME, SUMO_TAG_VIEWSETTINGS_ADDITIONALS, SUMO_TAG_VIEWSETTINGS_BACKGROUND, SUMO_TAG_VIEWSETTINGS_CONTAINERS, SUMO_TAG_VIEWSETTINGS_EDGES, SUMO_TAG_VIEWSETTINGS_JUNCTIONS, SUMO_TAG_VIEWSETTINGS_LEGEND, SUMO_TAG_VIEWSETTINGS_OPENGL, SUMO_TAG_VIEWSETTINGS_PERSONS, SUMO_TAG_VIEWSETTINGS_POIS, SUMO_TAG_VIEWSETTINGS_POLYS, SUMO_TAG_VIEWSETTINGS_SCHEME, SUMO_TAG_VIEWSETTINGS_VEHICLES, vehicleColorer, vehicleName, vehicleQuality, vehicleSize, vehicleValue, and OutputDevice::writeAttr().

Referenced by GUIDialog_ViewSettings::onCmdExportSetting(), and GUICompleteSchemeStorage::writeSettings().

Field Documentation

◆ addFullName

◆ addMode

int GUIVisualizationSettings::addMode

The additional structures visualization scheme.

Definition at line 275 of file GUIVisualizationSettings.h.

Referenced by GUISettingsHandler::myStartElement(), operator==(), and save().

◆ addName

◆ addSize

◆ angle

◆ backgroundColor

◆ containerColorer

◆ containerName

◆ containerQuality

◆ containerSize

◆ cwaEdgeName

◆ dither

◆ drawCrossingsAndWalkingareas

bool GUIVisualizationSettings::drawCrossingsAndWalkingareas

◆ drawForSelecting

◆ drawJunctionShape

◆ drawLaneChangePreference

bool GUIVisualizationSettings::drawLaneChangePreference

Information whether the lane change preference shall be drawn.

Definition at line 210 of file GUIVisualizationSettings.h.

Referenced by GUIBaseVehicle::drawOnPos(), and operator==().

◆ drawLinkJunctionIndex

◆ drawLinkTLIndex

◆ drawMinGap

bool GUIVisualizationSettings::drawMinGap

◆ edgeColorer

◆ edgeName

◆ edgeParam

std::string GUIVisualizationSettings::edgeParam

◆ edgeScaler

◆ edgeValue

◆ editAdditionalMode

int GUIVisualizationSettings::editAdditionalMode

the current NETEDIT additional mode (temporary)

Definition at line 320 of file GUIVisualizationSettings.h.

◆ editMode

int GUIVisualizationSettings::editMode

the current NETEDIT mode (temporary)

Definition at line 317 of file GUIVisualizationSettings.h.

Referenced by GNEViewNet::doPaintGL(), GNEJunction::drawGL(), GNECrossing::drawGL(), and GNELane::getPopUpMenu().

◆ gaming

◆ gridXSize

double GUIVisualizationSettings::gridXSize

◆ gridYSize

◆ hideConnectors

◆ internalEdgeName

◆ internalJunctionName

◆ junctionColorer

◆ junctionName

◆ junctionSize

◆ laneColorer

◆ laneMinSize

double GUIVisualizationSettings::laneMinSize

◆ laneParam

◆ laneScaler

◆ laneShowBorders

bool GUIVisualizationSettings::laneShowBorders

◆ laneWidthExaggeration

double GUIVisualizationSettings::laneWidthExaggeration

◆ name

◆ netedit

◆ personColorer

◆ personName

◆ personQuality

◆ personSize

◆ personValue

◆ poiColorer

◆ poiName

◆ poiSize

◆ poiType

◆ polyColorer

◆ polyName

◆ polySize

◆ polyType

◆ scale

double GUIVisualizationSettings::scale

information about a lane's width (temporary, used for a single view)

Definition at line 311 of file GUIVisualizationSettings.h.

Referenced by GUIPolygon::checkDraw(), GUIPointOfInterest::checkDraw(), GUIViewTraffic::doPaintGL(), GNEViewNet::doPaintGL(), GUIVehicle::drawAction_drawLinkItems(), GNEChargingStation::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEParkingArea::drawGL(), GNEVaporizer::drawGL(), GNERouteProbe::drawGL(), GNEDetectorE3::drawGL(), GNEJunction::drawGL(), GNEVariableSpeedSign::drawGL(), GNECrossing::drawGL(), GNEInternalLane::drawGL(), GNERerouter::drawGL(), GNEDetectorE1::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorExit::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GNEDetectorE1Instant::drawGL(), GUILaneSpeedTrigger::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUICalibrator::drawGL(), GUIContainer::drawGL(), GUIPerson::drawGL(), GNECalibrator::drawGL(), GUIJunctionWrapper::drawGL(), GNETAZ::drawGL(), GNELane::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNEConnection::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNEDetectorE2::drawGL(), GUIParkingArea::drawGL(), GUIEdge::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNEPoly::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNEEdge::drawGL(), GUILane::drawGL(), GUIPointOfInterest::drawInnerPOI(), GUIPolygon::drawInnerPolygon(), GUIBaseVehicle::drawOnPos(), GUIVehicle::drawRouteHelper(), GNEAttributeCarrier::getCircleResolution(), GUIVisualizationSizeSettings::getExaggeration(), GUISUMOAbstractView::makeSnapshot(), and GUISUMOAbstractView::paintGLGrid().

◆ SCHEME_NAME_EDGE_PARAM_NUMERICAL

const std::string GUIVisualizationSettings::SCHEME_NAME_EDGE_PARAM_NUMERICAL
static

◆ SCHEME_NAME_LANE_PARAM_NUMERICAL

const std::string GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL
static

◆ selectedAdditionalColor

◆ selectedConnectionColor

◆ selectedEdgeColor

◆ selectedLaneColor

◆ selectionColor

◆ selectionScale

double GUIVisualizationSettings::selectionScale

the current selection scaling in NETEDIT (temporary)

Definition at line 330 of file GUIVisualizationSettings.h.

Referenced by GNEJunction::drawGL(), GNELane::drawGL(), GNEJunction::mouseOverObject(), and GNEViewNet::setSelectionScaling().

◆ showBikeMarkings

bool GUIVisualizationSettings::showBikeMarkings

◆ showBlinker

bool GUIVisualizationSettings::showBlinker

◆ showBTRange

bool GUIVisualizationSettings::showBTRange

Information whether the communication range shall be drawn.

Definition at line 214 of file GUIVisualizationSettings.h.

Referenced by GUIBaseVehicle::drawOnPos(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), and operator==().

◆ showGrid

◆ showLane2Lane

◆ showLaneDirection

bool GUIVisualizationSettings::showLaneDirection

◆ showLinkDecals

bool GUIVisualizationSettings::showLinkDecals

◆ showLinkRules

bool GUIVisualizationSettings::showLinkRules

Information whether link rules (colored bars) shall be drawn.

Definition at line 176 of file GUIVisualizationSettings.h.

Referenced by GUILane::drawGL(), GUISettingsHandler::myStartElement(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), operator==(), and save().

◆ showRails

◆ showSizeLegend

bool GUIVisualizationSettings::showSizeLegend

◆ showSublanes

bool GUIVisualizationSettings::showSublanes

◆ spreadSuperposed

bool GUIVisualizationSettings::spreadSuperposed

◆ streetName

◆ SUMO_color_busStop

const RGBColor GUIVisualizationSettings::SUMO_color_busStop
static

color for busStops

Definition at line 371 of file GUIVisualizationSettings.h.

Referenced by GNEBusStop::drawGL(), GNEParkingArea::drawGL(), GNEAccess::drawGL(), and GUIBusStop::drawGL().

◆ SUMO_color_busStop_sign

const RGBColor GUIVisualizationSettings::SUMO_color_busStop_sign
static

color for busStops signs

Definition at line 374 of file GUIVisualizationSettings.h.

Referenced by GNEBusStop::drawGL(), GUIChargingStation::drawGL(), and GUIBusStop::drawGL().

◆ SUMO_color_chargingStation

const RGBColor GUIVisualizationSettings::SUMO_color_chargingStation
static

color for chargingStations

Definition at line 383 of file GUIVisualizationSettings.h.

Referenced by GNEChargingStation::drawGL(), and GUIChargingStation::drawGL().

◆ SUMO_color_chargingStation_charge

const RGBColor GUIVisualizationSettings::SUMO_color_chargingStation_charge
static

color for chargingStation during charging

Definition at line 389 of file GUIVisualizationSettings.h.

Referenced by GUIChargingStation::drawGL().

◆ SUMO_color_chargingStation_sign

const RGBColor GUIVisualizationSettings::SUMO_color_chargingStation_sign
static

color for chargingStation sign

Definition at line 386 of file GUIVisualizationSettings.h.

Referenced by GNEChargingStation::drawGL().

◆ SUMO_color_containerStop

const RGBColor GUIVisualizationSettings::SUMO_color_containerStop
static

color for containerStops

Definition at line 377 of file GUIVisualizationSettings.h.

Referenced by GNEContainerStop::drawGL(), and GUIContainerStop::drawGL().

◆ SUMO_color_containerStop_sign

const RGBColor GUIVisualizationSettings::SUMO_color_containerStop_sign
static

color for containerStop signs

Definition at line 380 of file GUIVisualizationSettings.h.

Referenced by GNEContainerStop::drawGL(), and GUIContainerStop::drawGL().

◆ SUMO_color_E1

const RGBColor GUIVisualizationSettings::SUMO_color_E1
static

color for E1 detectors

Definition at line 392 of file GUIVisualizationSettings.h.

Referenced by GNEDetectorE1::drawGL().

◆ SUMO_color_E1Instant

const RGBColor GUIVisualizationSettings::SUMO_color_E1Instant
static

color for E1 Instant detectors

Definition at line 395 of file GUIVisualizationSettings.h.

Referenced by GNEDetectorE1Instant::drawGL().

◆ SUMO_color_E2

const RGBColor GUIVisualizationSettings::SUMO_color_E2
static

color for E2 detectors

Definition at line 398 of file GUIVisualizationSettings.h.

Referenced by GNEDetectorE2::drawGL().

◆ SUMO_color_E3Entry

const RGBColor GUIVisualizationSettings::SUMO_color_E3Entry
static

color for Entrys

Definition at line 401 of file GUIVisualizationSettings.h.

Referenced by GNEDetectorEntry::drawGL(), and GUIE3Collector::MyWrapper::drawGL().

◆ SUMO_color_E3Exit

const RGBColor GUIVisualizationSettings::SUMO_color_E3Exit
static

color for Exits

Definition at line 404 of file GUIVisualizationSettings.h.

Referenced by GNEDetectorExit::drawGL(), and GUIE3Collector::MyWrapper::drawGL().

◆ UseMesoSim

◆ vehicleColorer

◆ vehicleName

◆ vehicleQuality

◆ vehicleSize

◆ vehicleValue


The documentation for this class was generated from the following files: