Skip to content

Commit

Permalink
forgot to remove old struct from ICamera interface, also use ImGuiSli…
Browse files Browse the repository at this point in the history
…derFlags_Logarithmic for some sliders
  • Loading branch information
AnastaZIuk committed Dec 14, 2024
1 parent c615d58 commit 10fe3b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
9 changes: 4 additions & 5 deletions 61_UI/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,6 @@ class UISampleApp final : public examples::SimpleWindowedApplication

ImGui::End();
}

}

// Projections
Expand Down Expand Up @@ -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();
}
Expand Down
5 changes: 0 additions & 5 deletions common/include/camera/ICamera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<precision_t, 3, 4> matrix = {};
};

inline void updateView()
{
const auto& gRight = base_t::getXAxis(), gUp = base_t::getYAxis(), gForward = base_t::getZAxis();
Expand Down

0 comments on commit 10fe3b2

Please sign in to comment.