2016-11-05 17:33:29 +01:00
|
|
|
#ifndef PATH_H
|
|
|
|
#define PATH_H
|
|
|
|
|
|
|
|
#include <QVector>
|
|
|
|
#include "coordinates.h"
|
|
|
|
|
2016-11-14 22:12:43 +01:00
|
|
|
class PathPoint
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PathPoint() :
|
|
|
|
_coordinates(Coordinates()), _distance(NAN) {}
|
|
|
|
PathPoint(const Coordinates &coordinates, qreal distance)
|
|
|
|
: _coordinates(coordinates), _distance(distance) {}
|
|
|
|
|
|
|
|
const Coordinates &coordinates() const {return _coordinates;}
|
|
|
|
qreal distance() const {return _distance;}
|
|
|
|
|
|
|
|
private:
|
|
|
|
Coordinates _coordinates;
|
|
|
|
qreal _distance;
|
|
|
|
};
|
|
|
|
|
|
|
|
Q_DECLARE_TYPEINFO(PathPoint, Q_PRIMITIVE_TYPE);
|
|
|
|
QDebug operator<<(QDebug dbg, const PathPoint &point);
|
|
|
|
|
|
|
|
typedef QVector<PathPoint> Path;
|
2016-11-05 17:33:29 +01:00
|
|
|
|
|
|
|
#endif // PATH_H
|