67 myFrequency(frequency),
71 myRelativePosition(0) {
112 Position s =
myShape[0] + Position(1, 0);
137 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
214 double width = (double) 2.0 * s.
scale;
219 glColor3ub(255, 216, 0);
224 glScaled(exaggeration, exaggeration, 1);
225 glTranslated(-1.6, -1.6, 0);
228 glVertex2d(0, -0.25);
232 glTranslated(0, 0, .01);
234 glVertex2d(0, 0.25 - .1);
235 glVertex2d(0, -0.25 + .1);
239 if (width * exaggeration > 1) {
240 glRotated(90, 0, 0, -1);
257 glRotated(-90, 0, 0, 1);
270 if (s.
scale * exaggeration >= 10) {
338 return (canParse<double>(value) && (parse<double>(value) >= 0));
340 return (canParse<double>(value) && (parse<double>(value) >= 0));
363 myBegin = parse<double>(value);
int myRelativePosition
relative position regarding to other route probes
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
const std::string & getParentName() const
Returns the name of the parent object (if any)
double scale
information about a lane's width (temporary, used for a single view)
void commmitAdditionalGeometryMoved(double, double, GNEUndoList *)
updated geometry changes in the attributes of additional
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 moveAdditionalGeometry(double, double)
change the position of the RouteProbe geometry
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.
double myFrequency
Frequency of RouteProbe.
double x() const
Returns the x-position.
weights: time range begin
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
std::string myFilename
filename of RouteProbe
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void setBegin(double begin)
set begin of RouteProbe
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
int myNumberOfLanes
number of lanes of edge (To improve efficiency)
static bool isValidFilename(const std::string &value)
true if value is a valid file value
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
std::vector< double > myShapeRotations
GNERouteProbe(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, double frequency, const std::string &filename, double begin)
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
std::string getFilename() const
get filename of RouteProbe
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 changeEdge(const std::string &edgeID)
change edge of additional
bool myMovable
boolean to check if additional element is movable (with the mouse). By default true ...
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.
void setBlockIconRotation(GNELane *lane=NULL)
set Rotation of block Icon
friend class GNEChange_Attribute
declare friend class
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
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
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
double getFrequency() const
get frequency of RouteProbe
void setAdditionalID(const std::string &id)
set the ID of additional
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::string getID() const
function to support debugging
std::string getAttribute(SumoXMLAttr key) const
Position myBlockIconOffset
The offSet of the block icon.
A road/street connecting two junctions (netedit-version)
int getRouteProbeRelativePosition(GNERouteProbe *routeProbe) const
obtain relative positions of RouteProbes
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.
double getBegin() const
get begin of RouteProbe
void setFilename(std::string filename)
set filename of RouteProbe
void updateGeometry()
update pre-computed geometry information
double myBegin
begin of rerouter
GNENet * getNet() const
get the net object
GUIGlID getGlID() const
Returns the numerical id of the object.
~GNERouteProbe()
Destructor.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
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.
bool isAdditionalSelected() const
GNEEdge * myEdge
The edge this additional belongs.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Position getPositionInView() const
Returns position of RouteProbe in view.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Position myBlockIconPosition
position of the block icon
void setFrequency(double frequency)
set frequency of RouteProbe
SumoXMLTag getTag() const
get XML Tag assigned to this object