55 myDelay(-1), myLookFrom(-1, -1, -1), myLookAt(-1, -1, -1),
369 for (
auto file : item.second) {
383 const std::vector<GUISUMOAbstractView::Decal>&
395 std::vector<SUMOTime>
397 std::vector<SUMOTime> result;
398 std::ifstream strm(file.c_str());
399 while (strm.good()) {
402 if (val.length() == 0) {
407 result.push_back(value);
409 WRITE_ERROR(
" A breakpoint-value must be an int, is:" + val);
411 WRITE_ERROR(
" Could not decode breakpoint '" + val +
"'");
GUIVisualizationSizeSettings junctionSize
GUIVisualizationTextSettings junctionName
A decal (an image) that can be shown.
GUIScaleScheme * myCurrentScaleScheme
The current scaling scheme.
double altitude
The altitude of the image (net coordinates in z-direction, in m)
double z() const
Returns the z-position.
GUICompleteSchemeStorage gSchemeStorage
bool showSizeLegend
Information whether the size legend shall be drawn.
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
GUIVisualizationTextSettings streetName
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag.
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
bool showBlinker
Information whether vehicle blinkers shall be drawn.
virtual void setViewportFromTo(const Position &lookFrom, const Position &lookAt)
applies the given viewport settings
GUIVisualizationTextSettings addName
int myCurrentColorer
The last color scheme category (edges or vehicles)
GUIVisualizationTextSettings personName
GUIColorScheme * myCurrentScheme
The current color scheme.
GUIVisualizationTextSettings poiName
static bool _2bool(const E *const data)
converts a 0-terminated char-type array into the boolean value described by it
static RGBColor parseColorReporting(const std::string &coldef, const std::string &objecttype, const char *objectid, bool report, bool &ok)
Parses a color information.
double exaggeration
The size exaggeration (upscale)
GUIColorer laneColorer
The lane colorer.
GUIColorer containerColorer
The container colorer.
double x() const
Returns the x-position.
GUIColorer edgeColorer
The mesoscopic edge colorer.
bool showRails
Information whether rails shall be drawn.
std::vector< GUISUMOAbstractView::Decal > myDecals
The decals list to fill.
void addSnapshot(SUMOTime time, const std::string &file)
Sets the snapshot time to file map.
GUIVisualizationTextSettings vehicleName
double centerX
The center of the image in x-direction (net coordinates, in m)
SAX-reader encapsulation containing binary reader.
Position myLookAt
The point to look at, only needed for osg view.
bool screenRelative
Whether this image should be skipped in 2D-views.
T * getSchemeByName(std::string name)
bool hasDecals() const
Returns whether any decals have been parsed.
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
bool showLaneDirection
Whether to show direction indicators for lanes.
GUIVisualizationTextSettings cwaEdgeName
bool laneShowBorders
Information whether lane borders shall be drawn.
static std::vector< SUMOTime > loadBreakpoints(const std::string &file)
loads breakpoints from the specified file
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
void parseString(std::string content)
void set(double x, double y)
set positions x and y
SAX-handler base for SUMO-files.
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
bool dither
Information whether dithering shall be enabled.
double height
The height of the image (net coordinates in y-direction, in m)
double myDelay
The delay loaded.
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
void setActive(int scheme)
double layer
The layer of the image.
GUIVisualizationSettings mySettings
The settings to fill.
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
GUIVisualizationSizeSettings polySize
GUIColorer vehicleColorer
The vehicle colorer.
virtual std::string getStringSecure(int id, const std::string &def) const =0
Returns the string-value of the named (by its enum-value) attribute.
double roll
The roll of the image to the ground plane (in degrees)
RandomDistributor< std::string > getEventDistribution(const std::string &id)
GUIVisualizationTextSettings edgeName
GUIVisualizationSizeSettings addSize
GUISettingsHandler(const std::string &content, bool isFile=true, bool netedit=false)
Constructor.
const std::string & getFileName() const
returns the current file name
void setFileName(const std::string &name)
Sets the current file name.
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.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
double minSize
The minimum size to draw this object.
Encapsulated SAX-Attributes.
virtual double zoom2ZPos(double zoom) const =0
Returns the camera height at which the given zoom level is reached.
GUIVisualizationTextSettings internalEdgeName
static bool isAbsolute(const std::string &path)
Returns the information whether the given path is absolute.
A point in 2D or 3D with translation and scaling methods.
double getDelay() const
Returns the parsed delay.
GUIVisualizationTextSettings parseTextSettings(const std::string &prefix, const SUMOSAXAttributes &attrs, GUIVisualizationTextSettings defaults)
parse attributes for textSettings
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
int addMode
The additional structures visualization scheme.
double rot
The rotation of the image in the ground plane (in degrees)
bool showSublanes
Whether to show sublane boundaries.
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
double y() const
Returns the y-position.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
FXComboBox & getColoringSchemesCombo()
get coloring schemes combo
static SUMOSAXReader * getSAXReader(SUMOSAXHandler &handler)
Builds a reader and assigns the handler to it.
SUMOTime string2time(const std::string &r)
bool initialised
Whether this image was initialised (inserted as a texture)
GUIVisualizationTextSettings drawLinkTLIndex
GUIColorer personColorer
The person colorer.
GUIVisualizationTextSettings internalJunctionName
double centerY
The center of the image in y-direction (net coordinates, in m)
GUIColorer junctionColorer
The junction colorer.
~GUISettingsHandler()
Destructor.
std::string filename
The path to the file the image is located at.
double laneMinSize
The minimum visual lane width for drawing.
GUIScaler edgeScaler
The mesoscopic edge scaler.
std::string myViewType
The view type (osg, opengl, default) loaded.
int containerQuality
The quality of container drawing.
RGBColor backgroundColor
The background color to use.
bool antialiase
Information whether antialiase shall be enabled.
double width
The width of the image (net coordinates in x-direction, in m)
void setColor(const int pos, const T &color)
virtual bool setColorScheme(const std::string &)
set color scheme
GUIVisualizationSizeSettings poiSize
static int _2int(const E *const data)
converts a char-type array into the integer value described by it
trigger: the time of the step
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
GUIVisualizationSizeSettings containerSize
double centerZ
The center of the image in z-direction (net coordinates, in m)
static double _2double(const E *const data)
converts a char-type array into the double value described by it
GUIVisualizationSizeSettings personSize
int personQuality
The quality of person drawing.
bool showGrid
Information whether a grid shall be shown.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
double tilt
The tilt of the image to the ground plane (in degrees)
GUIPerspectiveChanger & getChanger() const
get changer
std::map< SUMOTime, std::vector< std::string > > mySnapshots
mappig of time steps to filenames for potential snapshots
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
std::map< std::string, RandomDistributor< std::string > > myEventDistributions
The parsed event distributions.
GUIVisualizationSizeSettings vehicleSize
bool drawJunctionShape
whether the shape of the junction should be drawn
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
int vehicleQuality
The quality of vehicle drawing.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
std::vector< SUMOTime > myBreakpoints
The parsed breakpoints.
bool add(T val, double prob, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
GUIScaler laneScaler
The lane scaler.
GUIVisualizationTextSettings drawLinkJunctionIndex
GUIVisualizationSizeSettings parseSizeSettings(const std::string &prefix, const SUMOSAXAttributes &attrs, GUIVisualizationSizeSettings defaults)
parse attributes for sizeSettings
Position myLookFrom
The viewport loaded, zoom is stored in z coordinate.
void setInterpolated(const bool interpolate, double interpolationStart=0.f)
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
GUIVisualizationTextSettings polyName
GUIVisualizationTextSettings containerName