52 const std::vector<double>& timeSpan,
53 const std::vector<double>& alphaSpan,
const std::string & getID() const
Returns the id.
std::vector< double >::const_iterator myNextAlpha
PolygonDynamics(double creationTime, SUMOPolygon *p, SUMOTrafficObject *trackedObject, const std::vector< double > &timeSpan, const std::vector< double > &alphaSpan, bool looped, bool rotate)
Constructor that takes a SUMOPolygon and adds timelines for the properties to be modified dynamically...
std::unique_ptr< Position > myTrackedObjectsInitialPositon
Initial position of the tracked object.
bool looped
Whether animation should be looped.
virtual ~PolygonDynamics()
void initTrackedPosition()
Initialize the object's position.
void setRTree(SUMORTree *rtree)
Set the RTree.
bool tracking
Whether this polygon tracks an object.
const std::string & getPolygonID() const
std::string myTrackedObjectID
const std::string & getTrackedObjectID() const
double myTrackedObjectsInitialAngle
Initial angle of the tracked object.
std::unique_ptr< std::vector< double > > myTimeSpan
Time points corresponding to the anchor values of the dynamic properties.
std::vector< double >::const_iterator myNextTime
void setAlpha(double alpha)
Sets the alpha value for the shape's color.
bool animated
Whether this polygon is animated, i.e., whether timelines should be used to control properties.
double myCurrentTime
Current time.
SUMOTime update(SUMOTime t)
Updates the polygon according to its timeSpan and follows the tracked object.
SUMOTrafficObject * myTrackedObject
An object tracked by the shape, deletion by caller.
std::vector< double >::const_iterator myPrevTime
Pointer to the next time points in timeSpan.
SUMOPolygon * myPolygon
The polygon this dynamics acts upon.
bool rotate
Whether this polygon should be rotated with the tracked object.
SUMOPolygon * getPolygon() const
std::unique_ptr< PositionVector > myOriginalShape
the original shape of the polygon (in case of tracking another object, this is converted to relative ...
std::unique_ptr< std::vector< double > > myAlphaSpan
Alpha values corresponding to.
SUMORTree * myVis
RTree will be supplied in case of GUI simulation to be updated on move.
double myLastUpdateTime
The last time the animation has been updated.
std::vector< double >::const_iterator myPrevAlpha
Pointer to the next alpha points in alphaSpan.
A RT-tree for efficient storing of SUMO's GL-objects.
Representation of a vehicle, person, or container.
Storage for geometrical objects.