|
SUMO - Simulation of Urban MObility
|
Storage for geometrical objects. More...
#include <ShapeContainer.h>


Public Types | |
| typedef NamedObjectCont< PointOfInterest * > | POIs |
| typedef NamedObjectCont< SUMO::Polygon * > | Polygons |
Public Member Functions | |
| 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. More... | |
| 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. More... | |
| const POIs & | getPOIs () const |
| Returns all pois. More... | |
| const Polygons & | getPolygons () const |
| Returns all polygons. More... | |
| virtual void | movePOI (const std::string &id, const Position &pos) |
| Assigns a new position to the named PoI. More... | |
| virtual bool | removePOI (const std::string &id) |
| Removes a PoI from the container. More... | |
| virtual bool | removePolygon (const std::string &id) |
| Removes a polygon from the container. More... | |
| virtual void | reshapePolygon (const std::string &id, const PositionVector &shape) |
| Assigns a shape to the named polygon. More... | |
| ShapeContainer () | |
| Constructor. More... | |
| virtual | ~ShapeContainer () |
| Destructor. More... | |
Protected Attributes | |
| POIs | myPOIs |
| stored POIs More... | |
| Polygons | myPolygons |
| stored Polygons More... | |
Storage for geometrical objects.
Definition at line 56 of file ShapeContainer.h.
| typedef NamedObjectCont< PointOfInterest*> ShapeContainer::POIs |
Definition at line 66 of file ShapeContainer.h.
| typedef NamedObjectCont< SUMO::Polygon* > ShapeContainer::Polygons |
Definition at line 65 of file ShapeContainer.h.
| ShapeContainer::ShapeContainer | ( | ) |
Constructor.
Definition at line 57 of file ShapeContainer.cpp.
|
virtual |
Destructor.
Definition at line 59 of file ShapeContainer.cpp.
|
virtual |
Builds a POI using the given values and adds it to the container.
| [in] | id | The name of the POI |
| [in] | type | The (abstract) type of the POI |
| [in] | color | The color of the POI |
| [in] | layer | The layer of the POI |
| [in] | angle | The rotation of the POI |
| [in] | imgFile | The raster image of the POI |
| [in] | pos | The position of the POI |
| [in] | width | The width of the POI image |
| [in] | height | The height of the POI image |
Reimplemented in GUIShapeContainer.
Definition at line 76 of file ShapeContainer.cpp.
References NamedObjectCont< T >::add(), and myPOIs.
Referenced by ShapeHandler::addPOI(), and TraCIServerAPI_POI::processSet().
|
virtual |
Builds a polygon using the given values and adds it to the container.
| [in] | id | The name of the polygon |
| [in] | type | The (abstract) type of the polygon |
| [in] | color | The color of the polygon |
| [in] | layer | The layer of the polygon |
| [in] | angle | The rotation of the polygon |
| [in] | imgFile | The raster image of the polygon |
| [in] | shape | The shape of the polygon |
| [in] | fill | Whether the polygon shall be filled |
Reimplemented in GUIShapeContainer.
Definition at line 62 of file ShapeContainer.cpp.
References NamedObjectCont< T >::add(), and myPolygons.
Referenced by NLHandler::addDistrict(), ShapeHandler::addPoly(), and TraCIServerAPI_Polygon::processSet().
|
inline |
Returns all pois.
Definition at line 140 of file ShapeContainer.h.
Referenced by TraCIServerAPI_POI::getPoI(), GUIShapeContainer::getPOIIds(), TraCIServerAPI_POI::getTree(), and TraCIServerAPI_POI::processGet().
|
inline |
Returns all polygons.
Definition at line 134 of file ShapeContainer.h.
Referenced by TraCIServerAPI_Polygon::getPolygon(), GUIShapeContainer::getPolygonIDs(), TraCIServerAPI_Polygon::getTree(), and TraCIServerAPI_Polygon::processGet().
|
virtual |
Assigns a new position to the named PoI.
| [in] | id | The id of the PoI to move |
| [in] | pos | The PoI's new position |
Reimplemented in GUIShapeContainer.
Definition at line 102 of file ShapeContainer.cpp.
References NamedObjectCont< T >::get(), and myPOIs.
Referenced by TraCIServerAPI_POI::processSet().
|
virtual |
Removes a PoI from the container.
| [in] | id | The id of the PoI |
Reimplemented in GUIShapeContainer.
Definition at line 95 of file ShapeContainer.cpp.
References myPOIs, and NamedObjectCont< T >::remove().
Referenced by GNEViewNet::onLeftBtnPress(), and TraCIServerAPI_POI::processSet().
|
virtual |
Removes a polygon from the container.
| [in] | id | The id of the polygon |
Reimplemented in GUIShapeContainer.
Definition at line 89 of file ShapeContainer.cpp.
References myPolygons, and NamedObjectCont< T >::remove().
Referenced by TraCIServerAPI_Polygon::processSet().
|
virtual |
Assigns a shape to the named polygon.
| [in] | id | The id of the polygon to reshape |
| [in] | shape | The polygon's new shape |
Reimplemented in GUIShapeContainer.
Definition at line 111 of file ShapeContainer.cpp.
References NamedObjectCont< T >::get(), myPolygons, and SUMO::Polygon::setShape().
Referenced by TraCIServerAPI_Polygon::processSet().
|
protected |
stored POIs
Definition at line 150 of file ShapeContainer.h.
Referenced by GUIShapeContainer::addPOI(), addPOI(), GUIShapeContainer::movePOI(), movePOI(), GUIShapeContainer::removePOI(), and removePOI().
|
protected |
stored Polygons
Definition at line 147 of file ShapeContainer.h.
Referenced by GUIShapeContainer::addPolygon(), addPolygon(), GUIShapeContainer::removePolygon(), removePolygon(), GUIShapeContainer::reshapePolygon(), and reshapePolygon().