From 46ab589e5e1351f3081b5b4c76350967ef2f88a8 Mon Sep 17 00:00:00 2001 From: hachem Date: Sat, 16 Aug 2025 15:36:25 +0200 Subject: [fix]: First optimization --- src/States/SimulationState.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/States/SimulationState.cpp') diff --git a/src/States/SimulationState.cpp b/src/States/SimulationState.cpp index 98640e0..7a45bd1 100644 --- a/src/States/SimulationState.cpp +++ b/src/States/SimulationState.cpp @@ -124,6 +124,19 @@ namespace Donut ImGui::Separator(); + ImGui::Text("Simulation Quality:"); + int maxStepsMoving = m_Engine.GetMaxStepsMoving(); + if (ImGui::SliderInt("Max Steps (Moving)", &maxStepsMoving, 1000, 60000)) + m_Engine.SetMaxStepsMoving(maxStepsMoving); + int maxStepsStatic = m_Engine.GetMaxStepsStatic(); + if (ImGui::SliderInt("Max Steps (Static)", &maxStepsStatic, 1000, 30000)) + m_Engine.SetMaxStepsStatic(maxStepsStatic); + float earlyExitDistance = m_Engine.GetEarlyExitDistance(); + if (ImGui::SliderFloat("Early Exit Distance", &earlyExitDistance, 1e11f, 1e13f, "%.2e")) + m_Engine.SetEarlyExitDistance(earlyExitDistance); + + ImGui::Separator(); + ImGui::Text("Controls:"); ImGui::Text("Left Mouse: Orbit camera"); ImGui::Text("Scroll: Zoom in/out"); -- cgit v1.3