64 GNEPoly(
GNENet* net,
const std::string&
id,
const std::string& type,
const PositionVector& shape,
bool geo,
bool fill,
double lineWidth,
65 const RGBColor& color,
double layer,
double angle,
const std::string& imgFile,
bool relativePath,
bool movementBlocked,
bool shapeBlocked);
85 void setParameter(
const std::string& key,
const std::string& value);
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
class for NETEDIT geometries over lanes
A NBNetBuilder extended by visualisation and editing capabilities.
void updateGeometry()
update pre-computed geometry information
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool mySimplifiedShape
flag to indicate if polygon is simplified
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
bool isPolygonBlocked() const
return true if polygon is blocked
std::string getAttribute(SumoXMLAttr key) const
GNEPoly & operator=(const GNEPoly &)=delete
Invalidated assignment operator.
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
bool myBlockShape
flag for block shape
int getVertexIndex(Position pos, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge
PositionVector myGeoShape
Latitude of Polygon.
GNEMoveOperation * getMoveOperation(const double shapeOffset)
get move operation for the given shapeOffset
void closePolygon(bool allowUndo=true)
close polygon
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
void removeGeometryPoint(const Position clickedPosition, GNEUndoList *undoList)
remove geometry point in the clicked position
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
GNEPoly(const GNEPoly &)=delete
Invalidated copy constructor.
bool isAttributeEnabled(SumoXMLAttr key) const
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
std::string getParentName() const
Returns the name of the parent object.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
void writeShape(OutputDevice &device)
writte shape element into a xml file
bool isPolygonClosed() const
check if polygon is closed
void simplifyShape(bool allowUndo=true)
replace the current shape with a rectangle
GNEGeometry::Geometry myPolygonGeometry
geometry for lenghts/rotations
const std::map< std::string, std::string > & getACParametersMap() const
get parameters map
GNEPoly(GNENet *net, const std::string &id, const std::string &type, const PositionVector &shape, bool geo, bool fill, double lineWidth, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath, bool movementBlocked, bool shapeBlocked)
Constructor.
GUIGlID getGlID() const
Returns the numerical id of the object.
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
void openPolygon(bool allowUndo=true)
open polygon
const std::string & getID() const
get ID (all shapes have one)
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
static methods for processing the coordinates conversion for the current net
Static storage of an output device and its base (abstract) implementation.
A point in 2D or 3D with translation and scaling methods.