46 dataIntervalParent, parameters, {}, {fromEdge, toEdge}, {}, {}, {}, {}) {
68 if (dataInterval && (filteredAttribute.size() > 0)) {
73 const double value = parse<double>(
getParameter(filteredAttribute,
"0"));
83 switch (activeScheme) {
117 }
else if (edgeRelDataFrame->shown()) {
168 (laneEdge->getParentEdge()->getNBEdge()->getLaneWidth(laneEdge->getIndex()) * 0.5);
178 laneEdge->getShapeLengths(), laneWidth);
180 glTranslated(0, 0, 0.01);
184 laneEdge->getShapeLengths(), (laneWidth - 0.1));
268 device.
writeAttr(attribute.first, attribute.second);
DataEditMode
enum for data edit modes
@ DATA_EDGERELDATA
mode for create edgeRelData elements
@ DATA_SELECT
mode for selecting data elements
@ DATA_INSPECT
mode for inspecting data elements
@ DATA_DELETE
mode for deleting data elements
@ GLO_EDGERELDATA
edge relation data
GUIViewObjectsHandler gViewObjectsHandler
GUIIcon
An enumeration of icons used by the gui applications.
@ SVC_IGNORING
vehicles ignoring classes
@ SUMO_TAG_EDGEREL
a relation between two edges
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_BEGIN
weights: time range begin
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_END
weights: time range end
@ GNE_ATTR_DATASET
data set of a generic data
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
static void pushMatrix()
push matrix
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
bool isCommonValid(SumoXMLAttr key, const std::string &value)
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
GNENet * myNet
pointer to net
std::string getCommonAttribute(SumoXMLAttr key) const
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void calculateContourEdges(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *fromEdge, const GNEEdge *toEdge) const
calculate contour between two consecutive edges
void calculateContourEdge(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEEdge *edge, const GUIGlObject *elementToRegister, const double layer, const bool closeFirstExtrem, const bool closeLastExtrem) const
calculate contour edge
bool drawDottedContours(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, const double lineWidth, const bool addOffset) const
draw dotted contours (basics, select, delete, inspect...)
bool checkDrawPathContour(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC) const
drawing contour functions
An Element which don't belong to GNENet but has influence in the simulation.
std::string getAttribute(SumoXMLAttr key) const
GNEDataSet * getDataSetParent() const
Returns a pointer to GNEDataSet parent.
const std::map< SumoXMLTag, GNEDataSet::AttributeColors > & getSpecificAttributeColors() const
specific attribute colors
void updateAttributeColors()
update attribute colors deprecated
A road/street connecting two junctions (netedit-version)
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
Position getPositionInView() const
Returns element position in view.
bool isGenericDataValid() const
check if current data set is valid to be written into XML (by default true, can be reimplemented in c...
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
GNELane * getLastPathLane() const
get last path lane
double getAttributeDouble(SumoXMLAttr key) const
std::string getAttribute(SumoXMLAttr key) const
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform data set changes
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over lane.
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over junction.
bool isAttributeEnabled(SumoXMLAttr key) const
void fixGenericDataProblem()
fix data set problem (by default throw an exception, has to be reimplemented in children)
void computePathElement()
compute pathElement
std::string getGenericDataProblem() const
return a string with the current data set problem (by default empty, can be reimplemented in children...
bool isGenericDataVisible() const
check if current edge rel data is visible
Boundary getCenteringBoundary() const
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
RGBColor setColor(const GUIVisualizationSettings &s) const
get edge rel data color
~GNEEdgeRelData()
Destructor.
void writeGenericData(OutputDevice &device) const
write data set element into a xml file
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
GNEEdgeRelData(GNEDataInterval *dataIntervalParent, GNEEdge *fromEdge, GNEEdge *toEdge, const Parameterised::Map ¶meters)
Constructor.
void updateGeometry()
update pre-computed geometry information
GNELane * getFirstPathLane() const
get first path lane
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
std::string getFilteredAttribute() const
get filtered attribute
GNEDataInterval * getDataInterval() const
get current select data set ID
const AttributeSelector * getAttributeSelector() const
getattribute selector modul
const IntervalSelector * getIntervalSelector() const
get interval selector modul
An Element which don't belong to GNENet but has influence in the simulation.
GNEDataInterval * myDataIntervalParent
dataInterval Parent
std::string getPartialID() const
get partial ID
bool isVisibleInspectDeleteSelect() const
check if attribute is visible in inspect, delete or select mode
void replaceFirstParentEdge(const std::string &value)
replace the first parent edge
void drawFilteredAttribute(const GUIVisualizationSettings &s, const PositionVector &laneShape, const std::string &attribute, const GNEDataInterval *dataIntervalParent) const
draw filtered attribute
void replaceLastParentEdge(const std::string &value)
replace the last parent edge
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEEdge * getParentEdge() const
get parent edge
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
GNEPathManager * getDataPathManager()
get data path manager
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEViewNet * getViewNet() const
get view net
void calculateConsecutivePathEdges(GNEPathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > &edges, const int firstLaneIndex=-1, const int lastLaneIndex=-1)
calculate consecutive path edges
const GNELane * getLane() const
get lane associated with this segment
const GNELane * getNextLane() const
get next lane
const GNELane * getPreviousLane() const
get previous lane
GNEContour * getContour() const
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
GNEViewNetHelper::IntervalBar & getIntervalBar()
get interval bar
GNEViewParent * getViewParent() const
get the net object
GNEEdgeRelDataFrame * getEdgeRelDataFrame() const
get frame for DATA_EDGERELDATA
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
T getColor(const double value) const
const std::string & getName() const
void addToRedrawPathElements(const GNEPathElement *pathElement)
add path element to redrawing set
bool isPathElementMarkForRedraw(const GNEPathElement *pathElement) const
check if the given path element has to be redraw again
Stores the information about how to visualize structures.
static const std::string SCHEME_NAME_DATA_ATTRIBUTE_NUMERICAL
static const double MISSING_DATA
GUIVisualizationSizeSettings addSize
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
double edgeRelWidthExaggeration
The edgeRelation exaggeration (upscale thickness)
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
std::string relDataAttr
key for coloring by edgeRelation / tazRelation attribute
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static bool areAttributesValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to an attributes map "key1=value1|key2=value2|....
bool hasParameter(const std::string &key) const
Returns whether the parameter is set.
std::map< std::string, std::string > Map
parameters map
void setParametersStr(const std::string ¶msString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
virtual const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
A point in 2D or 3D with translation and scaling methods.
static const RGBColor GREEN
static const RGBColor BLACK
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
DataEditMode dataEditMode
the current Data edit mode
bool isCurrentSupermodeData() const
@check if current supermode is Data
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
static const RGBColor & getRainbowScaledColor(const double min, const double max, const double value)
get rainbow scaled color
RGBColor selectedEdgeDataColor
edge data selection color
static const double segmentWidth
width of dotted contour segments
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values