53 const RGBColor& color,
double layer,
double angle,
const std::string& imgFile,
54 const Position& pos,
double width,
double height,
bool ) {
70 double angle,
const std::string& imgFile,
114 static_cast<Position*
>(p)->
set(pos);
136 std::vector<GUIGlID> ret;
137 const std::map<std::string, PointOfInterest*>& pois =
getPOIs().
getMyMap();
138 for (std::map<std::string, PointOfInterest*>::const_iterator it = pois.begin(); it != pois.end(); ++it) {
139 ret.push_back(static_cast<GUIPointOfInterest*>(it->second)->getGlID());
148 std::vector<GUIGlID> ret;
149 const std::map<std::string, SUMO::Polygon*>& polygons =
getPolygons().getMyMap();
150 for (std::map<std::string, SUMO::Polygon*>::const_iterator it = polygons.begin(); it != polygons.end(); ++it) {
151 ret.push_back(static_cast<GUIPolygon*>(it->second)->getGlID());
virtual bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, const Position &pos, 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.
virtual bool add(const std::string &id, T item)
Adds an item.
std::vector< GUIGlID > getPOIIds() const
Returns the gl-ids of all pois.
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.
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 remove(const std::string &id)
Removes an item.
const IDMap & getMyMap() const
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 addPolygon(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, const PositionVector &shape, bool fill, bool ignorePruning=false)
Builds a polygon using the given values and adds it to the container.
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.
const POIs & getPOIs() const
Returns all pois.