50 const std::string& lane,
double posOverLane,
double posLat,
double layer,
double angle,
51 const std::string& imgFile,
double width,
double height,
bool ) {
52 GUIPointOfInterest* p =
new GUIPointOfInterest(
id, type, color, pos, geo, lane, posOverLane, posLat, layer, angle, imgFile, width, height);
67 double angle,
const std::string& imgFile,
111 static_cast<Position*
>(p)->
set(pos);
133 std::vector<GUIGlID> ret;
134 for (
const auto& poi :
getPOIs()) {
135 ret.push_back(static_cast<GUIPointOfInterest*>(poi.second)->getGlID());
144 std::vector<GUIGlID> ret;
146 ret.push_back(static_cast<GUIPolygon*>(poly.second)->getGlID());
virtual bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, double posLat, double layer, double angle, const std::string &imgFile, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
const Polygons & getPolygons() const
Returns all polygons.
std::vector< GUIGlID > getPOIIds() const
Returns the gl-ids of all pois.
virtual bool addPolygon(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, const PositionVector &shape, bool geo, bool fill, bool ignorePruning=false)
Builds a polygon using the given values and adds it to the container.
T get(const std::string &id) const
Retrieves an item.
Polygons myPolygons
stored Polygons
SUMORTree & myVis
The RTree structure to add and remove visualization elements.
void removeAdditionalGLObject(GUIGlObject *o)
Removes an additional object (detector/shape/trigger) from being visualised.
A RT-tree for efficient storing of SUMO's GL-objects.
virtual bool removePOI(const std::string &id)
Removes a PoI from the container.
bool add(const std::string &id, T item)
Adds an item.
A point in 2D or 3D with translation and scaling methods.
virtual void movePOI(const std::string &id, const Position &pos)
Assigns a new position to the named PoI.
MFXMutex myLock
The mutex for adding/removing operations.
virtual ~GUIShapeContainer()
Destructor.
virtual void setShape(const PositionVector &shape)
set a new shape and update the tesselation
GUIShapeContainer(SUMORTree &vis)
Constructor.
void addAdditionalGLObject(GUIGlObject *o)
Adds an additional object (detector/shape/trigger) for visualisation.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
virtual bool removePolygon(const std::string &id)
Removes a polygon from the container.
bool remove(const std::string &id, const bool del=true)
Removes an item.
std::vector< GUIGlID > getPolygonIDs() const
Returns the gl-ids of all polygons.
virtual void reshapePolygon(const std::string &id, const PositionVector &shape)
Assigns a shape to the named polygon.
const POIs & getPOIs() const
Returns all pois.