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)
98 bool geo,
bool fill,
double lineWidth,
double layer = 0,
double angle = 0,
const std::string& imgFile =
"",
99 bool relativePath =
false,
const std::string& name =
DEFAULT_NAME);
173 const bool disableSelectionColor =
false,
174 const int alphaOverride = -1,
175 const bool disableText =
false);
A class that stores a 2D geometrical boundary.
A window containing a gl-object's parameter.
bool isActive(void) const
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
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.
virtual const std::string getOptionalName() const override
Returns the name of the object (default "")
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
void activate(bool isActive)
bool myIsActive
Is the polygon will be drawn or not.
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.
const std::string getShapeName() const
Returns the name of the Shape.
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
~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
perform the tesselation / drawing
most likely I'm reinventing the wheel here
std::vector< Position > vert