40 setParent<GNEEdge*>(edge);
41 setParent<GNEAdditional*>(rerouterParent);
126 for (
const auto& lane :
getParentEdges().front()->getChildLanes()) {
133 symbolGeometry.
updateGeometry(lane->getLaneShape(), lane->getLaneShape().length2D() - 6, 0);
256 const double exaggeration)
const {
273 glTranslated(symbolGeometry.getShape().front().x(), symbolGeometry.getShape().front().y(), 0);
277 glScaled(exaggeration, exaggeration, 1);
281 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
282 glBegin(GL_TRIANGLES);
284 glVertex2d(0 - 1.4, 0);
285 glVertex2d(0 - 1.4, 6);
286 glVertex2d(0 + 1.4, 6);
287 glVertex2d(0 + 1.4, 0);
288 glVertex2d(0 - 1.4, 0);
289 glVertex2d(0 + 1.4, 6);
@ NETWORK_MOVE
mode for moving network elements
@ SVC_PEDESTRIAN
pedestrian
@ GNE_TAG_REROUTER_SYMBOL
Rerouter Symbol.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void pushMatrix()
push matrix
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, const int align=0, double width=-1)
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
double getCommonAttributeDouble(SumoXMLAttr key) const
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
PositionVector getCommonAttributePositionVector(SumoXMLAttr key) const
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Position getCommonAttributePosition(SumoXMLAttr key) const
GNENet * myNet
pointer to net
bool isCommonAttributeValid(SumoXMLAttr key, const std::string &value) const
std::string getCommonAttribute(SumoXMLAttr key) const
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const GNEHierarchicalContainerParents< GNEEdge * > & getParentEdges() const
get parent edges
A NBNetBuilder extended by visualisation and editing capabilities.
GNEViewNet * getViewNet() const
get view net
std::string getHierarchyName() const override
get Hierarchy Name (Used in AC Hierarchy)
std::string getAttribute(SumoXMLAttr key) const override
std::string getParentName() const
Returns the name (ID) of the parent object.
std::vector< GUIGeometry > mySymbolGeometries
symbols geometries
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
PositionVector getAttributePositionVector(SumoXMLAttr key) const override
Parameterised * getParameters() override
get parameters associated with this rerouterSymbol
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
void drawRerouterSymbol(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration) const
draw rerouter symbol
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
void updateGeometry() override
update pre-computed geometry information
Position getAttributePosition(SumoXMLAttr key) const override
~GNERerouterSymbol()
Destructor.
bool checkDrawMoveContour() const override
check if draw move contour (red)
std::string getAdditionalProblem() const
return a string with the current additional problem (must be reimplemented in all detector children)
bool isAdditionalValid() const
check if current additional is valid to be written into XML (must be reimplemented in all detector ch...
bool isValid(SumoXMLAttr key, const std::string &value) override
double getAttributeDouble(SumoXMLAttr key) const override
GNERerouterSymbol(GNENet *net)
default Constructor
std::vector< GNEContour * > * mySymbolContours
symbol contours
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this rerouterSymbol
void fixAdditionalProblem()
fix additional problem (must be reimplemented in all detector children)
std::string getPopUpID() const override
get PopPup ID (Used in AC Hierarchy)
Position getPositionInView() const
Returns position of additional in view.
const GUIGlObject * getGUIGlObjectFront() const
get front GUIGLObject or a pointer to nullptr
bool isCurrentlyMovingElements() const
check if an element is being moved
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
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.
Stores the information about how to visualize structures.
GUIVisualizationSizeSettings addSize
bool checkDrawAdditional(Detail d, const bool selected) const
check if draw additionals
Detail getDetailLevel(const double exaggeration) const
return the detail level
GUIVisualizationColorSettings colorSettings
color settings
GUIVisualizationDottedContourSettings dottedContourSettings
dotted contour settings
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
The representation of a single edge during network building.
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
Static storage of an output device and its base (abstract) implementation.
An upper class for objects with additional parameters.
A point in 2D or 3D with translation and scaling methods.
Position getPolygonCenter() const
Returns the arithmetic of all corner points.
static const RGBColor BLACK
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
bool showAdditionals() const
check if additionals has to be drawn
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
static const RGBColor connectionColor
connection color
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
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