 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
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);
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
A window containing a gl-object's parameter.
const std::string getID() const
function to support debugging
std::string getParentName() const
Returns the name of the parent object.
void openPolygon(bool allowUndo=true)
open polygon
Static storage of an output device and its base (abstract) implementation.
A NBNetBuilder extended by visualisation and editing capabilities.
void updateGeometry()
update pre-computed geometry information
std::string generateChildID(SumoXMLTag childTag)
gererate a new ID for an element child
bool mySimplifiedShape
flag to indicate if polygon is simplified
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(....
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.
static methods for processing the coordinates conversion for the current net
SumoXMLTag
Numbers representing SUMO-XML - element names.
GNENetElement * myNetElementShapeEdited
junction of which the shape is being edited (optional)
bool isPolygonBlocked() const
return true if polygon is blocked
void closePolygon(bool allowUndo=true)
close polygon
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)
GNEPoly & operator=(const GNEPoly &)=delete
Invalidated assignment operator.
void startGeometryMoving()
A class that stores a 2D geometrical boundary.
A point in 2D or 3D with translation and scaling methods.
void writeShape(OutputDevice &device)
writte shape element into a xml file
void setGenericParametersStr(const std::string &value)
set generic parameters in string format
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.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
const GUIGlObject * getGUIGlObject() const
get GUIGlObject associated to this GNEShape
std::vector< std::pair< std::string, std::string > > getGenericParameters() const
return generic parameters as vector of pairs format
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
Stores the information about how to visualize structures.
bool myBlockShape
flag for block shape
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
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
void moveEntireShape(const PositionVector &oldShape, const Position &offset)
move entire shape without commiting change
bool myClosedShape
flag to indicate if polygon is open or closed
std::string getGenericParametersStr() const
return generic parameters in string format
void endGeometryMoving()
begin movement (used when user click over edge to start a movement, to avoid problems with problems w...
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point