47 #ifdef CHECK_MEMORY_LEAKS
49 #endif // CHECK_MEMORY_LEAKS
56 :
SUMOSAXHandler(content), myDelay(-1), myLookFrom(-1, -1, -1), myLookAt(-1, -1, -1),
141 mySettings.edgeColorer.setActive(laneEdgeMode);
306 const std::vector<GUISUMOAbstractView::Decal>&
318 std::vector<SUMOTime>
320 std::vector<SUMOTime> result;
321 std::ifstream strm(file.c_str());
322 while (strm.good()) {
325 if (val.length() == 0) {
330 result.push_back(value);
332 WRITE_ERROR(
" A breakpoint-value must be an int, is:" + val);
334 WRITE_ERROR(
" Could not decode breakpoint '" + val +
"'");
float vehicleExaggeration
The vehicle exaggeration (upscale)
GUIVisualizationTextSettings junctionName
A decal (an image) that can be shown.
GUISettingsHandler(const std::string &content, bool isFile=true)
Constructor.
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
SUMOReal roll
The roll of the image to the ground plane (in degrees)
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.
virtual void setViewport(const Position &lookFrom, const Position &lookAt)
applies the given viewport settings
bool showBlinker
Information whether vehicle blinkers shall be drawn.
GUIVisualizationTextSettings addName
int myCurrentColorer
The last color scheme category (edges or vehicles)
GUIVisualizationTextSettings personName
float minAddSize
The minimum size of additional structures to let them be drawn.
GUIColorScheme * myCurrentScheme
The current color scheme.
bool drawLinkTLIndex
Information whether a link's tls index shall be drawn.
static SUMOReal _2SUMOReal(const E *const data)
GUIVisualizationTextSettings poiName
static bool _2bool(const E *const data)
float polyExaggeration
The additional shapes (upscale)
static RGBColor parseColorReporting(const std::string &coldef, const std::string &objecttype, const char *objectid, bool report, bool &ok)
Parses a color information.
GUIColorer laneColorer
The lane colorer.
float poiExaggeration
The additional shapes (upscale)
bool showRails
Information whether rails shall be drawn.
GUIColorScheme * getSchemeByName(std::string name)
void setInterpolated(const bool interpolate, SUMOReal interpolationStart=0.f)
std::vector< GUISUMOAbstractView::Decal > myDecals
The decals list to fill.
GUIVisualizationTextSettings vehicleName
SAX-reader encapsulation containing binary reader.
Position myLookAt
The point to look at, only needed for osg view.
SUMOReal myDelay
The delay loaded.
bool hasDecals() const
Returns whether any decals have been parsed.
bool laneShowBorders
Information whether lane borders shall be drawn.
SUMOReal centerZ
The center of the image in z-direction (net coordinates, in m)
void setSnapshots(std::map< SUMOTime, std::string > snaps)
Sets the snapshot time to file map.
SUMOReal width
The width of the image (net coordinates in x-direction, in m)
static std::vector< SUMOTime > loadBreakpoints(const std::string &file)
loads breakpoints from the specified file
static bool runParser(GenericSAXHandler &handler, const std::string &file)
Runs the given handler on the given file; returns if everything's ok.
void parseString(std::string content)
SAX-handler base for SUMO-files.
SUMOReal x() const
Returns the x-position.
bool dither
Information whether dithering shall be enabled.
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
void setViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
float personExaggeration
The person exaggeration (upscale)
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.
GUIColorer vehicleColorer
The vehicle colorer.
SUMOReal getDelay() const
Returns the parsed delay.
GUIVisualizationTextSettings edgeName
std::map< SUMOTime, std::string > mySnapshots
mappig of time steps to filenames for potential snapshots
void setActive(size_t scheme)
const std::string & getFileName() const
returns the current file name
void setFileName(const std::string &name)
Sets the current file name.
std::string name
The name of this setting.
float addExaggeration
The additional structures exaggeration (upscale)
SUMOReal altitude
The altitude of the image (net coordinates in z-direction, in m)
Encapsulated SAX-Attributes.
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.
SUMOReal centerY
The center of the image in y-direction (net coordinates, in m)
GUIVisualizationTextSettings parseTextSettings(const std::string &prefix, const SUMOSAXAttributes &attrs, GUIVisualizationTextSettings defaults)
parse combined settings of bool, size and color
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.
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
SUMOReal z() const
Returns the z-position.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
FXComboBox & getColoringSchemesCombo()
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)
GUIColorer personColorer
The person colorer.
GUIVisualizationTextSettings internalJunctionName
GUIColorer junctionColorer
The junction colorer.
~GUISettingsHandler()
Destructor.
std::string filename
The path to the file the image is located at.
SUMOReal gridXSize
Information about the grid spacings.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
std::string myViewType
The view type (osg, opengl, default) loaded.
RGBColor backgroundColor
The background color to use.
bool antialiase
Information whether antialiase shall be enabled.
float minPOISize
The minimum size of shapes to let them be drawn.
SUMOReal height
The height of the image (net coordinates in y-direction, in m)
SUMOReal centerX
The center of the image in x-direction (net coordinates, in m)
static int _2int(const E *const data)
float minPersonSize
The minimum size of persons to let them be drawn.
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
unsigned int addColor(const RGBColor &color, const SUMOReal threshold, const std::string &name="")
SUMOReal y() const
Returns the y-position.
virtual std::string getStringSecure(int id, const std::string &def) const =0
Returns the string-value of the named (by its enum-value) attribute.
void set(SUMOReal x, SUMOReal y)
bool drawLinkJunctionIndex
Information whether a link's junction index shall be drawn.
virtual bool setColorScheme(const std::string &)
int personQuality
The quality of person drawing.
bool showGrid
Information whether a grid shall be shown.
SUMOReal layer
The layer of the image.
void setColor(const size_t pos, const RGBColor &color)
float minVehicleSize
The minimum size of vehicles to let them be drawn.
bool showLane2Lane
Information whether lane-to-lane arrows shall 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.
SUMOReal tilt
The tilt of the image to the ground plane (in degrees)
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.
Position myLookFrom
The viewport loaded, zoom is stored in z coordinate.
float minPolySize
The minimum size of shapes to let them be drawn.
SUMOReal rot
The rotation of the image in the ground plane (in degrees)
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
GUIVisualizationTextSettings polyName