![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <Polygon.h>
Static Public Member Functions | |
| static void | add (const std::string &polygonID, const libsumo::TraCIPositionVector &shape, const libsumo::TraCIColor &color, bool fill=false, const std::string &polygonType="", int layer=0, double lineWidth=1) |
| static void | addDynamics (const std::string &polygonID, const std::string &trackedObjectID="", const std::vector< double > &timeSpan=std::vector< double >(), const std::vector< double > &alphaSpan=std::vector< double >(), bool looped=false, bool rotate=true) |
| static void | addHighlightPolygon (const std::string &objectID, const int type, const std::string &polygonID, const libsumo::TraCIPositionVector &shape, const libsumo::TraCIColor &color, bool fill, const std::string &polygonType, int layer, double lineWidth) |
| static void | cleanup () |
| static bool | exists (std::string polyID) |
| Checks if a polygon of the given name exists already in the simulation. | |
| static libsumo::TraCIColor | getColor (const std::string &polygonID) |
| static bool | getFilled (const std::string &polygonID) |
| static double | getLineWidth (const std::string &polygonID) |
| static libsumo::TraCIPositionVector | getShape (const std::string &polygonID) |
| static NamedRTree * | getTree () |
| Returns a tree filled with polygon instances. | |
| static std::string | getType (const std::string &polygonID) |
| static bool | handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData) |
| static std::shared_ptr< VariableWrapper > | makeWrapper () |
| static void | remove (const std::string &polygonID, int layer=0) |
| static void | setColor (const std::string &polygonID, const libsumo::TraCIColor &color) |
| static void | setFilled (std::string polygonID, bool filled) |
| static void | setLineWidth (std::string polygonID, double lineWidth) |
| static void | setShape (const std::string &polygonID, const libsumo::TraCIPositionVector &shape) |
| LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void | setType (const std::string &polygonID, const std::string &polygonType) |
| static void | storeShape (const std::string &id, PositionVector &shape) |
| Saves the shape of the requested object in the given container. | |
Private Member Functions | |
| Polygon ()=delete | |
| invalidated standard constructor | |
Static Private Member Functions | |
| static SUMOPolygon * | getPolygon (const std::string &id) |
| static SUMOTrafficObject * | getTrafficObject (const std::string &id) |
| Obtain a traffic object with the given id if one exists. | |
Static Private Attributes | |
| static ContextSubscriptionResults | myContextSubscriptionResults |
| static SubscriptionResults | mySubscriptionResults |
| static NamedRTree * | myTree |
|
privatedelete |
invalidated standard constructor
|
static |
Definition at line 122 of file libsumo/Polygon.cpp.
References add(), ShapeContainer::addPolygon(), Shape::DEFAULT_ANGLE, Shape::DEFAULT_IMG_FILE, NamedObjectCont< T >::get(), PositionVector::getBoxBoundary(), MSNet::getInstance(), ShapeContainer::getPolygons(), SUMOPolygon::getShape(), MSNet::getShapeContainer(), libsumo::Helper::makePositionVector(), libsumo::Helper::makeRGBColor(), and myTree.
Referenced by add(), and addHighlightPolygon().
|
static |
Definition at line 147 of file libsumo/Polygon.cpp.
References addDynamics(), MSEventControl::addEvent(), ShapeContainer::addPolygonDynamics(), ShapeContainer::addPolygonUpdateCommand(), MSNet::addVehicleStateListener(), MSNet::getEndOfTimestepEvents(), MSNet::getInstance(), PolygonDynamics::getPolygonID(), MSNet::getShapeContainer(), getTrafficObject(), MSNet::makeDynamicShapeUpdater(), ShapeContainer::polygonDynamicsUpdate(), SIMSTEP, and SIMTIME.
Referenced by addDynamics(), LIBSUMO_NAMESPACE::POI::highlight(), and LIBSUMO_NAMESPACE::Vehicle::highlight().
|
static |
Definition at line 140 of file libsumo/Polygon.cpp.
References add(), addHighlightPolygon(), MSNet::getInstance(), MSNet::getShapeContainer(), and ShapeContainer::registerHighlight().
Referenced by addHighlightPolygon(), LIBSUMO_NAMESPACE::POI::highlight(), and LIBSUMO_NAMESPACE::Vehicle::highlight().
|
static |
Definition at line 279 of file libsumo/Polygon.cpp.
References cleanup(), and myTree.
Referenced by cleanup().
|
static |
Checks if a polygon of the given name exists already in the simulation.
Definition at line 326 of file libsumo/Polygon.cpp.
References exists(), NamedObjectCont< T >::get(), MSNet::getInstance(), ShapeContainer::getPolygons(), and MSNet::getShapeContainer().
Referenced by exists(), LIBSUMO_NAMESPACE::POI::highlight(), and LIBSUMO_NAMESPACE::Vehicle::highlight().
|
static |
Definition at line 85 of file libsumo/Polygon.cpp.
References getColor(), getPolygon(), Shape::getShapeColor(), and libsumo::Helper::makeTraCIColor().
Referenced by getColor(), and handleVariable().
|
static |
Definition at line 75 of file libsumo/Polygon.cpp.
References getFilled(), and getPolygon().
Referenced by getFilled(), and handleVariable().
|
static |
Definition at line 80 of file libsumo/Polygon.cpp.
References getLineWidth(), and getPolygon().
Referenced by getLineWidth(), and handleVariable().
|
staticprivate |
Definition at line 224 of file libsumo/Polygon.cpp.
References NamedObjectCont< T >::get(), MSNet::getInstance(), getPolygon(), ShapeContainer::getPolygons(), and MSNet::getShapeContainer().
Referenced by getColor(), getFilled(), getLineWidth(), getPolygon(), getShape(), getType(), setColor(), setFilled(), setLineWidth(), setShape(), setType(), and storeShape().
|
static |
Definition at line 68 of file libsumo/Polygon.cpp.
References getPolygon(), getShape(), SUMOPolygon::getShape(), and libsumo::Helper::makeTraCIPositionVector().
Referenced by getShape(), and handleVariable().
|
staticprivate |
Obtain a traffic object with the given id if one exists.
Definition at line 234 of file libsumo/Polygon.cpp.
References MSTransportableControl::get(), MSNet::getInstance(), MSNet::getPersonControl(), getTrafficObject(), MSVehicleControl::getVehicle(), and MSNet::getVehicleControl().
Referenced by addDynamics(), and getTrafficObject().
|
static |
Returns a tree filled with polygon instances.
Definition at line 264 of file libsumo/Polygon.cpp.
References MSNet::getInstance(), ShapeContainer::getPolygons(), MSNet::getShapeContainer(), getTree(), and myTree.
Referenced by getTree().
|
static |
Definition at line 62 of file libsumo/Polygon.cpp.
References getPolygon(), and getType().
Referenced by getType(), and handleVariable().
|
static |
Definition at line 297 of file libsumo/Polygon.cpp.
References getColor(), getFilled(), getLineWidth(), getShape(), getType(), handleVariable(), libsumo::ID_COUNT, tcpip::Storage::readString(), tcpip::Storage::readUnsignedByte(), libsumo::TRACI_ID_LIST, libsumo::VAR_COLOR, libsumo::VAR_FILL, libsumo::VAR_PARAMETER, libsumo::VAR_PARAMETER_WITH_KEY, libsumo::VAR_SHAPE, libsumo::VAR_TYPE, and libsumo::VAR_WIDTH.
Referenced by handleVariable(), and makeWrapper().
|
static |
Definition at line 291 of file libsumo/Polygon.cpp.
References handleVariable(), makeWrapper(), myContextSubscriptionResults, and mySubscriptionResults.
Referenced by makeWrapper().
|
static |
Definition at line 192 of file libsumo/Polygon.cpp.
References NamedObjectCont< T >::get(), PositionVector::getBoxBoundary(), MSNet::getInstance(), ShapeContainer::getPolygons(), SUMOPolygon::getShape(), MSNet::getShapeContainer(), myTree, remove(), and ShapeContainer::removePolygon().
Referenced by remove().
|
static |
Definition at line 116 of file libsumo/Polygon.cpp.
References getPolygon(), libsumo::Helper::makeRGBColor(), and setColor().
Referenced by setColor().
|
static |
Definition at line 211 of file libsumo/Polygon.cpp.
References getPolygon(), SUMOPolygon::setFill(), and setFilled().
Referenced by setFilled().
|
static |
Definition at line 217 of file libsumo/Polygon.cpp.
References getPolygon(), setLineWidth(), and SUMOPolygon::setLineWidth().
Referenced by setLineWidth().
|
static |
Definition at line 107 of file libsumo/Polygon.cpp.
References MSNet::getInstance(), getPolygon(), MSNet::getShapeContainer(), libsumo::Helper::makePositionVector(), ShapeContainer::reshapePolygon(), and setShape().
Referenced by setShape().
|
static |
Definition at line 101 of file libsumo/Polygon.cpp.
References getPolygon(), and setType().
Referenced by setType().
|
static |
Saves the shape of the requested object in the given container.
| id | The id of the poi to retrieve |
| shape | The container to fill |
Definition at line 285 of file libsumo/Polygon.cpp.
References getPolygon(), and storeShape().
Referenced by storeShape().
|
staticprivate |
Definition at line 97 of file Polygon.h.
Referenced by makeWrapper().
|
staticprivate |
Definition at line 96 of file Polygon.h.
Referenced by makeWrapper().
|
staticprivate |