aboutsummaryrefslogtreecommitdiff
path: root/src/drone_controller.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/drone_controller.hh')
-rw-r--r--src/drone_controller.hh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/drone_controller.hh b/src/drone_controller.hh
index 18fc722..93930a1 100644
--- a/src/drone_controller.hh
+++ b/src/drone_controller.hh
@@ -29,12 +29,16 @@ class Drone {
QVector<Waypoint> waypoints;
int mesh_id;
+ QVector3D pos;
+ int id;
public:
- Drone();
+ Drone(int id);
Drone(const QJsonObject &json);
const QVector<Waypoint> getWaypoints() const;
void setTo(int frame);
+ QVector3D getPos() const;
+ int getId() const;
};
@@ -48,6 +52,8 @@ class DroneController : public QObject {
QTimer timer;
bool paused = true;
+ static bool collides(const Drone &a, const Drone &b, double radius);
+
public:
DroneController(const QJsonObject &json);
int getDuration() const;
@@ -56,6 +62,7 @@ signals:
void frameChanged(int frame);
void playing();
void pausing();
+ void collision(int idA, int idB, int frame);
private slots:
void step();
@@ -66,6 +73,7 @@ public slots:
void suspend();
void resume();
void seek(int frame);
+ void computeCollisions(double sphere_radius);
};