-
Notifications
You must be signed in to change notification settings - Fork 83
/
locpoint.h
96 lines (84 loc) · 2.77 KB
/
locpoint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
Copyright 2012 Benjamin Vedder [email protected]
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LOCPOINT_H
#define LOCPOINT_H
#include <QPointF>
#include <QString>
#include <QColor>
class LocPoint
{
public:
LocPoint(double x = 0, double y = 0, double height = 0, double roll = 0,
double pitch = 0, double yaw = 0, double speed = 0.5, double radius = 5.0,
double sigma = 0.0, QColor color = Qt::darkGreen, qint32 time = 0,
int id = 0, bool drawLine = true, quint32 attributes = 0);
LocPoint(const LocPoint &point);
double getX() const;
double getY() const;
double getHeight() const;
double getRoll() const;
double getPitch() const;
double getYaw() const;
double getSpeed() const;
QPointF getPoint() const;
QPointF getPointMm() const;
double getRadius() const;
double getSigma() const;
QString getInfo() const;
QColor getColor() const;
qint32 getTime() const;
int getId() const;
bool getDrawLine() const;
quint32 getAttributes() const;
double getDistanceTo(const LocPoint &point) const;
double getDistanceTo3d(const LocPoint &point) const;
void setX(double x);
void setY(double y);
void setHeight(double height);
void setXY(double x, double y);
void scaleXY(double scalefactor);
void setRoll(double roll);
void setPitch(double pitch);
void setYaw(double alpha);
void setSpeed(double speed);
void setRadius(double radius);
void setSigma(double sigma);
void setInfo(const QString &info);
void setColor(const QColor &color);
void setTime(const qint32 &time);
void setId(int id);
void setDrawLine(bool drawLine);
void setAttributes(quint32 attributes);
// Operators
LocPoint& operator=(const LocPoint& point);
bool operator==(const LocPoint& point);
bool operator!=(const LocPoint& point);
private:
double mX;
double mY;
double mHeight;
double mRoll;
double mPitch;
double mYaw;
double mSpeed;
double mRadius;
double mSigma;
QString mInfo;
QColor mColor;
qint32 mTime;
int mId;
bool mDrawLine;
quint32 mAttributes;
};
#endif // LOCPOINT_H