GUIVisualizationSettings Class Reference

#include <GUIVisualizationSettings.h>


Detailed Description

Stores the information about how to visualize structures.

Definition at line 55 of file GUIVisualizationSettings.h.


Public Member Functions

size_t getLaneEdgeMode () const
 Returns the number of the active lane (edge) coloring schme.
GUIColorSchemegetLaneEdgeScheme ()
 Returns the current lane (edge) coloring schme.
 GUIVisualizationSettings () throw ()
 constructor
bool operator== (const GUIVisualizationSettings &vs2)
 Assignment operator.
void save (OutputDevice &dev) const throw (IOError)
 Writes the settings into an output device.

Data Fields

bool antialiase
 Information whether antialiase shall be enabled.
bool dither
 Information whether dithering shall be enabled.
std::string name
 The name of this setting.
bool needsGlID
 A temporary (used for a single view) information about a lane's width.
SUMOReal scale
 A temporary (used for a single view) information about a lane's width.
bool showLane2Lane
 Information whether lane-to-lane arrows shall be drawn.
bool showSizeLegend
 Information whether the size legend shall be drawn.
Additional structures visualization settings
float addExaggeration
 The additional structures exaggeration (upscale).
int addMode
 The additional structures visualization scheme.
float addNameSize
 The size of the additionals' name.
bool drawAddName
 Information whether the additional's name shall be drawn.
float minAddSize
 The minimum size of additional structures to let them be drawn.
Background visualization settings
RGBColor backgroundColor
 The background color to use.
SUMOReal gridXSize
 Information about the grid spacings.
SUMOReal gridYSize
bool showBackgroundDecals
 Information whether background decals (textures) shall be used.
bool showGrid
 Information whether a grid shall be shown.
lane visualization settings
bool drawEdgeName
 Information whether the edge's name shall be drawn.
bool drawInternalEdgeName
 Information whether the names of internal edges shall be drawn.
RGBColor edgeNameColor
 The color of edge names.
float edgeNameSize
 The size of the edge name.
bool hideConnectors
 Whether macroscopic connectors shall be hidden.
RGBColor internalEdgeNameColor
 The color of internal edge names.
float internalEdgeNameSize
 The size of the internal edge name.
GUILaneWrapper::Colorer laneColorer
 The lane colorer.
bool laneShowBorders
 Information whether lane borders shall be drawn.
bool showLinkDecals
 Information whether link textures (arrows) shall be drawn.
bool showRails
 Information whether rails shall be drawn.
junction visualization settings
bool drawJunctionName
 Information whether the junction's name shall be drawn.
bool drawLinkJunctionIndex
 Information whether a link's junction index shall be drawn.
bool drawLinkTLIndex
 Information whether a link's tls index shall be drawn.
int junctionMode
 The junction visualization (color assignment) scheme.
RGBColor junctionNameColor
 The color of junction names.
float junctionNameSize
 The size of the junction name.
vehicle visualization settings
bool drawLaneChangePreference
 Information whether the lane change preference shall be drawn.
bool drawVehicleName
 Information whether the vehicle's name shall be drawn.
float minVehicleSize
 The minimum size of vehicles to let them be drawn.
bool showBlinker
 Information whether vehicle blinkers shall be drawn.
GUIVehicle::Colorer vehicleColorer
 The vehicle colorer.
float vehicleExaggeration
 The vehicle exaggeration (upscale).
RGBColor vehicleNameColor
 The color of vehicle names.
float vehicleNameSize
 The size of the vehicle name.
int vehicleQuality
 The quality of vehicle drawing.
shapes visualization settings
bool drawPOIName
 Information whether the poi's name shall be drawn.
float minPOISize
 The minimum size of shapes to let them be drawn.
float poiExaggeration
 The additional shapes (upscale).
RGBColor poiNameColor
 The color of poi names.
float poiNameSize
 The size of the poi name.

Constructor & Destructor Documentation

GUIVisualizationSettings::GUIVisualizationSettings (  )  throw ()

constructor

Definition at line 45 of file GUIVisualizationSettings.cpp.

