68 GNEPoly(
GNENet* net,
const std::string&
id,
const std::string& type,
const PositionVector& shape,
bool geo,
bool fill,
double lineWidth,
69 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...
SumoXMLTag
Numbers representing SUMO-XML - element names.
void openPolygon(bool allowUndo=true)
open polygon
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
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
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.
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.
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.
bool isPolygonBlocked() const
return true if polygon is blocked
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
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 ...
const GUIGlObject * getGUIGlObject() const
get GUIGlObject associated to this GNEShape
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 myBlockShape
flag for block shape
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
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
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