57 GNEDetector(parent, viewNet,
GLO_DET_EXIT,
SUMO_TAG_DET_EXIT, lane, pos, 0,
"",
"", friendlyPos, blockMovement) {
127 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
131 glScaled(exaggeration, exaggeration, 1);
141 glVertex2d(-1.7, .5);
142 glVertex2d(-1.7, -.5);
143 glVertex2d(1.7, -.5);
150 glTranslated(1.5, 0, 0);
155 glTranslated(-3, 0, 0);
167 if (((s.
scale * exaggeration) >= 10)) {
175 glTranslated(1.9, 0, 0);
186 glTranslated(1.7, 0, 0);
188 glRotated(90, 0, 0, 1);
273 return canParse<double>(value);
275 return canParse<bool>(value);
277 return canParse<bool>(value);
281 return canParse<bool>(value);
311 if (parse<bool>(value)) {
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
const GNEAttributeCarrier * getACUnderCursor() const
get AttributeCarrier under cursor
double scale
information about a lane's width (temporary, used for a single view)
void setBlockIconRotation(GNELane *additionalLane=nullptr)
GUIVisualizationTextSettings addName
void updateGeometry(bool updateGrid)
update pre-computed geometry information
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
returns Additional ID
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
void changeFirstAdditionalParent(const std::string &newAdditionalParentID)
change first additional parent of additional
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
double x() const
Returns the x-position.
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, int align=0, double width=-1)
GNEDetectorExit(GNEViewNet *viewNet, GNEAdditional *parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Constructor.
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< double > myShapeRotations
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
Position getLineCenter() const
get line center
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationSizeSettings addSize
static const RGBColor selectedAdditionalColor
color of selected additionals
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void drawLockIcon(double size=0.5) const
draw lock icon
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
GNEEdge & getParentEdge()
Returns underlying parent edge.
PositionVector myShape
The shape of the additional element.
A point in 2D or 3D with translation and scaling methods.
~GNEDetectorExit()
destructor
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
block movement of a graphic element
double getLengthGeometryFactor() const
get lenght geometry factor
std::vector< double > myShapeLengths
The lengths of the shape parts.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
const std::string getID() const
function to support debugging
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
virtual void updateGeometry(bool updateGrid)=0
update pre-computed geometry information
bool myFriendlyPosition
Flag for friendly position.
double getFinalLength() const
get length that will be assigned to the lanes in the final network
bool myBlockMovement
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
const PositionVector & getShape() const
returns the shape of the lane
bool isDetectorPositionFixed() const
check if Position of detector is fixed
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
static void drawShapeDottedContour(const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
An Element which don't belongs to GNENet but has influency in the simulation.
GNELane * myLane
The lane in which this detector is placed.
std::string getGenericParametersStr() const
return generic parameters in string format
GNENet * getNet() const
get the net object
GUIGlID getGlID() const
Returns the numerical id of the object.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth)
Draws a triangle at the end of the given line.
static const RGBColor SUMO_color_E3Exit
color for Exits
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
parent of an additional element
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
NBEdge * getNBEdge()
returns the internal NBEdge
std::string getAttribute(SumoXMLAttr key) const
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
double myBlockIconRotation
The rotation of the block icon.
GNEAdditional * myFirstAdditionalParent
pointer to first Addititional parent
GNELane * changeLane(GNELane *oldLane, const std::string &newLaneID)
change lane of additional
double myPositionOverLane
position of detector over Lane
Position myBlockIconPosition
position of the block icon
SumoXMLTag getTag() const
get XML Tag assigned to this object