146 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
150 glScaled(exaggeration, exaggeration, 1);
160 glVertex2d(-1.7, .5);
161 glVertex2d(-1.7, -.5);
162 glVertex2d(1.7, -.5);
167 glTranslated(1.5, 0, 0);
172 glTranslated(-3, 0, 0);
183 if (s.
scale * exaggeration >= 10) {
191 glTranslated(1.9, 0, 0);
199 glTranslated(1.7, 0, 0);
201 glRotated(90, 0, 0, 1);
278 return canParse<double>(value);
280 return canParse<bool>(value);
282 return canParse<bool>(value);
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
void setBlockIconRotation()
bool isDetectorPositionFixed() const
check if Position of detector is fixed
double scale
information about a lane's width (temporary, used for a single view)
GUIVisualizationTextSettings addName
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
double x() const
Returns the x-position.
GNELane * myLane
The lane this additional belongs.
Stores the information about how to visualize structures.
bool isAdditionalSelected() const
GNEDetectorE3 * getE3Parent() const
get E3 Detector parent
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void updateGeometryByParent()
update pre-computed geometry information called by E3 parent
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< double > myShapeRotations
GUIGlID getGlID() const
Returns the numerical id of the object.
GNEDetectorExit(GNEViewNet *viewNet, GNEDetectorE3 *parent, GNELane *lane, double pos, bool friendlyPos)
Constructor.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
static bool isValidID(const std::string &value)
true if value is a valid sumo ID
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
static const RGBColor selectedAdditionalColor
color of selected additionals
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
const std::string & getAdditionalID() const
returns the ID of additional
void updateGeometry()
update pre-computed geometry information
void refreshAdditional(GNEAdditional *additional)
refreshes boundary information of an additional after a geometry update
PositionVector myShape
The shape of the additional element.
A point in 2D or 3D with translation and scaling methods.
~GNEDetectorExit()
destructor
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
GNELane * retrieveLane(const std::string &id, bool failHard=true)
get lane by id
friend class GNEChange_Attribute
declare friend class
double y() const
Returns the y-position.
block movement of a graphic element
double length() const
Returns the length.
std::vector< double > myShapeLengths
The lengths of the shape parts.
double getAbsolutePositionOverLane() const
get absolute position over Lane
void setAdditionalID(const std::string &id)
set the ID of additional
void drawLockIcon(double size=0.5) const
draw lock icon
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
bool myFriendlyPosition
Flag for friendly position.
void changeLane(const std::string &laneID)
change lane of additional
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in allGNEAttributeCarrier.
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
const PositionVector & getShape() const
returns the shape of the lane
bool myBlocked
boolean to check if additional element is blocked (i.e. cannot be moved with mouse) ...
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
GNENet * getNet() const
get the net object
Position getLineCenter() const
get line center
SumoXMLTag getTag() const
get XML Tag assigned to this object
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth)
Draws a triangle at the end of the given line.
Static storage of an output device and its base (abstract) implementation.
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in allGNEAttributeCarrier.
void writeAdditional(OutputDevice &device, bool volatileOptionsEnabled) const
writte additional element into a xml file
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
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)
draw Text with given parameters
GNEDetectorE3 * myE3Parent
pointer to E3 parent
void updateGeometry()
update pre-computed geometry information
double getLaneParametricLength() const
returns the parameteric length of the lane
double myBlockIconRotation
The rotation of the block icon.
double myPositionOverLane
position of detector over Lane
Position myBlockIconPosition
position of the block icon