38template <
class T,
class S>
76 virtual bool addPolygon(
const std::string&
id,
const std::string& type,
78 double angle,
const std::string& imgFile,
80 bool fill,
double lineWidth,
bool ignorePruning =
false,
92 const std::vector<double>& timeSpan,
93 const std::vector<double>& alphaSpan,
123 virtual bool addPOI(
const std::string&
id,
const std::string& type,
const RGBColor& color,
const Position& pos,
bool geo,
124 const std::string& lane,
double posOverLane,
bool friendlyPos,
double posLat,
const std::string& icon,
double layer,
125 double angle,
const std::string& imgFile,
bool relativePath,
double width,
double height,
bool ignorePruning =
false);
131 virtual bool removePolygon(
const std::string&
id,
bool useLock =
true);
137 virtual bool removePOI(
const std::string&
id);
175 virtual void registerHighlight(
const std::string& objectID,
const int type,
const std::string& polygonID);
197 virtual void clearHighlight(
const std::string& objectID,
const int type, std::string& toRemove);
A map of named object pointers.
A wrapper for a Command function with parameter.
A point in 2D or 3D with translation and scaling methods.
Representation of a vehicle, person, or container.
Storage for geometrical objects.
virtual bool removePolygonDynamics(const std::string &polyID)
Remove dynamics (animation / tracking) for the given polygon.
virtual void clearHighlight(const std::string &objectID, const int type, std::string &toRemove)
virtual void cleanupPolygonDynamics(const std::string &id)
Unschedules the removal and update commands of the given polygon.
virtual bool removePOI(const std::string &id)
Removes a PoI from the container.
virtual SUMOTime polygonDynamicsUpdate(SUMOTime t, PolygonDynamics *pd)
Regular update event for updating polygon dynamics.
virtual void reshapePolygon(const std::string &id, const PositionVector &shape)
Assigns a shape to the named polygon.
std::map< std::string, std::map< int, std::string > > myHighlightPolygons
maps objects to a map of highlight types to highlighting polygons
std::map< std::string, PolygonDynamics * > myPolygonDynamics
stored PolygonDynamics
virtual bool removePolygon(const std::string &id, bool useLock=true)
Removes a polygon from the container.
virtual void removeTrackers(std::string objectID)
Remove all tracking polygons for the given object.
const Polygons & getPolygons() const
Returns all polygons.
virtual void movePOI(const std::string &id, const Position &pos)
Assigns a new position to the named PoI.
std::map< const std::string, ParametrisedWrappingCommand< ShapeContainer, PolygonDynamics * > * > myPolygonUpdateCommands
Command pointers for scheduled polygon update. Maps PolyID->Command.
virtual ~ShapeContainer()
Destructor.
std::map< std::string, std::string > myHighlightedObjects
inverse map to myHighlightPolygons saves the highlighted object for each polygon
virtual bool addPolygon(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath, const PositionVector &shape, bool geo, bool fill, double lineWidth, bool ignorePruning=false, const std::string &name=Shape::DEFAULT_NAME)
Builds a polygon using the given values and adds it to the container.
NamedObjectCont< SUMOPolygon * > Polygons
containers
std::map< const std::string, std::set< const SUMOPolygon * > > myTrackingPolygons
Information about tracked objects.
NamedObjectCont< PointOfInterest * > POIs
virtual PolygonDynamics * addPolygonDynamics(double simtime, std::string polyID, SUMOTrafficObject *trackedObject, const std::vector< double > &timeSpan, const std::vector< double > &alphaSpan, bool looped, bool rotate)
Adds dynamics (animation / tracking) to the given polygon.
ShapeContainer()
Constructor.
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, bool friendlyPos, double posLat, const std::string &icon, 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.
const POIs & getPOIs() const
Returns all pois.
virtual void addPolygonUpdateCommand(std::string polyID, ParametrisedWrappingCommand< ShapeContainer, PolygonDynamics * > *cmd)
Register update command (for descheduling at removal)
virtual bool add(SUMOPolygon *poly, bool ignorePruning=false)
add polygon
virtual void clearHighlights(const std::string &objectID, SUMOPolygon *p)
Clears all highlight information from the maps when the object leaves the net (Highlight polygons and...
virtual void registerHighlight(const std::string &objectID, const int type, const std::string &polygonID)
register highlight of the specified type if the given id
void clearState()
Remove all dynamics before quick-loading state.
Polygons myPolygons
stored Polygons
static const std::string DEFAULT_NAME