58 #ifdef CHECK_MEMORY_LEAKS 141 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
145 glScaled(exaggeration, exaggeration, 1);
155 glVertex2d(-1.7, .5);
156 glVertex2d(-1.7, -.5);
157 glVertex2d(1.7, -.5);
162 glTranslated(1.5, 0, 0);
167 glTranslated(-3, 0, 0);
178 if (s.
scale * exaggeration >= 10) {
SUMOReal getExaggeration(const GUIVisualizationSettings &s, SUMOReal factor=20) const
return the drawing size including exaggeration and constantSize values
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Position getPositionInView() const
Returns position of detector Entry in view.
void changeLane(GNELane *newLane)
change lane of detector
GUIVisualizationTextSettings addName
Stores the information about how to visualize structures.
bool isAdditionalSelected() const
static void drawBoxLine(const Position &beg, SUMOReal rot, SUMOReal visLength, SUMOReal width, SUMOReal offset=0)
Draws a thick line.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
~GNEDetectorEntry()
destructor
void updateGeometry()
update pre-computed geometry information
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SUMOReal x() const
Returns the x-position.
GUIGlID getGlID() const
Returns the numerical id of the object.
static void drawTriangleAtEnd(const Position &p1, const Position &p2, SUMOReal tLength, SUMOReal tWidth)
Draws a triangle at the end of the given line.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
unsigned char blue() const
Returns the blue-amount of the color.
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
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
std::vector< SUMOReal > myShapeLengths
The lengths of the shape parts.
const std::string & getAdditionalID() const
returns the ID of additional
std::string getAttribute(SumoXMLAttr key) const
void drawDetectorIcon(const int GNELogoID, SUMOReal sizex=0.5, SUMOReal sizey=0.5) const
SUMOReal getLaneParametricLenght() const
returns the parameteric length of the lane
SUMOReal getPositionRelativeToParametricLenght(SUMOReal position) const
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)
Position myDetectorLogoOffset
The position of detector.
friend class GNEChange_Attribute
declare friend class
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
void drawLockIcon(SUMOReal size=0.5) const
draw lock icon
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file
void setAdditionalID(const std::string &id)
set the ID of additional
const std::string getID() const
function to support debugging
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
draw name of item
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
bool isValid(SumoXMLAttr key, const std::string &value)
std::string getAttribute(SumoXMLAttr key) const
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
const PositionVector & getShape() const
returns the shape of the lane
GNEAdditionalSet * myAdditionalSetParent
pointer to additional set parent, if belong to set
virtual void updateGeometry()=0
update pre-computed geometry information
RGBColor myBaseColor
base color (Default green)
GNELane * myLane
The lane this detector belongs.
std::vector< SUMOReal > myShapeRotations
GNENet * getNet() const
get the net object
Position getLineCenter() const
get line center
SumoXMLTag getTag() const
get Tag assigned to this object
Static storage of an output device and its base (abstract) implementation.
Position myPosition
The position in which this additional element is located.
unsigned char green() const
Returns the green-amount of the color.
bool closeTag()
Closes the most recently opened tag.
static GUIGlID getGif(GUITexture which)
returns a texture Gif previously defined in the enum GUITexture
unsigned char red() const
Returns the red-amount of the color.
GNEDetectorEntry(const std::string &id, GNEViewNet *viewNet, GNELane *lane, SUMOReal pos, GNEDetectorE3 *parent, bool blocked=false)
Constructor.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Position myBlockIconPosition
position of the block icon