65 double layer,
double angle,
const std::string& imgFile,
GNELane* lane,
double posOverLane,
double posLat,
66 double width,
double height,
bool movementBlocked) :
67 GUIPointOfInterest(id, type, color,
Position(), false, lane->getID(), posOverLane / lane->getLaneParametricLength(), posLat, layer, angle, imgFile, width, height),
89 newPosition.
add(offset);
241 return canParse<RGBColor>(value);
245 return canParse<double>(value);
247 return canParse<double>(value);
251 return canParse<double>(value);
262 return canParse<double>(value);
264 return canParse<double>(value);
266 return canParse<double>(value);
268 return canParse<bool>(value);
282 std::string oldID =
myID;
288 myColor = parse<RGBColor>(value);
307 myLayer = parse<double>(value);
Transform POI to POILane, and viceversa.
GUIGlID getGlID() const
Returns the numerical id of the object.
void buildShapePopupOptions(GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
build basic shape popup options. Used to unify pop-ups menu in netedit and SUMO-GUI ...
void writeShape(OutputDevice &device)
writte shape element into a xml file
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
begin/end of the description of a single lane
void add(const Position &pos)
Adds the given position to this one.
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
double myPosOverLane
position over lane in which this POI is placed (main used by netedit)
Stores the information about how to visualize structures.
double y() const
Returns the y-position.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspond attribute are valids
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
double x() const
Returns the x-position.
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
A NBNetBuilder extended by visualisation and editing capabilities.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
double getHeight() const
Returns the image height of the POI.
RGBColor invertedColor() const
obtain inverted of current RGBColor
static bool isValidFilename(const std::string &value)
true if value is a valid file value
GNENet * myNet
the net to inform about updates
A class that stores a 2D geometrical boundary.
std::string myType
The type of the Shape.
void drawLockIcon(const Position &pos, double layer, double size=0.5) const
draw lock icon
double myPosLat
latereal position over lane in which this POI is placed (main used by netedit)
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
void writeXML(OutputDevice &out, const bool geo=false, const double zOffset=0., const std::string laneID="", const double pos=0., const double posLat=0.)
static bool isValidID(const std::string &value)
true if value is a valid sumo ID
std::string myLane
ID of lane in which this POI is placed (main used by netedit)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
double getLaneParametricLength() const
returns the parameteric length of the lane
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
double getNaviDegree() const
Returns the angle of the Shape in navigational degrees.
bool myBlockMovement
flag to block movement
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
friend class GNEChange_Attribute
declare friend class
void addShapeChild(GNEShape *shape)
add shape child to this lane
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
block movement of a graphic element
GNELane * getLane() const
get GNELane
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const std::string getID() const
function to support debugging
void changeShapeID(GNEShape *s, const std::string &OldID)
change Shape ID
double getLaneShapeLength() const
returns the length of the lane's shape
double getWidth() const
Returns the image width of the POI.
const std::string & getParentName() const
Returns the name of the parent object.
GNELane * myGNELane
GNElane in which this POILane is placed.
std::string getAttribute(SumoXMLAttr key) const
method for getting the Attribute of an XML key
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string myID
The name of the object.
const PositionVector & getShape() const
returns the shape of the lane
double length() const
Returns the length.
void setHeight(double height)
set the image height of the POI
void updateGeometry()
update pre-computed geometry information
void setWidth(double width)
set the image width of the POI
void setNaviDegree(const double angle)
Sets a new angle in navigational degrees.
std::string myImgFile
The angle of the Shape.
RGBColor myColor
The color of the Shape.
double myLayer
The layer of the Shape.
GUIGlID getGlID() const
Returns the numerical id of the object.
Position getPositionInView() const
Returns position of additional in view.
Static storage of an output device and its base (abstract) implementation.
void removeShapeChild(GNEShape *shape)
remove shape child of this lane
begin/end of the description of a Point of interest over Lane (used by Netedit)
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
Position()
default constructor
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
A window containing a gl-object's parameter.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
GNEPOILane(GNENet *net, const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, GNELane *lane, double posOverLane, double posLat, double width, double height, bool movementBlocked)
Constructor.
SumoXMLTag getTag() const
get XML Tag assigned to this object