42 const Position& pos,
bool geo,
double layer,
double angle,
const std::string& imgFile,
43 bool relativePath,
double width,
double height,
bool movementBlocked) :
44 PointOfInterest(id, type, color, pos, geo,
"", 0, 0, layer, angle, imgFile, relativePath, width, height),
46 {}, {}, {}, {}, {}, {}, {}, {}) {
48 updateCenteringBoundary(
false);
56 double layer,
double angle,
const std::string& imgFile,
bool relativePath,
GNELane* lane,
double posOverLane,
double posLat,
57 double width,
double height,
bool movementBlocked) :
58 PointOfInterest(id, type, color,
Position(), false, lane->getID(), posOverLane, posLat, layer, angle, imgFile, relativePath, width, height),
60 {}, {}, {lane}, {}, {}, {}, {}, {}) {
62 updateCenteringBoundary(
false);
217 glTranslated(
x(),
y(),
getType() + 0.01);
326 return canParse<RGBColor>(value);
331 return canParse<double>(value);
333 return canParse<Position>(value);
336 return canParse<double>(value);
338 return canParse<Position>(value);
341 return canParse<bool>(value);
345 if (value ==
"default") {
348 return canParse<double>(value);
358 return canParse<bool>(value);
360 return canParse<double>(value) && (parse<double>(value) > 0);
362 return canParse<double>(value) && (parse<double>(value) > 0);
364 return canParse<double>(value);
366 return canParse<bool>(value);
368 return canParse<bool>(value);
388 const std::map<std::string, std::string>&
416 if (canParse<double>(value)) {
421 set(parse<Position>(value));
448 myGeo = parse<bool>(value);
454 if (value ==
"default") {
491 if (parse<bool>(value)) {
@ MID_GNE_POI_TRANSFORM
Transform POI to POILane, and viceversa.
@ GLO_DOTTEDCONTOUR_FRONT
dotted contour front element (used in NETEDIT)
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_POILANE
begin/end of the description of a Point of interest over Lane (used by Netedit)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_BLOCK_MOVEMENT
block movement of a graphic element
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_LAYER
A layer number.
@ SUMO_ATTR_COLOR
A color information.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
void reset()
Resets the boundary.
Boundary & grow(double by)
extends the boundary by the given amount
static void drawBoundary(const Boundary &b)
Draw a boundary (used for debugging)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
friend class GNEChange_Attribute
declare friend class
const std::string & getTagStr() const
get tag assigned to this object in string format
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool drawUsingSelectColor() const
check if attribute carrier must be drawn using selecting color.
GNENet * myNet
pointer to net
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
PositionVector shapeToUpdate
shape to update (edited in moveElement)
void updateID(GNEAttributeCarrier *AC, const std::string newID)
update ID
const std::map< SumoXMLTag, std::map< std::string, GNEShape * > > & getShapes() const
A NBNetBuilder extended by visualisation and editing capabilities.
void addGLObjectIntoGrid(GNEAttributeCarrier *AC)
add GL Object into net
void removeGLObjectFromGrid(GNEAttributeCarrier *AC)
add GL Object into net
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
GNEShape * retrieveShape(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named shape.
GNEViewNet * getViewNet() const
get view net
const std::map< std::string, std::string > & getACParametersMap() const
get parameters map
GNEPOI(GNENet *net, const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, double layer, double angle, const std::string &imgFile, bool relativePath, double width, double height, bool movementBlocked)
Constructor.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GUIGlID getGlID() const
Returns the numerical id of the object.
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
std::string getParentName() const
Returns the name of the parent object.
bool isAttributeEnabled(SumoXMLAttr key) const
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void writeShape(OutputDevice &device)
writte shape element into a xml file
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
const std::string & getID() const
needed to avoid diamond problem between PointOfInterest and GNEShape
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspond attribute are valids
GNEMoveOperation * getMoveOperation(const double shapeOffset)
get move operation for the given shapeOffset
void updateGeometry()
update pre-computed geometry information
std::string getAttribute(SumoXMLAttr key) const
method for getting the Attribute of an XML key
Position myGEOPosition
Position of POI in GEO coordinates (Only used by POIs that aren't placed over lanes)
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
Boundary myBoundary
object boundary
bool myBlockMovement
flag to block movement
void replaceShapeParentLanes(const std::string &value)
replace shape parent lanes
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
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...
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
const GNEAttributeCarrier * getFrontAttributeCarrier() const
get front attributeCarrier
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::TestingMode & getTestingMode() const
get testing mode
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
bool isAttributeCarrierInspected(const GNEAttributeCarrier *AC) const
check if attribute carrier is being inspected
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
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 buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GUIGlID getGlID() const
Returns the numerical id of the object.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
A window containing a gl-object's parameter.
void mkItem(const char *name, bool dynamic, ValueSource< T > *src)
Adds a row which obtains its value from a ValueSource.
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
static void drawInnerPOI(const GUIVisualizationSettings &s, const PointOfInterest *POI, const GUIGlObject *o, const bool disableSelectionColor, const double layer)
draw inner POI (before pushName() )
static bool checkDraw(const GUIVisualizationSettings &s, const GUIGlObject *o)
check if POI can be drawn
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
static void clearTextures()
clears loaded textures
Stores the information about how to visualize structures.
bool drawBoundaries
enable or disable draw boundaries
GUIVisualizationSizeSettings poiSize
bool drawDottedContour() const
check if dotted contour can be drawn
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
bool x2cartesian_const(Position &from) const
Converts the given coordinate into a cartesian using the previous initialisation.
std::string myID
The name of the object.
Static storage of an output device and its base (abstract) implementation.
static bool areParametersValid(const std::string &value, bool report=false, ParameterisedAttrType attrType=ParameterisedAttrType::STRING, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
void setParametersStr(const std::string ¶msString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
virtual void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
void writeXML(OutputDevice &out, const bool geo=false, const double zOffset=0., const std::string laneID="", const double pos=0., const double posLat=0.)
bool myGeo
flag to check if POI was loaded as GEO Position (main used by netedit)
void setHeight(double height)
set the image height of the POI
double myPosLat
latereal position over lane in which this POI is placed (main used by netedit)
void setWidth(double width)
set the image width of the POI
double getHeight() const
Returns the image height of the POI.
std::string myLane
ID of lane in which this POI is placed (main used by netedit)
double myPosOverLane
position over lane in which this POI is placed (main used by netedit)
double getWidth() const
Returns the image width of the POI.
A point in 2D or 3D with translation and scaling methods.
Position()
default constructor
void setx(double x)
set position x
void set(double x, double y)
set positions x and y
double x() const
Returns the x-position.
void setz(double z)
set position z
double z() const
Returns the z-position.
void sety(double y)
set position y
double y() const
Returns the y-position.
static const RGBColor ORANGE
static bool isValidTypeID(const std::string &value)
whether the given string is a valid id for an edge or vehicle type
const RGBColor & getShapeColor() const
Returns the color of the Shape.
static const double DEFAULT_LAYER_POI
const std::string & getShapeImgFile() const
Returns the imgFile of the Shape.
void setShapeLayer(const double layer)
Sets a new layer.
bool getShapeRelativePath() const
Returns the relativePath of the Shape.
void setShapeType(const std::string &type)
Sets a new type.
void setShapeRelativePath(bool relativePath)
Sets a new relativePath value.
virtual void setShapeNaviDegree(const double angle)
Sets a new angle in navigational degrees.
void setShapeImgFile(const std::string &imgFile)
Sets a new imgFile.
void setShapeColor(const RGBColor &col)
Sets a new color.
double getShapeLayer() const
Returns the layer of the Shape.
double getShapeNaviDegree() const
Returns the angle of the Shape in navigational degrees.
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
static void drawDottedContourCircle(const DottedContourType type, const GUIVisualizationSettings &s, const Position &pos, const double radius, const double exaggeration)
draw dotted contour for the given Position and radius (used by Juctions and POIs)
static void drawDottedSquaredShape(const DottedContourType type, const GUIVisualizationSettings &s, const Position &pos, const double width, const double height, const double offsetX, const double offsetY, const double rot, const double exaggeration)
draw dotted squared contour (used by additionals and demand elements)
bool showShapes() const
check if shapes has to be drawn
bool showShapes() const
check if shapes has to be drawn
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
bool isTestingEnabled() const
check if testing mode is enabled
double getExaggeration(const GUIVisualizationSettings &s, const GUIGlObject *o, double factor=20) const
return the drawing size including exaggeration and constantSize values