67 const RGBColor& color,
double layer,
double angle,
const std::string& imgFile,
bool relativePath,
bool movementBlocked,
bool shapeBlocked);
void endGeometryMoving()
begin movement (used when user click over edge to start a movement, to avoid problems with problems w...
void openPolygon(bool allowUndo=true)
open polygon
std::string getParentName() const
Returns the name of the parent object.
GNEPoly(GNENet *net, const std::string &id, const std::string &type, const PositionVector &shape, bool geo, bool fill, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath, bool movementBlocked, bool shapeBlocked)
Constructor.
bool addGenericParameter(const std::string &key, const std::string &value)
add generic parameter
Stores the information about how to visualize structures.
bool isPolygonClosed() const
check if polygon is closed
void commitShapeChange(const PositionVector &oldShape, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of changeShapeGeometry(...)
int getVertexIndex(const Position &pos, bool createIfNoExist=true)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
bool removeGenericParameter(const std::string &key)
remove generic parameter
A NBNetBuilder extended by visualisation and editing capabilities.
bool mySimplifiedShape
flag to indicate if polygon is simplified
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
PositionVector myGeoShape
Latitude of Polygon.
static const double myHintSizeSquared
squaredhint size of vertex
A class that stores a 2D geometrical boundary.
void closePolygon(bool allowUndo=true)
close polygon
GNENetElement * myNetElementShapeEdited
junction of which the shape is being edited (optional)
GNEPoly & operator=(const GNEPoly &)=delete
Invalidated assignment operator.
void startGeometryMoving()
static methods for processing the coordinates conversion for the current net
void writeShape(OutputDevice &device)
writte shape element into a xml file
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
void mouseOverObject(const GUIVisualizationSettings &s) const
method for check if mouse is over objects
A point in 2D or 3D with translation and scaling methods.
bool updateGenericParameterValue(const std::string &key, const std::string &newValue)
update value generic parameter
static const double myHintSize
hint size of vertex
int myCurrentMovingVertexIndex
index of vertex that is been moved (-1 means that none vertex is been moved)
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool updateGenericParameter(const std::string &oldKey, const std::string &newKey)
update generic parameter
const std::string getID() const
function to support debugging
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
std::string getAttribute(SumoXMLAttr key) const
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
void setShapeEditedElement(GNENetElement *element)
retrieve the netElement of which the shape is being edited
void simplifyShape(bool allowUndo=true)
replace the current shape with a rectangle
Position getPositionInView() const
Returns position of additional in view.
GUIGlID getGlID() const
Returns the numerical id of the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GNENetElement * getShapeEditedElement() const
retrieve the junction of which the shape is being edited
std::vector< std::pair< std::string, std::string > > getGenericParameters() const
return generic parameters as vector of pairs format
Static storage of an output device and its base (abstract) implementation.
bool myClosedShape
flag to indicate if polygon is open or closed
std::string getGenericParametersStr() const
return generic parameters in string format
A window containing a gl-object's parameter.
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
void updateGeometry(bool updateGrid)
update pre-computed geometry information
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void moveEntireShape(const PositionVector &oldShape, const Position &offset)
move entire shape without commiting change