51 setParents<GNEAdditional*>({fromTAZ, toTAZ});
60 setParent<GNEAdditional*>(
TAZ);
84 switch (activeScheme) {
113 switch (activeScheme) {
143 }
else if (TAZRelDataFrame->shown()) {
177 for (
int i = 0; i <= 8; ++i) {
184 ring.push_back(line.back());
248 device.
writeAttr(attribute.first, attribute.second);
298 if (onlyDrawContour) {
313 1.5 + width, 1.5 + width, 0.5 + width);
323 0.5, 1,
true,
true, 0,
nullptr,
nullptr);
327 0.5, 1,
true,
true, 0,
nullptr,
nullptr);
335 switch (activeScheme) {
505 inspectedElements.isInspectingSingleElement() && (inspectedElements.getFirstAC()->getTagProperty()->getTag() ==
SUMO_TAG_TAZ)) {
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_TAZ
Traffic Assignment Zones (TAZs)
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_TAZREL
a relation between two TAZs
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
@ GNE_ATTR_DATASET
data set of a generic data
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
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
double getCommonAttributeDouble(SumoXMLAttr key) const
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 isTemplate() const
check if this AC is template
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
virtual Position getAttributePosition(SumoXMLAttr key) const =0
GNENet * myNet
pointer to net
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
std::string getCommonAttribute(SumoXMLAttr key) const
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 GNESegment *segment, const GUIGlObject *boundaryParent, const bool addToSelectedObjects=true) const
calculate contour extruded (used in elements formed by a central shape)
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...)
GNEDataSet * getDataSetParent() const
Returns a pointer to GNEDataSet parent.
std::string getAttribute(SumoXMLAttr key) const override
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
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 GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
A NBNetBuilder extended by visualisation and editing capabilities.
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
GNETAZRelData(GNENet *net)
default Constructor
bool isValid(SumoXMLAttr key, const std::string &value) override
method for checking if the key and their conrrespond attribute are valids
void drawLanePartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over lane.
Boundary getCenteringBoundary() const
bool isGenericDataVisible() const override
check if current TAZ rel data is visible
GNEContour myTAZRelDataContour
variable used for draw contours
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
GUIGeometry myTAZRelGeometry
Geometry for TAZRel data.
void drawJunctionPartialGL(const GUIVisualizationSettings &s, const GNESegment *segment, const double offsetFront) const
Draws partial object over junction.
void updateGeometry() override
update pre-computed geometry information
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
std::string getAttribute(SumoXMLAttr key) const override
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...
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
method for setting the attribute and letting the object perform data set changes
double getScaleValue(const GUIVisualizationSettings &s, int activeScheme) const
double getColorValue(const GUIVisualizationSettings &s, int activeScheme) const
double getAttributeDouble(SumoXMLAttr key) const override
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)
bool drawTAZRel() const
check draw conditions
bool isAttributeEnabled(SumoXMLAttr key) const
double myLastWidth
TAZRel data width.
void writeGenericData(OutputDevice &device) const override
write data set element into a xml file
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
GNEViewNetHelper::InspectedElements & getInspectedElements()
get inspected elements
GNEViewNetHelper::IntervalBar & getIntervalBar()
get interval bar
GNEViewParent * getViewParent() const
get the net object
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
std::string relDataScaleAttr
key for scaling by edgeRelation / tazRelation attribute
GUIScaler dataScaler
The size scaling settings for data elements.
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.
bool hasParameter(const std::string &key) const
Returns whether the parameter is set.
std::map< std::string, std::string > Map
parameters map
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.
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, bool extrapolateBeyond=false) 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