 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef UTILS_SHAPES_POLYGONDYNAMICS_H_
20 #define UTILS_SHAPES_POLYGONDYNAMICS_H_
49 const std::vector<double>& timeSpan,
50 const std::vector<double>& alphaSpan,
std::unique_ptr< std::vector< double > > myAlphaSpan
Alpha values corresponding to.
Representation of a vehicle or person.
virtual ~PolygonDynamics()
Storage for geometrical objects.
void initTrackedPosition()
Initialize the object's position.
const std::string & getTrackedObjectID() const
double myCurrentTime
Current time.
const std::string & getPolygonID() const
std::vector< double >::const_iterator myPrevTime
Pointer to the next time points in timeSpan.
A RT-tree for efficient storing of SUMO's GL-objects.
bool rotate
Whether this polygon should be rotated with 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 myNextAlpha
void setRTree(SUMORTree *rtree)
Set the RTree.
bool tracking
Whether this polygon tracks an object.
SUMORTree * myVis
RTree will be supplied in case of GUI simulation to be updated on move.
bool looped
Whether animation should be looped.
std::vector< double >::const_iterator myNextTime
double myLastUpdateTime
The last time the animation has been updated.
double myTrackedObjectsInitialAngle
Initial angle of the tracked object.
bool animated
Whether this polygon is animated, i.e., whether timelines should be used to control properties.
std::string myTrackedObjectID
SUMOTrafficObject * myTrackedObject
An object tracked by the shape, deletion by caller.
SUMOPolygon * myPolygon
The polygon this dynamics acts upon.
std::unique_ptr< PositionVector > myOriginalShape
the original shape of the polygon (in case of tracking another object, this is converted to relative ...
SUMOTime update(SUMOTime t)
Updates the polygon according to its timeSpan and follows the tracked object.
SUMOPolygon * getPolygon() const
std::vector< double >::const_iterator myPrevAlpha
Pointer to the next alpha points in alphaSpan.
const std::string & getID() const
Returns the id.
void setAlpha(double alpha)
Sets the alpha value for the shape's color.
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.