39 std::vector<Position>
vert;
61 bool geo,
bool fill,
double lineWidth,
double layer = 0,
double angle = 0,
const std::string& imgFile =
"",
62 bool relativePath =
false,
const std::string& name =
DEFAULT_NAME,
64 SUMOPolygon(id, type, color, shape, geo, fill, lineWidth, layer, angle, imgFile, relativePath, name, parameters)
102 bool geo,
bool fill,
double lineWidth,
double layer = 0,
double angle = 0,
const std::string& imgFile =
"",
103 bool relativePath =
false,
const std::string& name =
DEFAULT_NAME);
172 const bool disableSelectionColor =
false,
173 const int alphaOverride = -1,
174 const bool disableText =
false);
A class that stores a 2D geometrical boundary.
A window containing a gl-object's parameter.
static void drawInnerPolygon(const GUIVisualizationSettings &s, const TesselatedPolygon *polygon, const GUIGlObject *o, const PositionVector shape, const double layer, const bool fill, const bool disableSelectionColor=false, const int alphaOverride=-1, const bool disableText=false)
draw inner Polygon (before pushName() )
static bool checkDraw(const GUIVisualizationSettings &s, const SUMOPolygon *polygon, const GUIGlObject *o)
check if Polygon can be drawn
virtual void setShapeNaviDegree(const double angle) override
Sets a new angle in navigational degrees.
virtual void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
double getClickPriority() const override
Returns the priority of receiving mouse clicks.
PositionVector * myRotatedShape
shape rotated on the centroid, if rotation is needed, nullptr otherwise
GUIPolygon(const std::string &id, const std::string &type, const RGBColor &color, const PositionVector &shape, bool geo, bool fill, double lineWidth, double layer=0, double angle=0, const std::string &imgFile="", bool relativePath=false, const std::string &name=DEFAULT_NAME)
Constructor.
FXMutex myLock
The mutex used to avoid concurrent updates of the shape.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
static RGBColor setColor(const GUIVisualizationSettings &s, const SUMOPolygon *polygon, const GUIGlObject *o, bool disableSelectionColor, int alphaOverride)
set color
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
virtual void setShape(const PositionVector &shape) override
set a new shape and update the tesselation
Stores the information about how to visualize structures.
std::map< std::string, std::string > Map
parameters map
PositionVector myShape
The positions of the polygon.
virtual void setShapeNaviDegree(const double angle)
Sets a new angle in navigational degrees.
static const std::string DEFAULT_NAME
double getShapeLayer() const
Returns the layer of the Shape.
static const Parameterised::Map DEFAULT_PARAMETERS
std::vector< GLPrimitive > myTesselation
id of the display list for the cached tesselation
PositionVector & getShapeRef()
~TesselatedPolygon()
Destructor.
TesselatedPolygon(const std::string &id, const std::string &type, const RGBColor &color, const PositionVector &shape, bool geo, bool fill, double lineWidth, double layer=0, double angle=0, const std::string &imgFile="", bool relativePath=false, const std::string &name=DEFAULT_NAME, const Parameterised::Map ¶meters=DEFAULT_PARAMETERS)
Constructor.
void drawTesselation(const PositionVector &shape) const
most likely I'm reinventing the wheel here
std::vector< Position > vert