|
|
|
@ -16,6 +16,7 @@ |
|
|
|
|
#include <QThread> |
|
|
|
|
#include <QCloseEvent> |
|
|
|
|
#include <QTimer> |
|
|
|
|
#include "Overlay.h" |
|
|
|
|
|
|
|
|
|
MainWindow::MainWindow() { |
|
|
|
|
simulationThread = new QThread(this); |
|
|
|
@ -328,6 +329,8 @@ QWidget * MainWindow::buildSimulationUI() { |
|
|
|
|
}); |
|
|
|
|
substepsSlider = new Slider<>(substepsLabel, "Substeps: %d", &simulation->substeps); |
|
|
|
|
|
|
|
|
|
connect(gravitySlider, &QSlider::valueChanged, glWidget->overlay, &Overlay::resetEnergyLimit); |
|
|
|
|
|
|
|
|
|
gravitySlider->setMaximum(3000); |
|
|
|
|
timescaleSlider->setMinimum(1); |
|
|
|
|
timescaleSlider->setMaximum(500); |
|
|
|
@ -441,7 +444,7 @@ void MainWindow::add() { |
|
|
|
|
void MainWindow::resetSimulationControl() { |
|
|
|
|
gravitySlider->setValue(981); |
|
|
|
|
timescaleSlider->setValue(100); |
|
|
|
|
substepsSlider->setValue(5); |
|
|
|
|
substepsSlider->setValue(20); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MainWindow::toggleSimulation() { |
|
|
|
|