37 class VariableWrapper;
47 static std::string
getType(
const std::string& polygonID);
50 static bool getFilled(
const std::string& polygonID);
51 static double getLineWidth(
const std::string& polygonID);
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);
68 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);
82 static std::shared_ptr<VariableWrapper>
makeWrapper();
87 static bool exists(std::string polyID);
#define LIBSUMO_ID_PARAMETER_API
#define LIBSUMO_SUBSCRIPTION_API
A RT-tree for efficient storing of SUMO's Named objects.
Representation of a vehicle, person, or container.
static bool getFilled(const std::string &polygonID)
static NamedRTree * myTree
static void setShape(const std::string &polygonID, const TraCIPositionVector &shape)
static void setLineWidth(std::string polygonID, double lineWidth)
static double getLineWidth(const std::string &polygonID)
static SUMOTrafficObject * getTrafficObject(const std::string &id)
Obtain a traffic object with the given id if one exists.
static std::string getType(const std::string &polygonID)
static NamedRTree * getTree()
Returns a tree filled with polygon instances.
static SUMOPolygon * getPolygon(const std::string &id)
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 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 TraCIColor getColor(const std::string &polygonID)
static void setColor(const std::string &polygonID, const TraCIColor &color)
static void storeShape(const std::string &id, PositionVector &shape)
Saves the shape of the requested object in the given container.
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)
static void remove(const std::string &polygonID, int layer=0)
static TraCIPositionVector getShape(const std::string &polygonID)
static ContextSubscriptionResults myContextSubscriptionResults
static void setFilled(std::string polygonID, bool filled)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper)
static bool exists(std::string polyID)
Checks if a polygon of the given name exists already in the simulation.
Polygon()=delete
invalidated standard constructor
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setType(const std::string &polygonID, const std::string &setType)
static std::shared_ptr< VariableWrapper > makeWrapper()
static SubscriptionResults mySubscriptionResults
std::vector< TraCIPosition > TraCIPositionVector
std::map< std::string, TraCIResults > SubscriptionResults
{object->{variable->value}}
std::map< std::string, SubscriptionResults > ContextSubscriptionResults