67 myStartTime(startTime),
69 myRelativePositionY(0) {
111 Position s =
myShape[0] + Position(1, 0);
136 return Position((A.
x() + B.
x()) / 2, (A.
y() + B.
y()) / 2);
198 double width = (double) 2.0 * s.
scale;
213 glScaled(exaggeration, exaggeration, 1);
214 glTranslated(-1.6, -1.6, 0);
217 glVertex2d(0, -0.25);
221 glTranslated(0, 0, .01);
223 glVertex2d(0, 0.25 - .1);
224 glVertex2d(0, -0.25 + .1);
228 if (width * exaggeration > 1) {
234 glRotated(90, 0, 0, -1);
250 glRotated(-90, 0, 0, 1);
263 if (s.
scale * exaggeration >= 10) {
326 if (canParse<double>(value) && (parse<double>(value) >= 0)) {
327 double startTime = parse<double>(value);
328 if (startTime <=
myEnd) {
337 if (canParse<double>(value) && (parse<double>(value) >= 0)) {
338 double end = parse<double>(value);
366 myEnd = parse<double>(value);
void writeAdditional(OutputDevice &device, bool volatileOptionsEnabled) const
writte additional element into a xml file
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
double myStartTime
start time of vaporizer
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
void setBlockIconRotation()
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)
int myRelativePositionY
relative position regarding to other route probes
void setEndTime(double end)
set end
GUIVisualizationTextSettings addName
void setStartTime(double startTime)
set start time
static const RGBColor WHITE
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.
bool isAdditionalSelected() const
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::vector< double > myShapeRotations
GUIGlID getGlID() const
Returns the numerical id of the object.
std::string getAttribute(SumoXMLAttr key) const
This functions has to be implemented in allGNEAttributeCarrier.
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
static bool isValidID(const std::string &value)
true if value is a valid sumo ID
GUIVisualizationSizeSettings addSize
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
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)
void changeEdge(const std::string &edgeID)
change edge of additional
void moveGeometry(const Position &newPosition)
change the position of the element geometry without saving in undoList
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
bool myMovable
boolean to check if additional element is movable (with the mouse). By default true ...
const std::string & getAdditionalID() const
returns the ID of additional
void refreshAdditional(GNEAdditional *additional)
refreshes boundary information of an additional after a geometry update
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.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
friend class GNEChange_Attribute
declare friend class
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
double y() const
Returns the y-position.
int getVaporizerRelativePosition(GNEVaporizer *vaporizer) const
obtain relative positions of Vaporizer
double length() const
Returns the length.
std::vector< double > myShapeLengths
The lengths of the shape parts.
void setAdditionalID(const std::string &id)
set the ID of additional
const std::string getID() const
function to support debugging
void drawLockIcon(double size=0.5) const
draw lock icon
Position myBlockIconOffset
The offSet of the block icon.
Position getPositionInView() const
Returns position of additional in view.
A road/street connecting two junctions (netedit-version)
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
const PositionVector & getShape() const
returns the shape of the lane
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
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.
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(...)
GNENet * getNet() const
get the net object
Position getLineCenter() const
get line center
double getEnd() const
get end
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.
GNEVaporizer(GNEViewNet *viewNet, GNEEdge *edge, double startTime, double end)
Constructor.
static const RGBColor selectionColor
int myNumberOfLanes
number of lanes of edge (To improve efficiency)
GNEEdge * myEdge
The edge this additional belongs.
double getStartTime() const
get start time
~GNEVaporizer()
Destructor.
void updateGeometry()
update pre-computed geometry information
const std::string & getParentName() const
Returns the name of the parent object (if any)
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Position myBlockIconPosition
position of the block icon
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.