1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-26 19:19:16 +02:00

Added traffic lines arrows

This commit is contained in:
2022-11-14 22:29:27 +01:00
parent c09525f306
commit bd2d66ecd3
8 changed files with 116 additions and 2 deletions

25
src/common/linec.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef LINEC_H
#define LINEC_H
#include "coordinates.h"
class LineC
{
public:
LineC(const Coordinates &c1, const Coordinates &c2) : _c1(c1), _c2(c2) {}
const Coordinates &c1() const {return _c1;}
const Coordinates &c2() const {return _c2;}
Coordinates pointAt(double t) const
{
return Coordinates(
_c1.lon() + (_c2.lon() - _c1.lon()) * t,
_c1.lat() + (_c2.lat() - _c1.lat()) * t);
}
private:
Coordinates _c1, _c2;
};
#endif // LINEC_H