60 #ifdef CHECK_MEMORY_LEAKS 71 myFrequency(frequency),
114 Position s =
myShape[0] + Position(1, 0);
136 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
224 glColor3ub(255, 216, 0);
229 glScaled(exaggeration, exaggeration, 1);
230 glTranslated(-1.6, -1.6, 0);
233 glVertex2d(0, -0.25);
237 glTranslated(0, 0, .01);
239 glVertex2d(0, 0.25 - .1);
240 glVertex2d(0, -0.25 + .1);
244 if (width * exaggeration > 1) {
245 glRotated(90, 0, 0, -1);
260 glTranslated(-2.56, - 1.6, 0);
262 glRotated(-90, 0, 0, 1);
275 if (s.
scale * exaggeration >= 10) {
343 return canParse<int>(value);
345 return canParse<int>(value);
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
GNEEdge * myEdge
edge of routeProbe
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
void removeEdgeReference()
remove reference to edge
GUIVisualizationTextSettings addName
virtual void centerTo(GUIGlID id, bool applyZoom, SUMOReal zoomDist=20)
centers to the chosen artifact
void writeAdditional(OutputDevice &device, const std::string &)
writte additional element into a xml file
Stores the information about how to visualize structures.
int getFrequency() const
get frequency of RouteProbe
void setBegin(int begin)
set begin of RouteProbe
bool isAdditionalSelected() const
std::string myFilename
filename of RouteProbe
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
bool addAdditional(GNEAdditional *additional)
add additional to this edge
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
SUMOReal x() const
Returns the x-position.
GUIGlID getGlID() const
Returns the numerical id of the object.
GNERouteProbe(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, int frequency, const std::string &filename, int begin, bool blocked)
Constructor.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
bool removeAdditional(GNEAdditional *additional)
remove additional from this edge
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
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.
int getBegin() const
get begin of RouteProbe
static bool isValidFileValue(const std::string &value)
true if value is a valid file value
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
std::vector< SUMOReal > myShapeLengths
The lengths of the shape parts.
bool myMovable
boolean to check if additional element is movable (with the mouse). By default true ...
const std::string & getAdditionalID() const
returns the ID of additional
GNEEdge * getEdge() const
get edge in which the RouteProbe is placed
PositionVector myShape
The shape of the additional element.
A point in 2D or 3D with translation and scaling methods.
void setBlockIconRotation(GNELane *lane=NULL)
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
bool isValid(SumoXMLAttr key, const std::string &value)
int numberOfLanes
number of lanes of edge (To improve efficiency)
void setAdditionalID(const std::string &id)
set the ID of additional
std::string getFilename() const
get filename of RouteProbe
const std::string getID() const
function to support debugging
std::string getAttribute(SumoXMLAttr key) const
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)
Position getPositionInView() const
Returns position of RouteProbe in view.
int myBegin
begin of rerouter
Position myBlockIconOffset
The offSet of the block icon.
A road/street connecting two junctions (netedit-version)
void moveAdditional(SUMOReal, SUMOReal, GNEUndoList *)
change the position of the RouteProbe geometry
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
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getParentName() const
Returns the name of the parent object (if any)
SUMOReal y() const
Returns the y-position.
void setFilename(std::string filename)
set filename of RouteProbe
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::vector< SUMOReal > myShapeRotations
void updateGeometry()
update pre-computed geometry information
GNENet * getNet() const
get the net object
Position getLineCenter() const
get line center
~GNERouteProbe()
Destructor.
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.
bool closeTag()
Closes the most recently opened tag.
static GUIGlID getGif(GUITexture which)
returns a texture Gif previously defined in the enum GUITexture
static void drawTexturedBox(int which, SUMOReal size)
Draws a named texture as a box with the given size.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
void setFrequency(int frequency)
set frequency of RouteProbe
Position myBlockIconPosition
position of the block icon
int myFrequency
Frequency of RouteProbe.