 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
47 myDelay(-1), myLookFrom(-1, -1, -1), myLookAt(-1, -1, -1),
50 myCurrentScheme(nullptr),
326 const std::string
id = attrs.
get<std::string>(
SUMO_ATTR_ID,
nullptr, ok);
395 for (
auto file : item.second) {
409 const std::vector<GUISUMOAbstractView::Decal>&
421 std::vector<SUMOTime>
423 std::vector<SUMOTime> result;
424 std::ifstream strm(file.c_str());
425 while (strm.good()) {
428 if (val.length() == 0) {
433 result.push_back(value);
438 WRITE_ERROR(
" Could not decode breakpoint '" + val +
"'");
double roll
The roll of the image to the ground plane (in degrees)
GUIVisualizationSizeSettings polySize
std::string name
The name of this setting.
bool add(T val, double prob, bool checkDuplicates=true)
Adds a value with an assigned probability to the distribution.
GUIColorer edgeColorer
The mesoscopic edge colorer.
bool fps
Information whether frames-per-second should be drawn.
virtual void setViewportFromToRot(const Position &lookFrom, const Position &lookAt, double rotation)
applies the given viewport settings
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 hideConnectors
flag to show or hidde connectors
bool laneShowBorders
Information whether lane borders shall be drawn.
std::string edgeParam
key for coloring by edge parameter
T * getSchemeByName(std::string name)
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
double laneMinSize
The minimum visual lane width for drawing.
GUIVisualizationSizeSettings junctionSize
GUIVisualizationTextSettings vehicleValue
GUIVisualizationTextSettings tlsPhaseIndex
SAX-handler base for SUMO-files.
RGBColor bgColor
background text color
void setColor(const int pos, const T &color)
GUIVisualizationSettings mySettings
The settings to fill.
Position myLookFrom
The viewport loaded, zoom is stored in z coordinate.
double z() const
Returns the z-position.
virtual bool setColorScheme(const std::string &)
set color scheme
FXComboBox * getColoringSchemesCombo()
get coloring schemes combo
bool drawBoundaries
enable or disable draw boundaries
bool constantSizeSelected
whether only selected objects shall be drawn with constant
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
GUIVisualizationTextSettings containerName
~GUISettingsHandler()
Destructor.
bool showRouteIndex
Information whether the route index should be shown.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
bool showGrid
Information whether a grid shall be shown.
std::map< SUMOTime, std::vector< std::string > > mySnapshots
mappig of time steps to filenames for potential snapshots
SAX-reader encapsulation containing binary reader.
double myDelay
The delay loaded.
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
std::map< std::string, RandomDistributor< std::string > > myEventDistributions
The parsed event distributions.
double centerY
The center of the image in y-direction (net coordinates, in m)
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
std::string filename
The path to the file the image is located at.
GUIColorer personColorer
The person colorer.
void addSnapshot(SUMOTime time, const std::string &file, const int w=-1, const int h=-1)
Sets the snapshot time to file map.
double centerZ
The center of the image in z-direction (net coordinates, in m)
GUIVisualizationSizeSettings containerSize
GUIVisualizationTextSettings drawLinkJunctionIndex
GUIVisualizationSizeSettings vehicleSize
bool showRails
Information whether rails shall be drawn.
GUIColorer vehicleColorer
The vehicle colorer.
double height
The height of the image (net coordinates in y-direction, in m)
SUMOTime getSUMOTimeReporting(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
GUIScaler edgeScaler
The mesoscopic edge scaler.
GUIVisualizationTextSettings polyName
bool drawMinGap
Information whether the minimum gap shall be drawn.
GUIColorer polyColorer
The polygon colorer.
GUIVisualizationTextSettings junctionName
GUIColorer junctionColorer
The junction colorer.
double layer
The layer of the image.
GUIVisualizationTextSettings polyType
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
double gridXSize
Information about the grid spacings.
RGBColor backgroundColor
The background color to use.
GUIVisualizationTextSettings internalEdgeName
GUIVisualizationTextSettings addName
bool screenRelative
Whether this image should be skipped in 2D-views.
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
GUIVisualizationSizeSettings poiSize
double myRotation
View rotation.
bool constSize
@brif flag to avoid size changes
double rot
The rotation of the image in the ground plane (in degrees)
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
double tilt
The tilt of the image to the ground plane (in degrees)
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
bool showColorLegend
Information whether the colo legend shall be drawn.
GUIScaler laneScaler
The lane scaler.
void set(double x, double y)
set positions x and y
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
int vehicleQuality
The quality of vehicle drawing.
bool showSublanes
Whether to show sublane boundaries.
GUIVisualizationTextSettings vehicleName
A point in 2D or 3D with translation and scaling methods.
int containerQuality
The quality of container drawing.
GUICompleteSchemeStorage gSchemeStorage
double x() const
Returns the x-position.
void setInterpolated(const bool interpolate, double interpolationStart=0.f)
std::vector< GUISUMOAbstractView::Decal > myDecals
The decals list to fill.
std::string vehicleTextParam
key for rendering textual parameter
bool dither
Information whether dithering shall be enabled.
GUIVisualizationTextSettings addFullName
GUIVisualizationTextSettings drawLinkTLIndex
bool hasDecals() const
Returns whether any decals have been parsed.
GUIVisualizationSizeSettings personSize
GUIColorScheme * myCurrentScheme
The current color scheme.
double altitude
The altitude of the image (net coordinates in z-direction, in m)
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.
GUISettingsHandler(const std::string &content, bool isFile=true, bool netedit=false)
Constructor.
static RGBColor parseColorReporting(const std::string &coldef, const std::string &objecttype, const char *objectid, bool report, bool &ok)
Parses a color information.
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
trigger: the time of the step
SUMOTime string2time(const std::string &r)
GUIVisualizationTextSettings internalJunctionName
void parseString(std::string content)
double minSize
The minimum size to draw this object.
std::string vehicleParam
key for coloring by vehicle parameter
GUIVisualizationTextSettings streetName
std::vector< SUMOTime > myBreakpoints
The parsed breakpoints.
GUIVisualizationTextSettings vehicleText
int myCurrentColorer
The last color scheme category (edges or vehicles)
bool showSizeLegend
Information whether the size legend shall be drawn.
GUIVisualizationTextSettings cwaEdgeName
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GUIVisualizationTextSettings poiType
GUIVisualizationTextSettings poiName
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
double y() const
Returns the y-position.
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.
GUIPerspectiveChanger & getChanger() const
get changer
bool showLaneDirection
Whether to show direction indicators for lanes.
GUIVisualizationSizeSettings parseSizeSettings(const std::string &prefix, const SUMOSAXAttributes &attrs, GUIVisualizationSizeSettings defaults)
parse attributes for sizeSettings
int addMode
The additional structures visualization scheme.
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
virtual double zoom2ZPos(double zoom) const =0
Returns the camera height at which the given zoom level is reached.
RandomDistributor< std::string > getEventDistribution(const std::string &id)
bool showBlinker
Information whether vehicle blinkers shall be drawn.
const std::string & getFileName() const
returns the current file name
GUIScaleScheme * myCurrentScaleScheme
The current scaling scheme.
std::string myViewType
The view type (osg, opengl, default) loaded.
static bool isAbsolute(const std::string &path)
Returns the information whether the given path is absolute.
int personQuality
The quality of person drawing.
bool initialised
Whether this image was initialised (inserted as a texture)
int addColor(const T &color, const double threshold, const std::string &name="")
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag.
GUIVisualizationTextSettings parseTextSettings(const std::string &prefix, const SUMOSAXAttributes &attrs, GUIVisualizationTextSettings defaults)
parse attributes for textSettings
GUIVisualizationSizeSettings addSize
GUIVisualizationTextSettings personValue
GUIVisualizationTextSettings personName
GUIColorer laneColorer
The lane colorer.
GUIColorer containerColorer
The container colorer.
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
bool drawBrakeGap
Information whether the brake gap shall be drawn.
bool drawJunctionShape
whether the shape of the junction should be drawn
GUIColorer poiColorer
The POI 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.
static SUMOSAXReader * getSAXReader(SUMOSAXHandler &handler)
Builds a reader and assigns the handler to it.
double width
The width of the image (net coordinates in x-direction, in m)
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
double getDelay() const
Returns the parsed delay.
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
bool forceDrawForPositionSelection
flag to force draw for position selection (see drawForPositionSelection)
Encapsulated SAX-Attributes.
double centerX
The center of the image in x-direction (net coordinates, in m)
void setActive(int scheme)
A decal (an image) that can be shown.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
GUIVisualizationTextSettings edgeName
GUIVisualizationTextSettings edgeValue
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
std::string edgeData
key for coloring by edgeData
static std::vector< SUMOTime > loadBreakpoints(const std::string &file)
loads breakpoints from the specified file
Position myLookAt
The point to look at, only needed for osg view.
bool showBTRange
Information whether the communication range shall be drawn.
void setFileName(const std::string &name)
Sets the current file name.
double exaggeration
The size exaggeration (upscale)