62 #ifdef CHECK_MEMORY_LEAKS 64 #endif // CHECK_MEMORY_LEAKS 76 SUMOReal angle,
const std::string& imgFile) :
77 GUIPolygon(id, type, color, shape, fill, layer, angle, imgFile),
80 myJunction(junction) {
92 if (s.
scale * hintSize > 1.) {
97 for (
int i = 0; i < (int)
myShape.size() - 1; i++) {
114 new FXMenuSeparator(ret);
116 new FXMenuCommand(ret,
"Discard custom shape (ESC)", 0, &app,
MID_GNE_ABORT);
117 new FXMenuCommand(ret,
"Simplify Shape\t\tReplace shape with a rectangle", 0, &parent,
MID_GNE_SIMPLIFY_SHAPE);
118 new FXMenuCommand(ret,
"Remove geometry point\t\tRemove the closest geometry point", 0, &parent,
MID_GNE_DELETE_GEOMETRY);
120 (
dynamic_cast<GNEViewNet&
>(parent)).markPopupPosition();
174 return toString(Polygon::getType());
Position moveGeometry(const Position &oldPos, const Position &newPos, bool relative=false)
draw the polygon and also little movement handles
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
virtual void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SUMOReal ymin() const
Returns minimum y-coordinate.
Stores the information about how to visualize structures.
SUMOReal xmin() const
Returns minimum x-coordinate.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
A NBNetBuilder extended by visualisation and editing capabilities.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
SUMOReal x() const
Returns the x-position.
GUIGlID getGlID() const
Returns the numerical id of the object.
SUMOReal xmax() const
Returns maximum x-coordinate.
A class that stores a 2D geometrical boundary.
SUMOReal scale
information about a lane's width (temporary, used for a single view)
static void drawFilledCircle(SUMOReal width, int steps=8)
Draws a filled circle around (0,0)
GNENet * myNet
the net for querying updates
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
A point in 2D or 3D with translation and scaling methods.
int indexOfClosest(const Position &p) const
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
bool isValid(SumoXMLAttr key, const std::string &value)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
GNEPoly(GNENet *net, GNEJunction *junction, const std::string &id, const std::string &type, const PositionVector &shape, bool fill, const RGBColor &color, SUMOReal layer, SUMOReal angle=0, const std::string &imgFile="")
Constructor.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
SUMOReal y() const
Returns the y-position.
void simplifyShape()
replace the current shape with a rectangle
virtual ~GNEPoly()
Destructor.
SUMOReal ymax() const
Returns maximum y-coordinate.
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
PositionVector myShape
The positions of the polygon.
std::string getAttribute(SumoXMLAttr key) const
registers completed movement with the undoList
static bool changeGeometry(PositionVector &geom, const std::string &id, const Position &oldPos, const Position &newPos, bool relative=false, bool moveEndPoints=false)
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void deleteGeometryNear(const Position &pos)
delete the geometry point closest to the given pos
static RGBColor getColor()
gets the gl-color