40 #ifdef CHECK_MEMORY_LEAKS
42 #endif // CHECK_MEMORY_LEAKS
74 SUMOReal angle,
const std::string& imgFile,
118 static_cast<Position*
>(p)->set(pos);
140 std::vector<GUIGlID> ret;
141 const std::map<std::string, PointOfInterest*>& pois =
getPOIs().
getMyMap();
142 for (std::map<std::string, PointOfInterest*>::const_iterator it = pois.begin(); it != pois.end(); ++it) {
143 ret.push_back(static_cast<GUIPointOfInterest*>(it->second)->getGlID());
152 std::vector<GUIGlID> ret;
154 for (std::map<std::string, SUMO::Polygon*>::const_iterator it = polygons.begin(); it != polygons.end(); ++it) {
155 ret.push_back(static_cast<GUIPolygon*>(it->second)->getGlID());
std::vector< GUIGlID > getPOIIds() const
Returns the gl-ids of all pois.
virtual bool add(const std::string &id, T item)
Adds 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.
virtual bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, SUMOReal layer, SUMOReal angle, const std::string &imgFile, const Position &pos, SUMOReal width, SUMOReal height)
Builds a POI using the given values and adds it to the container.
A RT-tree for efficient storing of SUMO's GL-objects.
virtual bool removePOI(const std::string &id)
Removes a PoI from the container.
const Polygons & getPolygons() const
Returns all polygons.
T get(const std::string &id) const
Retrieves 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 bool addPolygon(const std::string &id, const std::string &type, const RGBColor &color, SUMOReal layer, SUMOReal angle, const std::string &imgFile, const PositionVector &shape, bool fill)
Builds a polygon using the given values and adds it to the container.
virtual bool remove(const std::string &id)
Removes an item.
virtual ~GUIShapeContainer()
Destructor.
virtual void setShape(const PositionVector &shape)
set a new shape and update the tesselation
const POIs & getPOIs() const
Returns all pois.
GUIShapeContainer(SUMORTree &vis)
Constructor.
const IDMap & getMyMap() const
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.
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.