 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
41 }, {}, {}, {}, {}, {}, {}, {}, {}, {}),
75 if (
getParentEdges().front()->getLanes().front()->getLaneShape().length() < 2.5) {
76 return getParentEdges().front()->getLanes().front()->getLaneShape().front();
82 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
124 const int numberOfLanes = int(
getParentEdges().front()->getLanes().size());
125 const double width = (double) 2.0 * s.
scale;
140 glScaled(exaggeration, exaggeration, 1);
141 glTranslated(-1.6, -1.6, 0);
144 glVertex2d(0, -0.25);
145 glVertex2d((numberOfLanes * 3.3), -0.25);
146 glVertex2d((numberOfLanes * 3.3), 0.25);
148 glTranslated(0, 0, .01);
150 glVertex2d(0, 0.25 - .1);
151 glVertex2d(0, -0.25 + .1);
160 glRotated(90, 0, 0, -1);
163 glVertex2d(0, (numberOfLanes * 3.3));
172 glTranslated((-2.56), (-1.6), 0);
176 glRotated(-90, 0, 0, 1);
269 if (canParse<SUMOTime>(value)) {
270 return (parse<SUMOTime>(value) <=
myEnd);
275 if (canParse<SUMOTime>(value)) {
276 return (
myBegin <= parse<SUMOTime>(value));
283 return canParse<bool>(value);
322 myBegin = parse<SUMOTime>(value);
325 myEnd = parse<SUMOTime>(value);
331 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
An Element which don't belongs to GNENet but has influency in the simulation.
std::string getParametersStr() const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
void replaceParentEdges(GNEShape *elementChild, const std::string &newEdgeIDs)
replace the parent edges of a shape
const std::string & getAdditionalID() const
void updateGeometry()
update pre-computed geometry information
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
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
void updateGeometryPosition(const GNELane *lane, const double posOverLane)
update position and rotation
double getAttributeDouble(SumoXMLAttr key) const
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(....
std::string getAttribute(SumoXMLAttr key) const
double length() const
Returns the length.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
void changeAdditionalID(const std::string &newID)
change ID of additional
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
@ GNETEXTURE_VAPORIZERSELECTED
BlockIcon myBlockIcon
variable BlockIcon
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
SUMOTime myEnd
end time in which this vaporizer is placed
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
@ SUMO_ATTR_BEGIN
weights: time range begin
A road/street connecting two junctions (netedit-version)
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...)
const PositionVector & getShape() const
The shape of the additional element.
const PositionVector & getLaneShape() const
void selectAttributeCarrier(bool changeFlag=true)
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.
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
double getRotation() const
get rotation
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)
std::string getParentName() const
Returns the name of the parent object (if any)
A point in 2D or 3D with translation and scaling methods.
static const RGBColor vaporizer
color for vaporizers
double x() const
Returns the x-position.
std::string time2string(SUMOTime t)
GNEGeometry::Geometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
std::string myAdditionalName
name of additional
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Position getPositionInView() const
Returns position of additional in view.
static const double laneTextures
details for lane textures
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
const Position & getPosition() const
get Position
GUIVisualizationColorSettings colorSettings
color settings
RGBColor selectionColor
basic selection color
void setParametersStr(const std::string ¶msString)
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
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
bool isAttributeEnabled(SumoXMLAttr key) const
double y() const
Returns the y-position.
@ GLO_VAPORIZER
a Vaporizer
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
SUMOTime myBegin
begin time of vaporizer
static bool areParametersValid(const std::string &value, bool report=false)
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
bool drawAdditionals(const double exaggeration) const
check if additionals must be drawn
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
void splitEdgeGeometry(const double splitPosition, const GNENetElement *originalElement, const GNENetElement *newElement, GNEUndoList *undoList)
split geometry
GNEVaporizer(GNEViewNet *viewNet, GNEEdge *edge, SUMOTime begin, SUMOTime end, const std::string &name)
Constructor.
GUIVisualizationSizeSettings addSize
@ GNE_ATTR_SELECTED
element is selected
@ SUMO_ATTR_END
weights: time range end
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
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
~GNEVaporizer()
Destructor.
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values
Position offset
The offSet of the block icon.
static const RGBColor WHITE