92 Position s =
myShape[0] + Position(1, 0);
122 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
149 double width = (double) 2.0 * s.
scale;
165 glScaled(exaggeration, exaggeration, 1);
166 glTranslated(-1.6, -1.6, 0);
169 glVertex2d(0, -0.25);
170 glVertex2d((numberOfLanes * 3.3), -0.25);
171 glVertex2d((numberOfLanes * 3.3), 0.25);
173 glTranslated(0, 0, .01);
175 glVertex2d(0, 0.25 - .1);
176 glVertex2d(0, -0.25 + .1);
186 glRotated(90, 0, 0, -1);
189 glVertex2d(0, (numberOfLanes * 3.3));
200 glTranslated((-2.56), (-1.6), 0);
208 glRotated(-90, 0, 0, 1);
290 if (canParse<double>(value) && (parse<double>(value) >= 0)) {
291 return (parse<double>(value) <=
myEnd);
296 if (canParse<double>(value) && (parse<double>(value) >= 0)) {
297 return (
myBegin <= parse<double>(value));
304 return canParse<bool>(value);
336 myBegin = parse<double>(value);
339 myEnd = parse<double>(value);
345 if (parse<bool>(value)) {
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
double myBegin
begin time of vaporizer
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
const GNEAttributeCarrier * getACUnderCursor() const
get AttributeCarrier under cursor
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 setBlockIconRotation(GNELane *additionalLane=nullptr)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
GUIVisualizationTextSettings addName
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
const std::string & getAdditionalID() const
returns Additional ID
static const RGBColor WHITE
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
double x() const
Returns the x-position.
weights: time range begin
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEEdge * myEdge
The edge in which this vaporizer is placed.
std::vector< double > myShapeRotations
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void changeAdditionalID(const std::string &newID)
change ID of additional
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
static const RGBColor GREEN
static const RGBColor selectedAdditionalColor
color of selected additionals
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)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
PositionVector myShape
The shape of the additional element.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
A point in 2D or 3D with translation and scaling methods.
std::string myAdditionalName
name of additional
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
friend class GNEChange_Attribute
declare friend class
void selectAttributeCarrier(bool changeFlag=true)
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
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
std::string getAttribute(SumoXMLAttr key) const
void updateGeometry(bool updateGrid)
update pre-computed geometry information
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Position myBlockIconOffset
The offSet of the block icon.
A road/street connecting two junctions (netedit-version)
Position getPositionInView() const
Returns position of additional in view.
const PositionVector & getShape() const
returns the shape of the lane
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
double length() const
Returns the length.
GNEEdge * changeEdge(GNEEdge *oldEdge, const std::string &newEdgeID)
change edge of additional
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
static void drawShapeDottedContour(const int type, const PositionVector &shape, const double width)
draw a dotted contour around the given Non closed shape with certain width
An Element which don't belongs to GNENet but has influency in the simulation.
double myEnd
end time in which this vaporizer is placed
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
std::string getGenericParametersStr() const
return generic parameters in string format
GNENet * getNet() const
get the net object
GUIGlID getGlID() const
Returns the numerical id of the object.
double getExaggeration(const GUIVisualizationSettings &s, double factor=20) const
return the drawing size including exaggeration and constantSize values
bool isValidAdditionalID(const std::string &newID) const
check if a new additional ID is valid
static const RGBColor selectionColor
GNEVaporizer(GNEViewNet *viewNet, GNEEdge *edge, double begin, double end, const std::string &name)
Constructor.
std::string getParentName() const
Returns the name of the parent object (if any)
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
~GNEVaporizer()
Destructor.
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Position myBlockIconPosition
position of the block icon
SumoXMLTag getTag() const
get XML Tag assigned to this object