 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
43 }, {}, {}, {}, {}, {}, {}, {}, {}, {}),
44 myFrequency(frequency),
47 myRelativePositionY(0) {
86 if (
getEdgeParents().front()->getLanes().front()->getGeometry().shape.length() < 0.5) {
87 return getEdgeParents().front()->getLanes().front()->getGeometry().shape.front();
92 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
124 const double width = (double) 2.0 * s.
scale;
126 const int numberOfLanes = int(
getEdgeParents().front()->getLanes().size());
141 glScaled(exaggeration, exaggeration, 1);
142 glTranslated(-1.6, -1.6, 0);
145 glVertex2d(0, -0.25);
146 glVertex2d((numberOfLanes * 3.3), -0.25);
147 glVertex2d((numberOfLanes * 3.3), 0.25);
149 glTranslated(0, 0, .01);
151 glVertex2d(0, 0.25 - .1);
152 glVertex2d(0, -0.25 + .1);
161 glRotated(90, 0, 0, -1);
164 glVertex2d(0, (numberOfLanes * 3.3));
177 glRotated(-90, 0, 0, 1);
283 return canParse<SUMOTime>(value);
286 return canParse<SUMOTime>(value);
288 return canParse<bool>(value);
316 myBegin = parse<SUMOTime>(value);
319 if (parse<bool>(value)) {
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
Position position
position of the block icon
SUMOTime myBegin
begin of rerouter
An Element which don't belongs to GNENet but has influency in the simulation.
Position getPositionInView() const
Returns position of additional in view.
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
PositionVector shape
The shape of the additional element.
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
void setRotation(GNELane *additionalLane=nullptr)
set Rotation of block Icon (must be called in updateGeometry() function)
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
void updateGeometry()
update pre-computed geometry information
std::vector< double > shapeRotations
The rotations of the single shape parts.
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
const std::vector< GNEEdge * > & getEdgeParents() const
get edge parents
double length() const
Returns the length.
void changeAdditionalID(const std::string &newID)
change ID of additional
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
BlockIcon myBlockIcon
variable BlockIcon
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
PositionVector shape
The shape of the netElement element.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
weights: time range begin
A road/street connecting two junctions (netedit-version)
GNERouteProbe(const std::string &id, GNEViewNet *viewNet, GNEEdge *edge, const std::string &frequency, const std::string &name, const std::string &filename, SUMOTime begin)
Constructor.
friend class GNEChange_Attribute
declare friend class
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
GNENet * getNet() const
get the net object
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
GUIVisualizationTextSettings addName
GUIVisualizationDetailSettings detailSettings
detail settings
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
std::string myFilename
filename of RouteProbe
void selectAttributeCarrier(bool changeFlag=true)
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
GUIGlID getGlID() const
Returns the numerical id of the object.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
A class that stores a 2D geometrical boundary.
static const RGBColor routeProbe
color for route probes
std::string getAttribute(SumoXMLAttr key) const
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
static void drawShapeDottedContourRectangle(const GUIVisualizationSettings &s, const int type, const Position ¢er, const double width, const double height, const double rotation=0, const double offsetX=0, const double offsetY=0)
draw a dotted contour around the given Position with certain width and height
double scale
information about a lane's width (temporary, used for a single view)
void clearGeometry()
reset geometry
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
std::string time2string(SUMOTime t)
std::string myAdditionalName
name of additional
~GNERouteProbe()
Destructor.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
static const double laneTextures
details for lane textures
const NetElementGeometry & getGeometry() const
std::string getParentName() const
Returns the name of the parent object (if any)
GUIVisualizationColorSettings colorSettings
color settings
RGBColor selectionColor
basic selection color
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void drawIcon(const GUIVisualizationSettings &s, const double exaggeration, const double size=0.5) const
draw lock icon
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
std::string myFrequency
Frequency of RouteProbe.
double y() const
Returns the y-position.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string getGenericParametersStr() const
return generic parameters in string format
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
int myRelativePositionY
relative position regarding to other route probes
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
AdditionalGeometry myGeometry
geometry to be precomputed in updateGeometry(...)
GUIVisualizationSizeSettings addSize
Boundary & grow(double by)
extends the boundary by the given amount
bool drawDetail(const double detail, const double exaggeration) const
check if details can be drawn for the given GUIVisualizationDetailSettings and current scale and exxa...
const std::string & getTagStr() const
get tag assigned to this object in string format
Stores the information about how to visualize structures.
Position getLineCenter() const
get line center
void changeEdgeParents(GNEShape *elementChild, const std::string &newEdgeIDs)
change edge parents of a shape
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Position offset
The offSet of the block icon.
static const RGBColor WHITE
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects