SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // Stores the information about how to visualize structures 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef GUIVisualizationSettings_h 00023 #define GUIVisualizationSettings_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 #include <vector> 00037 #include <map> 00038 #include <utils/common/RGBColor.h> 00039 #include <utils/common/ToString.h> 00040 #include "GUIColorer.h" 00041 00042 00043 // =========================================================================== 00044 // class declarations 00045 // =========================================================================== 00046 class BaseSchemeInfoSource; 00047 class OutputDevice; 00048 00049 00050 // =========================================================================== 00051 // class definitions 00052 // =========================================================================== 00053 00054 // cannot declare this as inner class because it needs to be used in forward 00055 // declaration (@todo fix inclusion order by removing references to guisim!) 00056 struct GUIVisualizationTextSettings { 00057 GUIVisualizationTextSettings(bool _show, float _size, RGBColor _color) : 00058 show(_show), size(_size), color(_color) {} 00059 00060 bool show; 00061 float size; 00062 RGBColor color; 00063 00064 bool operator==(const GUIVisualizationTextSettings& other) { 00065 return show == other.show && 00066 size == other.size && 00067 color == other.color; 00068 } 00069 bool operator!=(const GUIVisualizationTextSettings& other) { 00070 return !((*this) == other); 00071 } 00072 00073 std::string print(const std::string& name) const { 00074 return name + "_show=\"" + toString(show) + "\" " + 00075 name + "_size=\"" + toString(size) + "\" " + 00076 name + "_color=\"" + toString(color) + "\" "; 00077 } 00078 }; 00079 00084 class GUIVisualizationSettings { 00085 public: 00086 00088 GUIVisualizationSettings() ; 00089 00091 std::string name; 00092 00094 bool antialiase; 00096 bool dither; 00097 00099 00100 00102 RGBColor backgroundColor; 00104 bool showBackgroundDecals; 00106 bool showGrid; 00108 SUMOReal gridXSize, gridYSize; 00110 00111 00113 00114 00115 #ifdef HAVE_MESOSIM 00116 00117 GUIColorer edgeColorer; 00118 00120 static bool UseMesoSim; 00121 #endif 00122 00123 GUIColorer laneColorer; 00125 bool laneShowBorders; 00127 bool showLinkDecals; 00129 bool showRails; 00130 // Setting bundles for optional drawing names with size and color 00131 GUIVisualizationTextSettings edgeName, internalEdgeName, streetName; 00132 00133 bool hideConnectors; 00135 00136 00138 00139 00141 GUIColorer vehicleColorer; 00143 int vehicleQuality; 00145 float minVehicleSize; 00147 float vehicleExaggeration; 00149 bool showBlinker; 00151 bool drawLaneChangePreference; 00153 bool drawMinGap; 00154 // Setting bundles for optional drawing vehicle names 00155 GUIVisualizationTextSettings vehicleName; 00157 00158 00160 00161 00163 int junctionMode; 00165 bool drawLinkTLIndex; 00167 bool drawLinkJunctionIndex; 00168 // Setting bundles for optional drawing junction names 00169 GUIVisualizationTextSettings junctionName, internalJunctionName; 00171 00172 00174 bool showLane2Lane; 00175 00176 00178 00179 00181 int addMode; 00183 float minAddSize; 00185 float addExaggeration; 00186 // Setting bundles for optional drawing additional names 00187 GUIVisualizationTextSettings addName; 00189 00190 00192 00193 00195 float minPOISize; 00197 float poiExaggeration; 00198 // Setting bundles for optional drawing poi names 00199 GUIVisualizationTextSettings poiName; 00201 00203 bool showSizeLegend; 00204 00206 SUMOReal scale; 00207 00209 bool gaming; 00210 00212 int editMode; 00213 00215 SUMOReal selectionScale; 00216 00220 void save(OutputDevice& dev) const; 00221 00225 size_t getLaneEdgeMode() const; 00226 00230 GUIColorScheme& getLaneEdgeScheme(); 00231 00233 bool operator==(const GUIVisualizationSettings& vs2); 00234 }; 00235 00236 00237 #endif 00238 00239 /****************************************************************************/ 00240