65 myFrequency(frequency),
69 myRelativePositionY(0) {
102 Position s =
myShape[0] + Position(1, 0);
127 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
204 double width = (double) 2.0 * s.
scale;
219 glScaled(exaggeration, exaggeration, 1);
220 glTranslated(-1.6, -1.6, 0);
223 glVertex2d(0, -0.25);
227 glTranslated(0, 0, .01);
229 glVertex2d(0, 0.25 - .1);
230 glVertex2d(0, -0.25 + .1);
234 if (width * exaggeration > 1) {
240 glRotated(90, 0, 0, -1);
256 glRotated(-90, 0, 0, 1);
269 if (s.
scale * exaggeration >= 10) {
332 return canParse<double>(value) && (parse<double>(value) >= 0);
334 return canParse<double>(value) && (parse<double>(value) >= 0);
357 myBegin = parse<double>(value);
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
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
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
GNEEdge * myEdge
The edge in which this RouteProbe is placed.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
double scale
information about a lane's width (temporary, used for a single view)
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
GUIVisualizationTextSettings addName
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
static const RGBColor WHITE
double getBegin() const
get begin of RouteProbe
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
double x() const
Returns the x-position.
Stores the information about how to visualize structures.
void setFilename(const std::string &filename)
set filename of RouteProbe
bool isAdditionalSelected() const
double myFrequency
Frequency of RouteProbe.
weights: time range begin
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
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
int getRouteProbeRelativePosition(GNERouteProbe *routeProbe) const
obtain relative positions of RouteProbes
int myNumberOfLanes
number of lanes of edge (To improve efficiency)
int myRelativePositionY
relative position regarding to other route probes
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
GUIGlID getGlID() const
Returns the numerical id of the object.
void changeAdditionalID(const std::string &newID)
change ID of additional
GNERouteProbe(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, double frequency, const std::string &filename, double begin)
Constructor.
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
const std::string & getFilename() const
get filename of RouteProbe
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
void writeAdditional(OutputDevice &device) const
writte additional element into a xml file
double getFrequency() const
get frequency of RouteProbe
static const RGBColor selectedAdditionalColor
color of selected additionals
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
const std::string & getAdditionalID() const
returns Additional ID
PositionVector myShape
The shape of the additional element.
A point in 2D or 3D with translation and scaling methods.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
friend class GNEChange_Attribute
declare friend class
double y() const
Returns the y-position.
std::vector< double > myShapeLengths
The lengths of the shape parts.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
const std::string getID() const
function to support debugging
void drawLockIcon(double size=0.5) const
draw lock icon
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in all GNEAttributeCarriers.
Position getPositionInView() const
Returns position of additional in view.
Position myBlockIconOffset
The offSet of the block icon.
A road/street connecting two junctions (netedit-version)
const PositionVector & getShape() const
returns the shape of the lane
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
GNEEdge * changeEdge(GNEEdge *oldEdge, const std::string &newEdgeID)
change edge of additional
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
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)
void setBlockIconRotation(GNELane *additionalLane=NULL)
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void updateGeometry()
update pre-computed geometry information
GNENet * getNet() const
get the net object
double myBegin
begin of rerouter
Position getLineCenter() const
get line center
~GNERouteProbe()
Destructor.
SumoXMLTag getTag() const
get XML Tag assigned to this object
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
static const RGBColor selectionColor
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
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