135 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
139 glScaled(exaggeration, exaggeration, 1);
149 glVertex2d(-1.7, .5);
150 glVertex2d(-1.7, -.5);
151 glVertex2d(1.7, -.5);
156 glTranslated(1.5, 0, 0);
161 glTranslated(-3, 0, 0);
172 if (s.
scale * exaggeration >= 10) {
180 glTranslated(1.9, 0, 0);
188 glTranslated(1.7, 0, 0);
190 glRotated(90, 0, 0, 1);
260 return canParse<double>(value);
262 return canParse<bool>(value);
264 return canParse<bool>(value);
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
double scale
information about a lane's width (temporary, used for a single view)
GUIVisualizationTextSettings addName
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
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 ...
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
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)
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
void changeAdditionalID(const std::string &newID)
change ID of additional
GNEDetectorExit(GNEViewNet *viewNet, GNEDetectorE3 *parent, GNELane *lane, double pos, bool friendlyPos)
Constructor.
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.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationSizeSettings addSize
GNEAdditional * myAdditionalParent
pointer to Addititional parent
static const RGBColor selectedAdditionalColor
color of selected additionals
double getLaneParametricLength() const
returns the parameteric length of the lane
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.
PositionVector myShape
The shape of the additional element.
A point in 2D or 3D with translation and scaling methods.
~GNEDetectorExit()
destructor
friend class GNEChange_Attribute
declare friend class
block movement of a graphic element
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
bool myFriendlyPosition
Flag for friendly position.
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) ...
double length() const
Returns the length.
bool isDetectorPositionFixed() const
check if Position of detector is fixed
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void setBlockIconRotation(GNELane *additionalLane=NULL)
GNELane * myLane
The lane in which this detector is placed.
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 storage of an output device and its base (abstract) implementation.
static const RGBColor SUMO_color_E3Exit
bool closeTag()
Closes the most recently opened tag.
void changeAdditionalParent(const std::string &newAdditionalParentID)
change additional parent of additional
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
bool isAdditionalSelected() const
virtual void updateGeometry()=0
update pre-computed geometry information
parent of an additional element
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
void updateGeometry()
update pre-computed geometry information
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 getAbsolutePositionOverLane() const
get absolute position over Lane
double myBlockIconRotation
The rotation of the block icon.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
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