00046         : name(""), antialiase(false), dither(false), vehicleQuality(0),
00047         backgroundColor(RGBColor((SUMOReal) 1, (SUMOReal) 1, (SUMOReal) 1)),
00048         showGrid(false), gridXSize(100), gridYSize(100),
00049         laneShowBorders(false), showLinkDecals(true), showRails(true),
00050         drawEdgeName(false), edgeNameSize(50),
00051         edgeNameColor(RGBColor((SUMOReal) 1, (SUMOReal) .5, (SUMOReal) 0)),
00052         drawInternalEdgeName(false), internalEdgeNameSize(25),
00053         internalEdgeNameColor(RGBColor((SUMOReal) .5, (SUMOReal) .25, (SUMOReal) 0)),
00054         hideConnectors(false),
00055         minVehicleSize(1), vehicleExaggeration(1), showBlinker(true),
00056         drawLaneChangePreference(false),
00057         drawVehicleName(false), vehicleNameSize(50),
00058         vehicleNameColor(RGBColor((SUMOReal) .8, (SUMOReal) .6, (SUMOReal) 0)),
00059         junctionMode(0), drawLinkTLIndex(false), drawLinkJunctionIndex(false),
00060         drawJunctionName(false), junctionNameSize(50),
00061         junctionNameColor(RGBColor((SUMOReal) 0, (SUMOReal) 1, (SUMOReal) .5)),
00062         showLane2Lane(false), addMode(0), minAddSize(1), addExaggeration(1),
00063         drawAddName(false), addNameSize(50),
00064         minPOISize(0), poiExaggeration(1), drawPOIName(false), poiNameSize(50),
00065         poiNameColor(RGBColor((SUMOReal) 1., (SUMOReal) 0, (SUMOReal) .5)),
00066         showSizeLegend(true) {
00067 }


Member Function Documentation

size_t GUIVisualizationSettings::getLaneEdgeMode (  )  const

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

Returns:
number of the active scheme

Definition at line 71 of file GUIVisualizationSettings.cpp.

References GUIColorer< T >::getActive(), and laneColorer.

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

00071                                                 {
00072 #ifdef HAVE_MESOSIM
00073     if (MSGlobals::gUseMesoSim) {
00074         return edgeColorer.getActive();
00075     }
00076 #endif
00077     return laneColorer.getActive();
00078 }

GUIColorScheme & GUIVisualizationSettings::getLaneEdgeScheme (  ) 

Returns the current lane (edge) coloring schme.

Returns:
current scheme

Definition at line 82 of file GUIVisualizationSettings.cpp.

References GUIColorer< T >::getScheme(), and laneColorer.

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

00082                                             {
00083 #ifdef HAVE_MESOSIM
00084     if (MSGlobals::gUseMesoSim) {
00085         return edgeColorer.getScheme();
00086     }
00087 #endif
00088     return laneColorer.getScheme();
00089 }

bool GUIVisualizationSettings::operator== ( const GUIVisualizationSettings vs2  ) 

Assignment operator.

Definition at line 156 of file GUIVisualizationSettings.cpp.

References addExaggeration, addMode, addNameSize, antialiase, backgroundColor, dither, drawAddName, drawEdgeName, drawInternalEdgeName, drawJunctionName, drawLaneChangePreference, drawLinkJunctionIndex, drawLinkTLIndex, drawPOIName, drawVehicleName, edgeNameColor, edgeNameSize, gridXSize, gridYSize, hideConnectors, internalEdgeNameColor, internalEdgeNameSize, junctionMode, junctionNameColor, junctionNameSize, laneColorer, laneShowBorders, minAddSize, minPOISize, minVehicleSize, poiExaggeration, poiNameColor, poiNameSize, showBackgroundDecals, showBlinker, showGrid, showLane2Lane, showLinkDecals, showRails, showSizeLegend, vehicleColorer, vehicleExaggeration, vehicleNameColor, vehicleNameSize, and vehicleQuality.

