 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef SUMO_Polygon_H
18 #define SUMO_Polygon_H
39 class VariableWrapper;
49 static std::vector<std::string>
getIDList();
51 static std::string
getType(
const std::string& polygonID);
54 static bool getFilled(
const std::string& polygonID);
55 static double getLineWidth(
const std::string& polygonID);
56 static std::string
getParameter(
const std::string& polygonID,
const std::string& key);
57 static void setType(
const std::string& polygonID,
const std::string&
setType);
60 static void add(
const std::string& polygonID,
const TraCIPositionVector& shape,
const TraCIColor& color,
bool fill =
false,
const std::string& polygonType =
"",
int layer = 0,
double lineWidth = 1);
62 static void addDynamics(
const std::string& polygonID,
const std::string& trackedID =
"",
const std::vector<double>& timeSpan = std::vector<double>(),
const std::vector<double>& alphaSpan = std::vector<double>(),
bool looped =
false,
bool rotate =
true);
63 static void remove(
const std::string& polygonID,
int layer = 0);
65 static void setFilled(std::string polygonID,
bool filled);
66 static void setLineWidth(std::string polygonID,
double lineWidth);
67 static void setParameter(
const std::string& polygonID,
const std::string& key,
const std::string& value);
72 static void addHighlightPolygon(
const std::string& objectID,
const int type,
const std::string& polygonID,
const TraCIPositionVector& shape,
const TraCIColor& color,
bool fill,
const std::string& polygonType,
int layer,
double lineWidth);
85 static std::shared_ptr<VariableWrapper>
makeWrapper();
90 static bool exists(std::string polyID);
110 #endif //SUMO_Polygon_H
Representation of a vehicle or person.
static void setColor(const std::string &polygonID, const TraCIColor &c)
static void add(const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &color, bool fill=false, const std::string &polygonType="", int layer=0, double lineWidth=1)
#define LIBSUMO_SUBSCRIPTION_API
static NamedRTree * getTree()
Returns a tree filled with polygon instances.
static void addDynamics(const std::string &polygonID, const std::string &trackedID="", const std::vector< double > &timeSpan=std::vector< double >(), const std::vector< double > &alphaSpan=std::vector< double >(), bool looped=false, bool rotate=true)
static std::vector< std::string > getIDList()
static SUMOPolygon * getPolygon(const std::string &id)
static std::string getParameter(const std::string &polygonID, const std::string &key)
static void remove(const std::string &polygonID, int layer=0)
std::map< std::string, SubscriptionResults > ContextSubscriptionResults
static ContextSubscriptionResults myContextSubscriptionResults
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
static SUMOTrafficObject * getTrafficObject(const std::string &id)
Obtain a traffic object with the given id if one exists.
static TraCIColor getColor(const std::string &polygonID)
static LIBSUMO_SUBSCRIPTION_API void addHighlightPolygon(const std::string &objectID, const int type, const std::string &polygonID, const TraCIPositionVector &shape, const TraCIColor &color, bool fill, const std::string &polygonType, int layer, double lineWidth)
static double getLineWidth(const std::string &polygonID)
static void storeShape(const std::string &id, PositionVector &shape)
Saves the shape of the requested object in the given container.
static void setFilled(std::string polygonID, bool filled)
static std::string getType(const std::string &polygonID)
static bool exists(std::string polyID)
Checks if a polygon of the given name exists already in the simulation.
static void setParameter(const std::string &polygonID, const std::string &key, const std::string &value)
static void setType(const std::string &polygonID, const std::string &setType)
Polygon()=delete
invalidated standard constructor
static TraCIPositionVector getShape(const std::string &polygonID)
A RT-tree for efficient storing of SUMO's Named objects.
static bool getFilled(const std::string &polygonID)
static std::shared_ptr< VariableWrapper > makeWrapper()
static SubscriptionResults mySubscriptionResults
static void setLineWidth(std::string polygonID, double lineWidth)
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}