49 const std::map<std::string, std::string>& parameters) :
51 {}, {fromEdge, toEdge}, {}, {}, {}, {}, {}, {}) {
65 if (dataInterval && (filteredAttribute.size() > 0)) {
70 const double value = parse<double>(
getParameter(filteredAttribute,
"0"));
88 }
else if (edgeRelDataFrame->shown()) {
142 if (!onlyDrawContour) {
154 glTranslated(0, 0, 0.01);
166 if (!onlyDrawContour) {
195 if (!onlyDrawContour) {
202 while ((index < fromLanes.size()) || (index < toLanes.size())) {
204 const GNELane* from = (index < fromLanes.size()) ? fromLanes.at(index) : fromLanes.back();
205 const GNELane* to = (index < toLanes.size()) ? toLanes.at(index) : toLanes.back();
209 const double laneWidth = laneWidthFrom < laneWidthTo ? laneWidthFrom : laneWidthTo;
213 glTranslated(0, 0,
getType() + offsetFront);
220 glTranslated(0, 0, 0.01);
233 glTranslated(0, 0, 0.01);
249 if (!onlyDrawContour) {
277 dottedGeometryColor.
reset();
286 dottedGeometry.invertOffset();
288 dottedGeometryColor.
reset();
299 dottedGeometryColor.
reset();
308 dottedGeometryColor.
reset();
351 device.
writeAttr(attribute.first, attribute.second);
434 return canParse<bool>(value);
491 if (parse<bool>(value)) {
DataEditMode
@brie 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
@ GLO_DOTTEDCONTOUR_INSPECTED
dotted contour inspected element (used in NETEDIT)
@ SVC_IGNORING
vehicles ignoring classes
@ SUMO_TAG_EDGEREL
a relation between two edges
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ 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 pushName(unsigned int name)
push Name
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 popName()
pop Name
static void pushMatrix()
push matrix
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
friend class GNEChange_Attribute
declare friend class
const std::string & getTagStr() const
get tag assigned to this object in string format
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
GNENet * myNet
pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
An Element which don't belongs to GNENet but has influency in the simulation.
GNEDataSet * getDataSetParent() const
Returns a pointer to GNEDataSet parent.
const std::map< SumoXMLTag, GNEDataSet::AttributeColors > & getSpecificAttributeColors() const
specific attribute colors
const std::string & getID() const
get ID
void updateAttributeColors()
update attribute colors deprecated
A road/street connecting two junctions (netedit-version)
NBEdge * getNBEdge() const
returns the internal NBEdge
static void drawDottedContourEdge(const GUIDottedGeometry::DottedContourType type, const GUIVisualizationSettings &s, const GNEEdge *edge, const bool drawFrontExtreme, const bool drawBackExtreme)
draw dotted contour for the given dottedGeometries
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 writed into XML (by default true, can be reimplemented in ch...
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration asociated with this GLObject
GNELane * getLastPathLane() const
get last path lane
double getAttributeDouble(SumoXMLAttr key) const
std::string getAttribute(SumoXMLAttr key) const
void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform data set changes
bool isAttributeEnabled(SumoXMLAttr key) const
void toogleAttribute(SumoXMLAttr key, const bool value, const int previousParameters)
method for enable or disable the attribute and nothing else (used in GNEChange_EnableAttribute)
const RGBColor & getColor() const
get edge rel data color
void fixGenericDataProblem()
fix data set problem (by default throw an exception, has to be reimplemented in children)
void drawPartialGL(const GUIVisualizationSettings &s, const GNELane *lane, const GNEPathManager::Segment *segment, const double offsetFront) const
Draws partial object (lane)
void computePathElement()
compute pathElement
void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)
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.
~GNEEdgeRelData()
Destructor.
void writeGenericData(OutputDevice &device) const
writte data set element into a xml file
GNEEdgeRelData(GNEDataInterval *dataIntervalParent, GNEEdge *fromEdge, GNEEdge *toEdge, const std::map< std::string, std::string > ¶meters)
Constructor.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
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 belongs to GNENet but has influency in the simulation.
void drawFilteredAttribute(const GUIVisualizationSettings &s, const PositionVector &laneShape, const std::string &attribute) const
draw filtered attribute
GNEDataInterval * myDataIntervalParent
dataInterval Parent
bool isVisibleInspectDeleteSelect() const
check if attribute is visible in inspect, delete or select mode
const std::string & getID() const
get ID
void replaceFirstParentEdge(const std::string &value)
replace the first parent edge
void replaceLastParentEdge(const std::string &value)
replace the last parent edge
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given tolane
const GUIGeometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
const double halfWidth
Draw as a normal lane, and reduce width to make sure that a selected edge can still be seen.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getLaneShape() const
get elements shape
const GNELane2laneConnection & getLane2laneConnections() const
get Lane2laneConnection struct
int getIndex() const
returns the index of the lane
const std::vector< double > & getShapeRotations() const
get rotations of the single shape parts
const std::vector< double > & getShapeLengths() const
get lengths of the single shape parts
GNEEdge * getParentEdge() const
get arent edge
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEPathManager * getPathManager()
get path manager
GNEViewNet * getViewNet() const
get view net
void calculateConsecutivePathEdges(PathElement *pathElement, SUMOVehicleClass vClass, const std::vector< GNEEdge * > edges)
calculate consecutive path edges
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void changeAttribute(GNEChange_Attribute *change)
special method for change attributes, avoid empty changes, always execute
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
GNEViewParent * getViewParent() const
get the net object
bool isAttributeCarrierInspected(const GNEAttributeCarrier *AC) const
check if attribute carrier is being inspected
GNEEdgeRelDataFrame * getEdgeRelDataFrame() const
get frame for DATA_EDGERELDATA
class for pack all variables related with GUIDottedGeometry color
void reset()
rest Dotted Geometry Color
void drawDottedGeometry(DottedGeometryColor &dottedGeometryColor, GUIDottedGeometry::DottedContourType type, const double customWidth=-1) const
draw inspected dottedShape
void moveShapeToSide(const double value)
move shape to side
void invertOffset()
invert offset of all segments
static void drawLaneGeometry(const GUIVisualizationSettings &s, const Position &mousePos, const PositionVector &shape, const std::vector< double > &rotations, const std::vector< double > &lengths, const std::vector< RGBColor > &colors, double width, const bool onlyContour=false)
draw lane geometry (use their own function due colors)
static void drawContourGeometry(const GUIGeometry &geometry, const double width, const bool drawExtremes=false)
draw contour geometry
const PositionVector & getShape() const
The shape of the additional element.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GUIGlID getGlID() const
Returns the numerical id of the object.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
Stores the information about how to visualize structures.
GUIVisualizationSizeSettings addSize
GUIVisualizationColorSettings colorSettings
color settings
double getLaneWidth() const
Returns the default width of lanes of this edge.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static bool areParametersValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
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.
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".
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
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
DataEditMode dataEditMode
the current Data edit mode
bool isCurrentSupermodeData() const
@check if current supermode is Data
static void drawLockIcon(const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position viewPosition, 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
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values