From 10fe3b297287b576b6689b959f46f57362410ab9 Mon Sep 17 00:00:00 2001 From: AnastaZIuk Date: Sat, 14 Dec 2024 17:03:41 +0100 Subject: [PATCH] forgot to remove old struct from ICamera interface, also use ImGuiSliderFlags_Logarithmic for some sliders --- 61_UI/main.cpp | 9 ++++----- common/include/camera/ICamera.hpp | 5 ----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/61_UI/main.cpp b/61_UI/main.cpp index 10e7d1bc..acc42106 100644 --- a/61_UI/main.cpp +++ b/61_UI/main.cpp @@ -1386,7 +1386,6 @@ class UISampleApp final : public examples::SimpleWindowedApplication ImGui::End(); } - } // Projections @@ -1415,12 +1414,12 @@ class UISampleApp final : public examples::SimpleWindowedApplication ImGui::Checkbox("Allow axes to flip##allowAxesToFlip", areAxesFlipped.data() + lastProjectionIx); if (isPerspective[lastProjectionIx]) - ImGui::SliderFloat("Fov", &fov[lastProjectionIx], 20.f, 150.f, "%.1f"); + ImGui::SliderFloat("Fov", &fov[lastProjectionIx], 20.f, 150.f, "%.1f", ImGuiSliderFlags_Logarithmic); else - ImGui::SliderFloat("Ortho width", &viewWidth[lastProjectionIx], 1.f, 20.f, "%.1f"); + ImGui::SliderFloat("Ortho width", &viewWidth[lastProjectionIx], 1.f, 20.f, "%.1f", ImGuiSliderFlags_Logarithmic); - ImGui::SliderFloat("zNear", &zNear[lastProjectionIx], 0.1f, 100.f, "%.2f"); - ImGui::SliderFloat("zFar", &zFar[lastProjectionIx], 110.f, 10000.f, "%.1f"); + ImGui::SliderFloat("zNear", &zNear[lastProjectionIx], 0.1f, 100.f, "%.2f", ImGuiSliderFlags_Logarithmic); + ImGui::SliderFloat("zFar", &zFar[lastProjectionIx], 110.f, 10000.f, "%.1f", ImGuiSliderFlags_Logarithmic); ImGui::End(); } diff --git a/common/include/camera/ICamera.hpp b/common/include/camera/ICamera.hpp index fa3d6277..33890fef 100644 --- a/common/include/camera/ICamera.hpp +++ b/common/include/camera/ICamera.hpp @@ -35,11 +35,6 @@ class ICamera : public IGimbalController, virtual public core::IReferenceCounted CGimbal(typename base_t::SCreationParameters&& parameters) : base_t(std::move(parameters)) { updateView(); } ~CGimbal() = default; - struct SView - { - matrix matrix = {}; - }; - inline void updateView() { const auto& gRight = base_t::getXAxis(), gUp = base_t::getYAxis(), gForward = base_t::getZAxis();