#pragma once
#include <string>
#include <vector>
#include <libsumo/TraCIDefs.h>
#include <libsumo/TraCIConstants.h>
#ifndef LIBTRACI
class NamedRTree;
class PositionVector;
class SUMOPolygon;
class SUMOTrafficObject;
#endif
namespace LIBSUMO_NAMESPACE {
class Polygon {
public:
static std::string getType(const std::string& polygonID);
static libsumo::TraCIPositionVector getShape(const std::string& polygonID);
static libsumo::TraCIColor getColor(const std::string& polygonID);
static bool getFilled(const std::string& polygonID);
static double getLineWidth(const std::string& polygonID);
LIBSUMO_ID_PARAMETER_API
LIBSUMO_SUBSCRIPTION_API
static void setType(const std::string& polygonID, const std::string& polygonType);
static void setShape(const std::string& polygonID, const libsumo::TraCIPositionVector& shape);
static void setColor(const std::string& polygonID, const libsumo::TraCIColor& color);
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 remove(const std::string& polygonID, int layer = 0);
static void setFilled(std::string polygonID, bool filled);
static void setLineWidth(std::string polygonID, double lineWidth);
#ifndef LIBTRACI
#ifndef SWIG
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 NamedRTree* getTree();
static void cleanup();
static void storeShape(const std::string& id, PositionVector& shape);
static std::shared_ptr<VariableWrapper> makeWrapper();
static bool handleVariable(const std::string& objID, const int variable, VariableWrapper* wrapper, tcpip::Storage* paramData);
static bool exists(std::string polyID);
private:
static SUMOPolygon* getPolygon(const std::string& id);
static SUMOTrafficObject* getTrafficObject(const std::string& id);
private:
static SubscriptionResults mySubscriptionResults;
static ContextSubscriptionResults myContextSubscriptionResults;
static NamedRTree* myTree;
#endif
#endif
Polygon() = delete;
};
}