47 std::vector<std::string>
49 std::vector<std::string> ids;
107 POI::add(
const std::string& poiID,
double x,
double y,
const TraCIColor& color,
const std::string& poiType,
int layer) {
109 return shapeCont.
addPOI(poiID, poiType,
Helper::makeRGBColor(color),
Position(x, y),
false,
"", 0, 0, (
double)layer,
138 if (sumoPoi ==
nullptr) {
149 for (
const auto& i : shapeCont.
getPOIs()) {
150 const float cmin[2] = {(float)i.second->x(), (float)i.second->y()};
151 const float cmax[2] = {(float)i.second->x(), (float)i.second->y()};
152 t->
Insert(cmin, cmax, i.second);
160 shape.push_back(*
getPoI(
id));
164 std::shared_ptr<VariableWrapper>
void Insert(const float a_min[2], const float a_max[2], Named *const &a_data)
Insert entry.
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
virtual bool wrapInt(const std::string &objID, const int variable, const int value)=0
static TraCIColor makeTraCIColor(const RGBColor &color)
static const std::string DEFAULT_IMG_FILE
static LIBSUMO_SUBSCRIPTION_API NamedRTree * getTree()
Returns a tree filled with PoI instances.
static bool remove(const std::string &poiID, int layer=0)
void setShapeColor(const RGBColor &col)
Sets a new color.
static void setParameter(const std::string &poiID, const std::string &key, const std::string &value)
static void setColor(const std::string &poiID, const TraCIColor &c)
static TraCIPosition makeTraCIPosition(const Position &position, const bool includeZ=false)
void setShapeType(const std::string &type)
Sets a new type.
T get(const std::string &id) const
Retrieves an item.
static const double DEFAULT_IMG_HEIGHT
A RT-tree for efficient storing of SUMO's Named objects.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
Storage for geometrical objects.
static bool add(const std::string &poiID, double x, double y, const TraCIColor &color, const std::string &poiType="", int layer=0)
virtual bool wrapString(const std::string &objID, const int variable, const std::string &value)=0
void insertIDs(std::vector< std::string > &into) const
static std::shared_ptr< VariableWrapper > makeWrapper()
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
static RGBColor makeRGBColor(const TraCIColor &color)
virtual void movePOI(const std::string &id, const Position &pos)
Assigns a new position to the named PoI.
ShapeContainer & getShapeContainer()
Returns the shapes container.
A point in 2D or 3D with translation and scaling methods.
virtual bool removePOI(const std::string &id)
Removes a PoI from the container.
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
static const bool DEFAULT_RELATIVEPATH
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, bool relativePath, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
static SubscriptionResults mySubscriptionResults
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
static void setType(const std::string &poiID, const std::string &setType)
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOMAIN)
static std::vector< std::string > getIDList()
virtual bool wrapPosition(const std::string &objID, const int variable, const TraCIPosition &value)=0
static std::string getParameter(const std::string &poiID, const std::string &key)
virtual bool wrapColor(const std::string &objID, const int variable, const TraCIColor &value)=0
static ContextSubscriptionResults myContextSubscriptionResults
static TraCIPosition getPosition(const std::string &poiID, const bool includeZ=false)
static std::string getType(const std::string &poiID)
const std::string getParameter(const std::string &key, const std::string &defaultValue="") const
Returns the value for a given key.
static PointOfInterest * getPoI(const std::string &id)
static const double DEFAULT_IMG_WIDTH
virtual bool wrapStringList(const std::string &objID, const int variable, const std::vector< std::string > &value)=0
static TraCIColor getColor(const std::string &poiID)
static void storeShape(const std::string &id, PositionVector &shape)
Saves the shape of the requested object in the given container.
static void setPosition(const std::string &poiID, double x, double y)
static const double DEFAULT_ANGLE
const POIs & getPOIs() const
Returns all pois.