More WIP DearImGUI conversion

This commit is contained in:
Graham Pentheny
2025-07-13 12:43:10 -04:00
parent d534b4dc14
commit 95a7b45c32
10 changed files with 206 additions and 252 deletions

View File

@@ -199,8 +199,8 @@ void Sample::resetCommonSettings()
void Sample::handleCommonSettings()
{
ImGui::SeparatorText("Rasterization");
ImGui::SliderFloat("##Cell Size", &cellSize, 0.1f, 1.0f, "Cell Size = %.3f");
ImGui::SliderFloat("##Cell Height", &cellHeight, 0.1f, 1.0f, "Cell Height = %.3f");
ImGui::SliderFloat("##Cell Size", &cellSize, 0.1f, 1.0f, "Cell Size = %.2f");
ImGui::SliderFloat("##Cell Height", &cellHeight, 0.1f, 1.0f, "Cell Height = %.2f");
if (inputGeometry)
{
@@ -216,14 +216,14 @@ void Sample::handleCommonSettings()
}
ImGui::SeparatorText("Agent");
ImGui::SliderFloat("##Height", &agentHeight, 0.1f, 5.0f, "Height = %.3f");
ImGui::SliderFloat("##Radius", &agentRadius, 0.0f, 5.0f, "Radius = %.3f");
ImGui::SliderFloat("##Max Climb", &agentMaxClimb, 0.1f, 5.0f, "Max Climb = %.3f");
ImGui::SliderFloat("##Max Slope", &agentMaxSlope, 0.0f, 90.0f, "Max Slope = %.3f");
ImGui::SliderFloat("##Height", &agentHeight, 0.1f, 5.0f, "Height = %.2f");
ImGui::SliderFloat("##Radius", &agentRadius, 0.0f, 5.0f, "Radius = %.2f");
ImGui::SliderFloat("##Max Climb", &agentMaxClimb, 0.1f, 5.0f, "Max Climb = %.2f");
ImGui::SliderFloat("##Max Slope", &agentMaxSlope, 0.0f, 90.0f, "Max Slope = %.2f");
ImGui::SeparatorText("Region");
ImGui::SliderFloat("##Min Region Size", &regionMinSize, 0.0f, 150.0f, "Min Region Size = %.3f");
ImGui::SliderFloat("##Merged Region Size", &regionMergeSize, 0.0f, 150.0f, "Merged Region Size = %.3f");
ImGui::SliderFloat("##Min Region Size", &regionMinSize, 0.0f, 150.0f, "Min Region Size = %.2f");
ImGui::SliderFloat("##Merged Region Size", &regionMergeSize, 0.0f, 150.0f, "Merged Region Size = %.2f");
ImGui::SeparatorText("Partitioning");
if (ImGui::RadioButton("Watershed", partitionType == SAMPLE_PARTITION_WATERSHED))
@@ -245,13 +245,13 @@ void Sample::handleCommonSettings()
ImGui::Checkbox("Walkable Low Height Spans", &filterWalkableLowHeightSpans);
ImGui::SeparatorText("Polygonization");
ImGui::SliderFloat("Max Edge Length", &edgeMaxLen, 0.0f, 50.0f);
ImGui::SliderFloat("Max Edge Error", &edgeMaxError, 0.1f, 3.0f);
ImGui::SliderInt("Verts Per Poly", &vertsPerPoly, 3, 12);
ImGui::SliderFloat("##Max Edge Length", &edgeMaxLen, 0.0f, 50.0f, "Max Edge Length = %.2f");
ImGui::SliderFloat("##Max Edge Error", &edgeMaxError, 0.1f, 3.0f, "Max Edge Error = %.2f");
ImGui::SliderInt("##Verts Per Poly", &vertsPerPoly, 3, 12, "Verts Per Poly = %d");
ImGui::SeparatorText("Detail Mesh");
ImGui::SliderFloat("Sample Distance", &detailSampleDist, 0.0f, 16.0f);
ImGui::SliderFloat("Max Sample Error", &detailSampleMaxError, 0.0f, 16.0f);
ImGui::SliderFloat("##Sample Distance", &detailSampleDist, 0.0f, 16.0f, "Sample Distance = %.2f");
ImGui::SliderFloat("##Max Sample Error", &detailSampleMaxError, 0.0f, 16.0f, "Max Sample Error = %.2f");
ImGui::Separator();
}