 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef SUMO_Polygon_H
17 #define SUMO_Polygon_H
38 class VariableWrapper;
48 static std::vector<std::string>
getIDList();
50 static std::string
getType(
const std::string& polygonID);
53 static bool getFilled(
const std::string& polygonID);
54 static double getLineWidth(
const std::string& polygonID);
55 static std::string
getParameter(
const std::string& polygonID,
const std::string& key);
56 static void setType(
const std::string& polygonID,
const std::string&
setType);
59 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);
61 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);
62 static void remove(
const std::string& polygonID,
int layer = 0);
64 static void setFilled(std::string polygonID,
bool filled);
65 static void setLineWidth(std::string polygonID,
double lineWidth);
66 static void setParameter(
const std::string& polygonID,
const std::string& key,
const std::string& value);
71 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);
84 static std::shared_ptr<VariableWrapper>
makeWrapper();
89 static bool exists(std::string polyID);
109 #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}}