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);
double getLaneShapeLength() const
returns the length of the lane's shape
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
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
double x() const
Returns the x-position.
double myPosOverLane
position over lane in which this POI is placed (main used by netedit)
Stores the information about how to visualize structures.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspond attribute are valids
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
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...
const std::string & getParentName() const
Returns the name of the parent object.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNELane * getLane() const
get GNELane
static bool isValidFilename(const std::string &value)
true if value is a valid file value
GNENet * myNet
the net to inform about updates
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string myType
The type of the Shape.
double myPosLat
latereal position over lane in which this POI is placed (main used by netedit)
Position getPositionInView() const
Returns position of additional in view.
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
void writeXML(OutputDevice &out, const bool geo=false, const double zOffset=0., const std::string laneID="", const double pos=0., const double posLat=0.)
void drawLockIcon(const Position &pos, double layer, double size=0.5) const
draw lock icon
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 ...
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)
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.
RGBColor invertedColor() const
obtain inverted of current RGBColor
friend class GNEChange_Attribute
declare friend class
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
double y() const
Returns the y-position.
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
double length() const
Returns the length.
double getWidth() const
Returns the image width of the POI.
const std::string getID() const
function to support debugging
void changeShapeID(GNEShape *s, const std::string &OldID)
change Shape ID
GNELane * myGNELane
GNElane in which this POILane is placed.
std::string myID
The name of the object.
const PositionVector & getShape() const
returns the shape of the lane
void setHeight(double height)
set the image height of the POI
std::string getAttribute(SumoXMLAttr key) const
method for getting the Attribute of an XML key
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
void updateGeometry()
update pre-computed geometry information
void setWidth(double width)
set the image width of the POI
GUIGlID getGlID() const
Returns the numerical id of the object.
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.
SumoXMLTag getTag() const
get XML Tag assigned to this object
Static storage of an output device and its base (abstract) implementation.
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
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 getLaneParametricLength() const
returns the parameteric length of the lane
Position()
default constructor
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
double getNaviDegree() const
Returns the angle of the Shape in navigational degrees.
Transform POI to POILane, and viceversa.
A window containing a gl-object's parameter.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
double getHeight() const
Returns the image height of the POI.
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.