53{}, {}, {}, {fromTAZ, toTAZ}, {}, {}),
61{}, {}, {}, {
TAZ}, {}, {}),
86 switch (activeScheme) {
122 }
else if (TAZRelDataFrame->shown()) {
156 for (
int i = 0; i <= 8; ++i) {
163 ring.push_back(line.back());
227 device.
writeAttr(attribute.first, attribute.second);
276 if (onlyDrawContour) {
291 1.5 + width, 1.5 + width, 0.5 + width);
311 switch (activeScheme) {
429 return canParse<bool>(value);
528 if (parse<bool>(value)) {
DataEditMode
enum for data edit modes
@ DATA_SELECT
mode for selecting data elements
@ DATA_INSPECT
mode for inspecting data elements
@ DATA_DELETE
mode for deleting data elements
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
GUIIcon
An enumeration of icons used by the gui applications.
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_TAZREL
a relation between two TAZs
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_SELECTED
element is selected
@ 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.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Boundary & grow(double by)
extends the boundary by the given amount
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth, const double extraOffset=0)
Draws a triangle at the end of the given line.
static int angleLookup(double angleDeg)
normalize angle for lookup in myCircleCoords
static void popMatrix()
pop matrix
static void drawBoundary(const GUIVisualizationSettings &s, const Boundary &b)
Draw a boundary (used for debugging)
static const std::vector< std::pair< double, double > > & getCircleCoords()
Storage for precomputed sin/cos-values describing a circle.
static void pushMatrix()
push matrix
An Element which don't belong to GNENet but has influence in the simulation.
virtual Position getAttributePosition(SumoXMLAttr key) const
const GUIGeometry & getAdditionalGeometry() const
obtain additional geometry
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
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
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
void calculateContourExtrudedShape(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const GUIGlObject *glObject, const PositionVector &shape, const double layer, const double extrusionWidth, const double scale, const bool closeFirstExtrem, const bool closeLastExtrem, const double offset) const
calculate contour extruded (used in elements formed by a central shape)
void 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...)
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.
void updateAttributeColors()
update attribute colors deprecated
std::string getFilteredAttribute() const
get filtered attribute
GNEDataSet * getDataSet() const
get current select data set ID
GNEDataInterval * getDataInterval() const
get current select data set ID
const AttributeSelector * getAttributeSelector() const
getattribute selector modul
const DataSetSelector * getDataSetSelector() const
get dataSet 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
void replaceParentTAZElement(const int index, const std::string &value)
replace the first parent TAZElement
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void addGLObjectIntoGrid(GNEAttributeCarrier *AC)
add GL Object into net
void removeGLObjectFromGrid(GNEAttributeCarrier *AC)
add GL Object into net
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEViewNet * getViewNet() const
get view net
bool isGenericDataValid() const
check if current data set is valid to be written into XML (by default true, can be reimplemented in c...
RGBColor setColor(const GUIVisualizationSettings &s) const
get TAZ rel data color
void writeGenericData(OutputDevice &device) const
write data set element into a xml file
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNEPathManager::Segment *segment, const double offsetFront) const
Draws partial object over lane.
Boundary getCenteringBoundary() const
GNEContour myTAZRelDataContour
variable used for draw contours
GUIGeometry myTAZRelGeometry
Geometry for TAZRel data.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform data set changes
GNETAZRelData(GNEDataInterval *dataIntervalParent, GNEAdditional *fromTAZ, GNEAdditional *toTAZ, const Parameterised::Map ¶meters)
Constructor for two TAZs.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNEPathManager::Segment *segment, const double offsetFront) const
Draws partial object over junction.
bool isGenericDataVisible() const
check if current TAZ rel data is visible
GNELane * getLastPathLane() const
get last path lane
std::string getGenericDataProblem() const
return a string with the current data set problem (by default empty, can be reimplemented in children...
std::string getAttribute(SumoXMLAttr key) const
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
void updateGeometry()
update pre-computed geometry information
Position getPositionInView() const
Returns element position in view.
GNELane * getFirstPathLane() const
get first path lane
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIGeometry myTAZRelGeometryCenter
Geometry for TAZRel data (center)
void fixGenericDataProblem()
fix data set problem (by default throw an exception, has to be reimplemented in children)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
bool drawTAZRel() const
check draw conditions
bool isAttributeEnabled(SumoXMLAttr key) const
double myLastWidth
TAZRel data width.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
double getAttributeDouble(SumoXMLAttr key) const
bool setFunctionalColor(int activeScheme, RGBColor &col) const
sets the color according to the current scheme index and some tazRel function
void computePathElement()
compute pathElement
~GNETAZRelData()
Destructor.
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
GNEViewNetHelper::IntervalBar & getIntervalBar()
get interval bar
GNEViewParent * getViewParent() const
get the net object
const std::vector< GNEAttributeCarrier * > & getInspectedAttributeCarriers() const
get inspected attribute carriers
GNETAZRelDataFrame * getTAZRelDataFrame() const
get frame for DATA_TAZRELDATA
static void drawGeometry(const GUIVisualizationSettings::Detail d, const GUIGeometry &geometry, const double width, double offset=0)
draw geometry
const PositionVector & getShape() const
The shape of the additional element.
void updateGeometry(const PositionVector &shape)
update entire geometry
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
T getColor(const double value) const
Stores the information about how to visualize structures.
static const double MISSING_DATA
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
bool drawForViewObjectsHandler
whether drawing is performed for the purpose of selecting objects in view using ViewObjectsHandler
double tazRelWidthExaggeration
The tazRelation exaggeration (upscale thickness)
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 Position INVALID
used to indicate that a position is valid
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimensions
double length() const
Returns the length.
void add(double xoff, double yoff, double zoff)
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
void move2side(double amount, double maxExtension=100)
move position vector to side using certain amount
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
void extrapolate(const double val, const bool onlyFirst=false, const bool onlyLast=false)
extrapolate position vector
Position getLineCenter() const
get line center
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
const RGBColor & getShapeColor() const
Returns the color of the Shape.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
bool TAZRelOnlyTo() const
check if toggle TAZRel only to checkbox is enabled
bool TAZRelOnlyFrom() const
check if toggle TAZRel only from checkbox is enabled
bool TAZRelDrawing() const
check if toggle TAZRel drawing checkbox is enabled
DataEditMode dataEditMode
the current Data edit mode
bool isCurrentSupermodeData() const
@check if current supermode is Data
RGBColor selectedEdgeDataColor
edge data selection color
static const double segmentWidth
width of dotted contour segments