![]() |
SUMO - Simulation of Urban MObility
|
Storage for geometrical objects. More...
#include <ShapeContainer.h>
Public Types | |
typedef NamedObjectCont< PointOfInterest * > | POIs |
typedef NamedObjectCont< SUMOPolygon * > | Polygons |
containers More... | |
Public Member Functions | |
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. More... | |
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. 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 Member Functions | |
virtual bool | add (SUMOPolygon *poly, bool ignorePruning=false) |
add polygon More... | |
virtual bool | add (PointOfInterest *poi, bool ignorePruning=false) |
add poi More... | |
Protected Attributes | |
POIs | myPOIs |
stored POIs More... | |
Polygons | myPolygons |
stored Polygons More... | |
Storage for geometrical objects.
Definition at line 47 of file ShapeContainer.h.
Definition at line 52 of file ShapeContainer.h.
containers
Definition at line 51 of file ShapeContainer.h.
ShapeContainer::ShapeContainer | ( | ) |
Constructor.
Definition at line 50 of file ShapeContainer.cpp.
|
virtual |
Destructor.
Definition at line 52 of file ShapeContainer.cpp.
|
protectedvirtual |
add polygon
Reimplemented in PCPolyContainer.
Definition at line 102 of file ShapeContainer.cpp.
References NamedObjectCont< T >::add(), Named::getID(), and myPolygons.
Referenced by PCPolyContainer::add(), addPOI(), addPolygon(), and getPOIs().
|
protectedvirtual |
add poi
Reimplemented in PCPolyContainer.
Definition at line 112 of file ShapeContainer.cpp.
References NamedObjectCont< T >::add(), Named::getID(), and myPOIs.
|
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] | pos | The position of the POI |
Reimplemented in GNENet, and GUIShapeContainer.
Definition at line 64 of file ShapeContainer.cpp.
References add().
Referenced by libsumo::POI::add(), and ShapeHandler::addPOI().
|
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] | geo | specify if shape was loaded as GEO coordinate |
[in] | fill | Whether the polygon shall be filled |
Reimplemented in GNENet, and GUIShapeContainer.
Definition at line 55 of file ShapeContainer.cpp.
References add().
Referenced by libsumo::Polygon::add(), NLHandler::addDistrict(), and ShapeHandler::addPoly().
|
inline |
Returns all pois.
Definition at line 128 of file ShapeContainer.h.
Referenced by ShapeHandler::addPOI(), libsumo::POI::getIDList(), libsumo::POI::getPoI(), TraCIServerAPI_POI::getPoI(), GUIShapeContainer::getPOIIds(), libsumo::POI::getTree(), GNESelectorFrame::onCmdInvert(), and GNENet::retrieveShapes().
|
inline |
Returns all polygons.
Definition at line 123 of file ShapeContainer.h.
References myPolygons.
Referenced by ShapeHandler::addPoly(), libsumo::Polygon::getIDList(), libsumo::Polygon::getPolygon(), TraCIServerAPI_Polygon::getPolygon(), GUIShapeContainer::getPolygonIDs(), libsumo::Polygon::getTree(), PCLoaderDlrNavteq::loadPolyFile(), GNESelectorFrame::onCmdInvert(), and GNENet::retrieveShapes().
|
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 84 of file ShapeContainer.cpp.
References NamedObjectCont< T >::get(), and myPOIs.
|
virtual |
Removes a PoI from the container.
[in] | id | The id of the PoI |
Reimplemented in GUIShapeContainer.
Definition at line 78 of file ShapeContainer.cpp.
References myPOIs, and NamedObjectCont< T >::remove().
Referenced by libsumo::POI::remove(), and GNEChange_Attribute::~GNEChange_Attribute().
|
virtual |
Removes a polygon from the container.
[in] | id | The id of the polygon |
Reimplemented in GUIShapeContainer.
Definition at line 72 of file ShapeContainer.cpp.
References myPolygons, and NamedObjectCont< T >::remove().
Referenced by libsumo::Polygon::remove(), and GNEChange_Attribute::~GNEChange_Attribute().
|
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 93 of file ShapeContainer.cpp.
References NamedObjectCont< T >::get(), myPolygons, and SUMOPolygon::setShape().
Referenced by libsumo::Polygon::setShape().
|
protected |
stored POIs
Definition at line 144 of file ShapeContainer.h.
Referenced by add(), GUIShapeContainer::addPOI(), GNENet::addPOI(), GNENet::changeShapeID(), GNENet::computeAndUpdate(), GNENet::generateShapeID(), GNENet::getGlIDs(), GNENet::getNumberOfShapes(), getPOIs(), GNENet::insertShape(), movePOI(), GUIShapeContainer::movePOI(), removePOI(), GUIShapeContainer::removePOI(), GNENet::removeShape(), GNENet::retrievePOI(), GNENet::retrievePOILane(), PCPolyContainer::save(), PCPolyContainer::saveDlrTDP(), GNENet::saveShapes(), GNEChange_Shape::~GNEChange_Shape(), and PCPolyContainer::~PCPolyContainer().
|
protected |
stored Polygons
Definition at line 141 of file ShapeContainer.h.
Referenced by add(), GUIShapeContainer::addPolygon(), GNENet::addPolygon(), GNENet::changeShapeID(), GNENet::computeAndUpdate(), GNENet::generateShapeID(), GNENet::getGlIDs(), GNENet::getNumberOfShapes(), getPolygons(), GNENet::insertShape(), removePolygon(), GUIShapeContainer::removePolygon(), GNENet::removeShape(), reshapePolygon(), GUIShapeContainer::reshapePolygon(), GNENet::retrievePolygon(), PCPolyContainer::save(), PCPolyContainer::saveDlrTDP(), GNENet::saveShapes(), GNEChange_Shape::~GNEChange_Shape(), and PCPolyContainer::~PCPolyContainer().