diff options
author | ccolin | 2021-01-02 01:16:06 +0100 |
---|---|---|
committer | ccolin | 2021-01-02 01:16:06 +0100 |
commit | bb0da810d945d98b25390c65ab3f34e695914fd6 (patch) | |
tree | 7ecbfe570db170b72b7e3096f78c3d60d0bf0acd /src/drone_controller.hh | |
parent | 861d505606d612bc328534dba3257e9ef9a1c269 (diff) |
move Drone and Waypoint declarations to their own files
Diffstat (limited to 'src/drone_controller.hh')
-rw-r--r-- | src/drone_controller.hh | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/drone_controller.hh b/src/drone_controller.hh index 93930a1..08dac42 100644 --- a/src/drone_controller.hh +++ b/src/drone_controller.hh @@ -1,47 +1,12 @@ #ifndef DRONE_CONTROLLER_HH #define DRONE_CONTROLLER_HH -#include "opengl_mesh.hh" +#include "drone.hh" #include <QJsonObject> -#include <QVector3D> #include <QTimer> -template <typename T> -static T lerp(T a, T b, double factor) { - return a + (factor * (b - a)); -} - - -struct Waypoint { - int frame; - QVector3D pos; - - Waypoint(unsigned frame, QVector3D pos); - Waypoint(const QJsonObject &json); -}; - - -class Drone { - static OpenGLMesh *mesh; - static bool mesh_initialized; - - QVector<Waypoint> waypoints; - int mesh_id; - QVector3D pos; - int id; - -public: - Drone(int id); - Drone(const QJsonObject &json); - const QVector<Waypoint> getWaypoints() const; - void setTo(int frame); - QVector3D getPos() const; - int getId() const; -}; - - class DroneController : public QObject { Q_OBJECT |