43 GNEDetector(parent, entryExitTag, 0,
"",
"", parameters),
114 if (
myNet->getViewNet()->getDataViewOptions().showAdditionals() &&
115 !
myNet->getViewNet()->selectingDetectorsTLSMode()) {
138 drawBody(d, color, entryExitExaggeration);
147 entryExitExaggeration);
208 const RGBColor& color,
const double exaggeration)
const {
216 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
222 glScaled(exaggeration, exaggeration, 1);
231 glVertex2d(-1.7, .5);
232 glVertex2d(-1.7, -.5);
233 glVertex2d(1.7, -.5);
237 glTranslated(1.5, 0, 0);
241 glTranslated(-3, 0, 0);
247 glVertex2d(-1.7, 4.3);
248 glVertex2d(-1.7, -.5);
249 glVertex2d(1.7, -.5);
250 glVertex2d(1.7, 4.3);
261 const RGBColor& color,
const double exaggeration)
const {
273 glTranslated(1.9, 0, 0);
275 glScaled(exaggeration, exaggeration, 1);
277 glTranslated(1.7, 0, 0);
279 glRotated(90, 0, 0, 1);
298 const RGBColor& color,
const double exaggeration)
const {
310 glTranslated(1.9, 0, 0);
312 glScaled(exaggeration, exaggeration, 1);
@ GLO_DET_ENTRY
a DetEntry detector
const std::string invalid_return< std::string >::value
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_PARENT
parent of an additional element
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 void popMatrix()
pop matrix
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
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)
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
void replaceAdditionalParent(SumoXMLTag tag, const std::string &value, const int parentIndex)
replace additional parent
GNEContour myAdditionalContour
variable used for draw additional contours
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
void replaceAdditionalParentLanes(const std::string &value)
replace additional parent lanes
void drawAdditionalName(const GUIVisualizationSettings &s) const
draw additional name
void writeAdditionalAttributes(OutputDevice &device) const
write common additional attributes
GNEAdditional(const std::string &id, GNENet *net, const std::string &filename, SumoXMLTag tag, const std::string &additionalName)
Constructor.
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
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
void drawInLayer(const double typeOrLayer, const double extraOffset=0) const
draw element in the given layer, or in front if corresponding flag is enabled
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * myNet
pointer to net
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
Position getDetectorAttributePosition(SumoXMLAttr key) const
bool isDetectorValid(SumoXMLAttr key, const std::string &value)
void setDetectorAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
double getDetectorAttributeDouble(SumoXMLAttr key) const
GNEDetector(GNENet *net, SumoXMLTag tag)
Default constructor.
void writeDetectorValues(OutputDevice &device) const
write additional element into a xml file
void updateCenteringBoundary(const bool updateGrid) override
update centering boundary (implies change in RTREE)
std::string getDetectorAttribute(SumoXMLAttr key) const
void updateGeometry() override
update pre-computed geometry information
GNEMoveElement * getMoveElement() const override
methods to retrieve the elements linked to this GNEAdditional
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
bool isAdditionalValid() const override
check if current additional is valid to be written into XML
Position getAttributePosition(SumoXMLAttr key) const override
bool myFriendlyPos
friendly position
void writeAdditional(OutputDevice &device) const override
write additional element into a xml file
void drawBody(const GUIVisualizationSettings::Detail d, const RGBColor &color, const double exaggeration) const
draw body
GNEMoveElementLaneSingle * myMoveElementLaneSingle
move element lane single
std::string getAttribute(SumoXMLAttr key) const override
double myPosOverLane
position over lane
double getAttributeDouble(SumoXMLAttr key) const override
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList) override
~GNEEntryExitDetector()
destructor
void fixAdditionalProblem() override
fix additional problem
bool isValid(SumoXMLAttr key, const std::string &value) override
void drawE3Logo(const GUIVisualizationSettings::Detail d, const RGBColor &color, const double exaggeration) const
draw E3 logo
void drawEntryLogo(const GUIVisualizationSettings::Detail d, const RGBColor &color, const double exaggeration) const
draw entry logo
std::string getAdditionalProblem() const override
return a string with the current additional problem
GNEEntryExitDetector(SumoXMLTag entryExitTag, GNENet *net)
default Constructor
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
void setParent(ParentType parent)
edit parent and childrens without maintain integrity (use carefully)
const GNEHierarchicalContainerParents< GNELane * > & getParentLanes() const
get parent lanes
A NBNetBuilder extended by visualisation and editing capabilities.
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Stores the information about how to visualize structures.
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.
GUIVisualizationDetectorSettings detectorSettings
Detector settings.
Static storage of an output device and its base (abstract) implementation.
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.
std::map< std::string, std::string > Map
parameters map
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
A point in 2D or 3D with translation and scaling methods.
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 connectionColor
connection color
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
static const RGBColor E3ExitColor
color for Exits
static const RGBColor E3EntryColor
color for Entrys
static const double segmentWidth
width of dotted contour segments