145 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
149 glScaled(exaggeration, exaggeration, 1);
159 glVertex2d(-1.7, .5);
160 glVertex2d(-1.7, -.5);
161 glVertex2d(1.7, -.5);
166 glTranslated(1.5, 0, 0);
171 glTranslated(-3, 0, 0);
182 if (s.
scale * exaggeration >= 10) {
251 return canParse<bool>(value);
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
GNEDetectorE3 * myE3Parent
pointer to E3 parent
double scale
information about a lane's width (temporary, used for a single view)
GNEDetectorEntry(GNEViewNet *viewNet, GNEDetectorE3 *parent, GNELane *lane, double pos)
Constructor.
GUIVisualizationTextSettings addName
const std::string & getAdditionalID() const
returns the ID of additional
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
GNELane * myLane
The lane this additional belongs.
Stores the information about how to visualize structures.
double getPositionRelativeToParametricLength(double position) const
double x() const
Returns the x-position.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
unsigned char blue() const
Returns the blue-amount of the color.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
~GNEDetectorEntry()
destructor
void updateGeometry()
update pre-computed geometry information
std::vector< double > myShapeRotations
Position getLineCenter() const
get line center
GNEDetectorE3 * getE3Parent() const
get E3 Detector parent
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
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.
RGBColor myBaseColorSelected
base color selected (Default blue)
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GUIVisualizationSizeSettings addSize
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)
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.
GNELane * retrieveLane(const std::string &id, bool failHard=true)
get lane by id
void setBlockIconRotation(GNELane *lane=NULL)
set Rotation of block Icon
Position myDetectorLogoOffset
The position of detector.
friend class GNEChange_Attribute
declare friend class
block movement of a graphic element
Position getPositionInView() const
Returns position of detector Entry in view.
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
void setAdditionalID(const std::string &id)
set the ID of additional
void changeLane(const std::string &laneID)
change lane of additional
std::string getAttribute(SumoXMLAttr key) const
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void drawDetectorIcon(const int GNELogoID, double sizex=0.5, double sizey=0.5) const
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
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) ...
unsigned char green() const
Returns the green-amount of the color.
RGBColor myBaseColor
base color (Default green)
std::string getAttribute(SumoXMLAttr key) const
GNEDetectorE3 * myE3Parent
pointer to E3 parent (used by Entry/exits)
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
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
unsigned char red() const
Returns the red-amount of the color.
void updateGeometryByParent()
update pre-computed geometry information called by E3 parent
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.
Position myPosition
The position in which this additional element is located.
bool isAdditionalSelected() const
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Position myBlockIconPosition
position of the block icon
SumoXMLTag getTag() const
get XML Tag assigned to this object