00156                                                                        {
00157     if (antialiase!=v2.antialiase) return false;
00158     if (dither!=v2.dither) return false;
00159     if (backgroundColor!=v2.backgroundColor) return false;
00160     if (showBackgroundDecals!=v2.showBackgroundDecals) return false;
00161     if (showGrid!=v2.showGrid) return false;
00162     if (gridXSize!=v2.gridXSize) return false;
00163     if (gridYSize!=v2.gridYSize) return false;
00164 
00165 #ifdef HAVE_MESOSIM
00166     if (!(edgeColorer==v2.edgeColorer)) return false;
00167 #endif
00168     if (!(laneColorer==v2.laneColorer)) return false;
00169     if (laneShowBorders!=v2.laneShowBorders) return false;
00170     if (showLinkDecals!=v2.showLinkDecals) return false;
00171     if (showRails!=v2.showRails) return false;
00172     if (drawEdgeName!=v2.drawEdgeName) return false;
00173     if (edgeNameSize!=v2.edgeNameSize) return false;
00174     if (edgeNameColor!=v2.edgeNameColor) return false;
00175     if (drawInternalEdgeName!=v2.drawInternalEdgeName) return false;
00176     if (internalEdgeNameSize!=v2.internalEdgeNameSize) return false;
00177     if (internalEdgeNameColor!=v2.internalEdgeNameColor) return false;
00178     if (hideConnectors!=v2.hideConnectors) return false;
00179 
00180     if (!(vehicleColorer==v2.vehicleColorer)) return false;
00181     if (vehicleQuality!=v2.vehicleQuality) return false;
00182     if (minVehicleSize!=v2.minVehicleSize) return false;
00183     if (vehicleExaggeration!=v2.vehicleExaggeration) return false;
00184     if (showBlinker!=v2.showBlinker) return false;
00185     if (drawLaneChangePreference!=v2.drawLaneChangePreference) return false;
00186     if (drawVehicleName!=v2.drawVehicleName) return false;
00187     if (vehicleNameSize!=v2.vehicleNameSize) return false;
00188     if (vehicleNameColor!=v2.vehicleNameColor) return false;
00189 
00190     if (junctionMode!=v2.junctionMode) return false;
00191     if (drawLinkTLIndex!=v2.drawLinkTLIndex) return false;
00192     if (drawLinkJunctionIndex!=v2.drawLinkJunctionIndex) return false;
00193     if (drawJunctionName!=v2.drawJunctionName) return false;
00194     if (junctionNameSize!=v2.junctionNameSize) return false;
00195     if (junctionNameColor!=v2.junctionNameColor) return false;
00196 
00197     if (showLane2Lane!=v2.showLane2Lane) return false;
00198 
00199     if (addMode!=v2.addMode) return false;
00200     if (minAddSize!=v2.minAddSize) return false;
00201     if (addExaggeration!=v2.addExaggeration) return false;
00202     if (drawAddName!=v2.drawAddName) return false;
00203     if (addNameSize!=v2.addNameSize) return false;
00204 
00205     if (minPOISize!=v2.minPOISize) return false;
00206     if (poiExaggeration!=v2.poiExaggeration) return false;
00207     if (drawPOIName!=v2.drawPOIName) return false;
00208     if (poiNameSize!=v2.poiNameSize) return false;
00209     if (poiNameColor!=v2.poiNameColor) return false;
00210 
00211     if (showSizeLegend!=v2.showSizeLegend) return false;
00212 
00213     return true;
00214 }

void GUIVisualizationSettings::save ( OutputDevice dev  )  const throw (IOError)

Writes the settings into an output device.

Parameters:
[in] dev The device to write the settings into

Definition at line 93 of file GUIVisualizationSettings.cpp.

References addExaggeration, addMode, addNameSize, antialiase, backgroundColor, dither, drawAddName, drawEdgeName, drawInternalEdgeName, drawJunctionName, drawLinkJunctionIndex, drawLinkTLIndex, drawPOIName, drawVehicleName, edgeNameColor, edgeNameSize, GUIColorer< T >::getActive(), getLaneEdgeMode(), gridXSize, gridYSize, hideConnectors, internalEdgeNameColor, internalEdgeNameSize, junctionMode, junctionNameColor, junctionNameSize, laneColorer, laneShowBorders, minAddSize, minPOISize, minVehicleSize, name, poiExaggeration, poiNameColor, poiNameSize, GUIColorer< T >::save(), showBlinker, showGrid, showLane2Lane, showLinkDecals, showRails, showSizeLegend, vehicleColorer, vehicleExaggeration, vehicleNameColor, vehicleNameSize, and vehicleQuality.

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

