fix collision detection

This commit is contained in:
ccolin 2021-01-03 13:35:26 +01:00
parent 7e0554bf65
commit 0a6b133c19
3 changed files with 2 additions and 3 deletions

View File

@ -116,7 +116,7 @@ void DroneController::seek(int frame) {
void DroneController::computeCollisions(double sphere_radius) {
double sqDist = sphere_radius * sphere_radius * 2;
double sqDist = sphere_radius * sphere_radius * 4;
for (int i = 0; i < duration; i++) {
for (Drone &a : drones) {
a.setTo(i);

View File

@ -92,8 +92,6 @@ void MainWindow::open(const QString &path) {
settings_pane->setEnabled(true);
glw.setPainter(dc);
dc->computeCollisions(.1);
pause();
}

View File

@ -10,6 +10,7 @@
SettingsPane::SettingsPane(QWidget *parent)
:QWidget(parent) {
QDoubleSpinBox *sphere_radius = new QDoubleSpinBox();
sphere_radius->setSingleStep(.1);
QCheckBox *show_trajectories = new QCheckBox();
QCheckBox *show_support_lines = new QCheckBox();
collisions = new QListWidget();