diff options
author | ccolin | 2021-01-03 19:55:04 +0100 |
---|---|---|
committer | ccolin | 2021-01-03 19:55:04 +0100 |
commit | 5326f294ceb95f1b535d145b5fdbdc221f560d53 (patch) | |
tree | a5d9dee2ebfa6413aedd764e901f3df994888614 /src/drone_controller.hh | |
parent | ec4017bb0ff221c5c3e192a165c8d60a54f3bedc (diff) |
add option to draw trajectories
Diffstat (limited to 'src/drone_controller.hh')
-rw-r--r-- | src/drone_controller.hh | 4 |
1 files changed, 4 insertions, 0 deletions
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<int, QVector<QPair<int, int>>> 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); }; |