00093                                                                      {
00094     dev << "<viewsettings>\n";
00095     dev << "    <scheme name=\"" << name << "\">\n";
00096     dev << "        <opengl antialiase=\"" << antialiase << "\" dither=\"" << dither << "\"/>\n";
00097     dev << "        <background backgroundColor=\"" << backgroundColor << "\"\n"
00098     << "                    showGrid=\"" << showGrid
00099     << "\" gridXSize=\"" << gridXSize << "\" gridYSize=\"" << gridYSize << "\"/>\n";
00100     dev << "        <edges laneEdgeMode=\"" << getLaneEdgeMode()
00101     << "\" laneShowBorders=\"" << laneShowBorders
00102     << "\" showLinkDecals=\"" << showLinkDecals
00103     << "\" showRails=\"" << showRails << "\"\n"
00104     << "               drawEdgeName=\"" << drawEdgeName
00105     << "\" edgeNameSize=\"" << edgeNameSize
00106     << "\" edgeNameColor=\"" << edgeNameColor << "\"\n"
00107     << "               drawInternalEdgeName=\"" << drawInternalEdgeName
00108     << "\" internalEdgeNameSize=\"" << internalEdgeNameSize
00109     << "\" internalEdgeNameColor=\"" << internalEdgeNameColor
00110     << "\" hideConnectors=\"" << hideConnectors
00111     << "\">\n";
00112     laneColorer.save(dev);
00113 #ifdef HAVE_MESOSIM
00114     edgeColorer.save(dev);
00115 #endif
00116     dev << "        </edges>\n";
00117 
00118     dev << "        <vehicles vehicleMode=\"" << vehicleColorer.getActive()
00119     << "\" vehicleQuality=\"" << vehicleQuality
00120     << "\" minVehicleSize=\"" << minVehicleSize
00121     << "\" vehicleExaggeration=\"" << vehicleExaggeration
00122     << "\" showBlinker=\"" << showBlinker << "\"\n"
00123     << "                  drawVehicleName=\"" << drawVehicleName
00124     << "\" vehicleNameSize=\"" << vehicleNameSize
00125     << "\" vehicleNameColor=\"" << vehicleNameColor << "\">\n";
00126     vehicleColorer.save(dev);
00127     dev << "        </vehicles>\n";
00128 
00129     dev << "        <junctions junctionMode=\"" << junctionMode
00130     << "\" drawLinkTLIndex=\"" << drawLinkTLIndex
00131     << "\" drawLinkJunctionIndex=\"" << drawLinkJunctionIndex << "\"\n"
00132     << "                   drawJunctionName=\"" << drawJunctionName
00133     << "\" junctionNameSize=\"" << junctionNameSize
00134     << "\" junctionNameColor=\"" << junctionNameColor
00135     << "\" showLane2Lane=\"" << showLane2Lane << "\"/>\n";
00136 
00137     dev << "        <additionals addMode=\"" << addMode
00138     << "\" minAddSize=\"" << minAddSize
00139     << "\" addExaggeration=\"" << addExaggeration
00140     << "\" drawAddName=\"" << drawAddName
00141     << "\" addNameSize=\"" << addNameSize << "\"/>\n";
00142 
00143     dev << "        <pois poiExaggeration=\"" << poiExaggeration
00144     << "\" minPOISize=\"" << minPOISize
00145     << "\" drawPOIName=\"" << drawPOIName
00146     << "\" poiNameSize=\"" << poiNameSize
00147     << "\" poiNameColor=\"" << poiNameColor << "\"/>\n";
00148 
00149     dev << "        <legend showSizeLegend=\"" << showSizeLegend << "\"/>\n";
00150     dev << "    </scheme>\n";
00151     dev << "</viewsettings>\n";
00152 }


Field Documentation

The additional structures visualization scheme.

Definition at line 164 of file GUIVisualizationSettings.h.

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

Information whether the additional's name shall be drawn.

Definition at line 170 of file GUIVisualizationSettings.h.

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

Information whether the edge's name shall be drawn.

Definition at line 98 of file GUIVisualizationSettings.h.

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

Information whether the names of internal edges shall be drawn.

Definition at line 104 of file GUIVisualizationSettings.h.

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

Information whether the junction's name shall be drawn.

Definition at line 148 of file GUIVisualizationSettings.h.

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

Information whether the lane change preference shall be drawn.

Definition at line 128 of file GUIVisualizationSettings.h.

Referenced by operator==().

Information whether a link's junction index shall be drawn.

Definition at line 146 of file GUIVisualizationSettings.h.

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

Information whether a link's tls index shall be drawn.

Definition at line 144 of file GUIVisualizationSettings.h.

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

Information whether the vehicle's name shall be drawn.

Definition at line 130 of file GUIVisualizationSettings.h.

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

The junction visualization (color assignment) scheme.

Definition at line 142 of file GUIVisualizationSettings.h.

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

The minimum size of additional structures to let them be drawn.

Definition at line 166 of file GUIVisualizationSettings.h.

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

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

Definition at line 199 of file GUIVisualizationSettings.h.

Referenced by GUIViewTraffic::doPaintGL().

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

Definition at line 197 of file GUIVisualizationSettings.h.

Referenced by GUIViewTraffic::doPaintGL().

Information whether background decals (textures) shall be used.

Definition at line 74 of file GUIVisualizationSettings.h.

Referenced by operator==().

Information whether vehicle blinkers shall be drawn.

Definition at line 126 of file GUIVisualizationSettings.h.

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

Information whether a grid shall be shown.

Definition at line 76 of file GUIVisualizationSettings.h.

Referenced by GUIViewTraffic::doPaintGL(), GUISettingsHandler::myStartElement(), GUIDialog_ViewSettings::onCmdColorChange(), operator==(), and save().

Information whether lane-to-lane arrows shall be drawn.

Definition at line 157 of file GUIVisualizationSettings.h.

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


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

Generated on Wed May 5 00:06:46 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6