73 const RGBColor& color,
double layer,
double angle,
const std::string& imgFile,
bool movementBlocked,
bool shapeBlocked);
void openPolygon(bool allowUndo=true)
open polygon
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 movementBlocked, bool shapeBlocked)
Constructor.
const std::string & getParentName() const
Returns the name of the parent object.
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(...)
void updateGeometry()
update pre-computed geometry information
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 ...
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.
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.
static methods for processing the coordinates conversion for the current net
void writeShape(OutputDevice &device)
writte shape element into a xml file
A point in 2D or 3D with translation and scaling methods.
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.
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
This functions has to be implemented in all GNEAttributeCarriers.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
const std::string & getType() const
Returns the (abstract) type of the Shape.
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
Static storage of an output device and its base (abstract) implementation.
bool myClosedShape
flag to indicate if polygon is open or closed
A window containing a gl-object's parameter.
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
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