From 5326f294ceb95f1b535d145b5fdbdc221f560d53 Mon Sep 17 00:00:00 2001 From: ccolin Date: Sun, 3 Jan 2021 19:55:04 +0100 Subject: add option to draw trajectories --- src/drone_controller.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/drone_controller.hh') diff --git a/src/drone_controller.hh b/src/drone_controller.hh index 11d7395..7ff087a 100644 --- a/src/drone_controller.hh +++ b/src/drone_controller.hh @@ -23,12 +23,15 @@ class DroneController : public QObject, public Painter { double sphere_radius = 0; QTimer sphere_timer; QMap>> collisions; + bool draw_trajectories = false; static OpenGLMesh *sphere; static const unsigned char sphere_neutral[]; static bool collides(const Drone &a, const Drone &b, double radius); + void drawTrajectory(QOpenGLExtraFunctions *f, const Drone &d) const; + public: DroneController(const QJsonObject &json); int getDuration() const; @@ -51,6 +54,7 @@ public slots: void seek(int frame); void computeCollisions(double sphere_radius); void displaySpheres(double sphere_radius); + void setDrawTrajectories(bool enable); }; -- cgit v1.2.3-70-g09d2