From bb0da810d945d98b25390c65ab3f34e695914fd6 Mon Sep 17 00:00:00 2001 From: ccolin Date: Sat, 2 Jan 2021 01:16:06 +0100 Subject: move Drone and Waypoint declarations to their own files --- src/drone.hh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/drone.hh (limited to 'src/drone.hh') diff --git a/src/drone.hh b/src/drone.hh new file mode 100644 index 0000000..6c43cc1 --- /dev/null +++ b/src/drone.hh @@ -0,0 +1,37 @@ +#ifndef DRONE_HH +#define DRONE_HH + +#include "opengl_mesh.hh" +#include "waypoint.hh" + +#include +#include +#include + + +template +static T lerp(T a, T b, double factor) { + return a + (factor * (b - a)); +} + + +class Drone { + static OpenGLMesh *mesh; + static bool mesh_initialized; + + QVector waypoints; + int mesh_id; + QVector3D pos; + int id; + +public: + Drone(int id); + Drone(const QJsonObject &json); + const QVector getWaypoints() const; + void setTo(int frame); + QVector3D getPos() const; + int getId() const; +}; + + +#endif -- cgit v1.2.3-70-g09d2