Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/imgui
Submodule imgui updated 262 files
1 change: 1 addition & 0 deletions apps/compare_trajectories/mandeye_compare_trajectories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ void display()

ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

ImGuizmo::BeginFrame();
ImGuizmo::Enable(true);
Expand Down
1 change: 1 addition & 0 deletions apps/hd_mapper/hd_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void display() {

ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

//my_display_code();
project_setings.imgui(odo_with_gnss_fusion, laz_wrapper.sectors, roi_exporter.rois_with_constraints, common_data);
Expand Down
74 changes: 27 additions & 47 deletions apps/lidar_odometry_step_1/lidar_odometry_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,35 +604,19 @@ void step1(const std::atomic<bool> &loPause)

if (fs::exists(input_folder_name))
{
if (!input_folder_name.empty())
{
std::string newTitle = winTitle + " - ..\\" + std::filesystem::path(input_folder_name).filename().string();
glutSetWindowTitle(newTitle.c_str());

for (const auto &entry : fs::directory_iterator(input_folder_name))
if (entry.is_regular_file())
input_file_names.push_back(entry.path().string());
std::string newTitle = winTitle + " - ..\\" + std::filesystem::path(input_folder_name).filename().string();
glutSetWindowTitle(newTitle.c_str());

if (load_data(input_file_names, params, pointsPerFile, imu_data, full_debug_messages))
{
working_directory = fs::path(input_file_names[0]).parent_path().string();
calculate_trajectory(trajectory, imu_data, params.fusionConventionNwu, params.fusionConventionEnu, params.fusionConventionNed, params.ahrs_gain, full_debug_messages, params.use_removie_imu_bias_from_first_stationary_scan);
compute_step_1(pointsPerFile, params, trajectory, worker_data, loPause);
step_1_done = true;
}
else
{
std::string message_info = "Problem with loading data from folder '" + input_folder_name + "' (Pease check if folder exists). Program will close once You click OK!!!";
std::cout << message_info << std::endl;
[[maybe_unused]]
pfd::message message(
"Information",
message_info.c_str(),
pfd::choice::ok, pfd::icon::info);
message.result();
for (const auto &entry : fs::directory_iterator(input_folder_name))
if (entry.is_regular_file())
input_file_names.push_back(entry.path().string());

exit(1);
}
if (load_data(input_file_names, params, pointsPerFile, imu_data, full_debug_messages))
{
working_directory = fs::path(input_file_names[0]).parent_path().string();
calculate_trajectory(trajectory, imu_data, params.fusionConventionNwu, params.fusionConventionEnu, params.fusionConventionNed, params.ahrs_gain, full_debug_messages, params.use_removie_imu_bias_from_first_stationary_scan);
compute_step_1(pointsPerFile, params, trajectory, worker_data, loPause);
step_1_done = true;
}
else
{
Expand All @@ -648,19 +632,6 @@ void step1(const std::atomic<bool> &loPause)
exit(1);
}
}
else
{
std::string message_info = "Problem with loading data from folder '" + input_folder_name + "' Pease check if folder name is composed of ASCII symbols, if not --> please change folder name. Program will close once You click OK!!!";
std::cout << message_info << std::endl;
[[maybe_unused]]
pfd::message message(
"Information",
message_info.c_str(),
pfd::choice::ok, pfd::icon::info);
message.result();

exit(1);
}
}

void step2(const std::atomic<bool> &loPause)
Expand Down Expand Up @@ -1656,14 +1627,9 @@ void save_results(bool info, double elapsed_seconds, std::string &working_direct

void display()
{
ImGuiIO &io = ImGui::GetIO();

view_kbd_shortcuts();

if (io.KeyCtrl && ImGui::IsKeyPressed('O', false))
openData();

updateCameraTransition();

ImGuiIO &io = ImGui::GetIO();

glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
glMatrixMode(GL_PROJECTION);
Expand Down Expand Up @@ -1879,6 +1845,20 @@ void display()

ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

ShowMainDockSpace();

view_kbd_shortcuts();

if (io.KeyCtrl && ImGui::IsKeyPressed(ImGuiKey_O, false))
{
openData();

//workaround
io.AddKeyEvent(ImGuiKey_O, false);
io.AddKeyEvent(ImGuiMod_Ctrl, false);
}

if (!loRunning)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ void display()
#endif
ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

project_gui();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,15 +626,10 @@ void project_gui()

void display()
{
ImGuiIO &io = ImGui::GetIO();

view_kbd_shortcuts();

if (ImGui::IsKeyPressed('G', false))
show_grid = !show_grid;

updateCameraTransition();

ImGuiIO& io = ImGui::GetIO();

glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
Expand Down Expand Up @@ -814,6 +809,14 @@ void display()

ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

ShowMainDockSpace();

view_kbd_shortcuts();

if (ImGui::IsKeyPressed(ImGuiKey_G, false))
show_grid = !show_grid;

if (ImGui::BeginMainMenuBar())
{
Expand Down
1 change: 1 addition & 0 deletions apps/mandeye_raw_data_viewer/mandeye_raw_data_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,7 @@ void display()

ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

project_gui();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,6 @@ void openSession()

void display()
{
ImGuiIO& io = ImGui::GetIO();

glClearColor(bg_color.x * bg_color.w, bg_color.y * bg_color.w, bg_color.z * bg_color.w, bg_color.w);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
Expand All @@ -775,45 +773,10 @@ void display()
gl_renderPointCloud();
}


view_kbd_shortcuts();

if (io.KeyCtrl && ImGui::IsKeyPressed('O', false))
openSession();

if (session.point_clouds_container.point_clouds.size() > 0)
{
if (io.KeyCtrl && ImGui::IsKeyPressed('N'))
show_neighbouring_scans = !show_neighbouring_scans;
if (ImGui::IsKeyPressed(ImGuiKey_UpArrow, true))
offset_intensity += 0.01;
if (ImGui::IsKeyPressed(ImGuiKey_DownArrow, true))
offset_intensity -= 0.01;

if (offset_intensity < 0)
offset_intensity = 0;
else if (offset_intensity > 1)
offset_intensity = 1;

if ((!io.KeyCtrl && !io.KeyShift && ImGui::IsKeyPressed(ImGuiKey_RightArrow, true))
|| ImGui::IsKeyPressed(ImGuiKey_PageUp, true)
|| ImGui::IsKeyPressed('+', true)
)
index_rendered_points_local += 1;
if ((!io.KeyCtrl && !io.KeyShift && ImGui::IsKeyPressed(ImGuiKey_LeftArrow, true))
|| ImGui::IsKeyPressed(ImGuiKey_PageDown, true)
|| ImGui::IsKeyPressed('-', true)
)
index_rendered_points_local -= 1;

if (index_rendered_points_local < 0)
index_rendered_points_local = 0;
if (index_rendered_points_local >= session.point_clouds_container.point_clouds.size())
index_rendered_points_local = session.point_clouds_container.point_clouds.size() - 1;
}

updateCameraTransition();

ImGuiIO& io = ImGui::GetIO();

glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
Expand Down Expand Up @@ -955,6 +918,58 @@ void display()

ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

ShowMainDockSpace();

view_kbd_shortcuts();

if (io.KeyCtrl && ImGui::IsKeyPressed(ImGuiKey_O, false))
{
openSession();

//workaround
io.AddKeyEvent(ImGuiKey_O, false);
io.AddKeyEvent(ImGuiMod_Ctrl, false);
}

if (session.point_clouds_container.point_clouds.size() > 0)
{
if (io.KeyCtrl && ImGui::IsKeyPressed(ImGuiKey_N, false))
{
show_neighbouring_scans = !show_neighbouring_scans;

//workaround
io.AddKeyEvent(ImGuiKey_N, false);
io.AddKeyEvent(ImGuiMod_Ctrl, false);
}

if (ImGui::IsKeyPressed(ImGuiKey_UpArrow, true))
offset_intensity += 0.01;
if (ImGui::IsKeyPressed(ImGuiKey_DownArrow, true))
offset_intensity -= 0.01;

if (offset_intensity < 0)
offset_intensity = 0;
else if (offset_intensity > 1)
offset_intensity = 1;

if ((!io.KeyCtrl && !io.KeyShift && ImGui::IsKeyPressed(ImGuiKey_RightArrow, true))
|| ImGui::IsKeyPressed(ImGuiKey_PageUp, true)
|| ImGui::IsKeyPressed(ImGuiKey_KeypadAdd, true)
)
index_rendered_points_local += 1;
if ((!io.KeyCtrl && !io.KeyShift && ImGui::IsKeyPressed(ImGuiKey_LeftArrow, true))
|| ImGui::IsKeyPressed(ImGuiKey_PageDown, true)
|| ImGui::IsKeyPressed(ImGuiKey_KeypadSubtract, true)
)
index_rendered_points_local -= 1;

if (index_rendered_points_local < 0)
index_rendered_points_local = 0;
if (index_rendered_points_local >= session.point_clouds_container.point_clouds.size())
index_rendered_points_local = session.point_clouds_container.point_clouds.size() - 1;
}

if (ImGui::BeginMainMenuBar())
{
Expand Down
30 changes: 12 additions & 18 deletions apps/manual_color/manual_color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,31 +170,24 @@ void imagePicker(const std::string &name, ImTextureID tex1, std::vector<ImVec2>
float speed = io.KeyShift ? 10.f : 1.f;
int transX = 0;
int transY = 0;
if (io.KeysDown[io.KeyMap[ImGuiKey_UpArrow]])
{

if (ImGui::IsKeyDown(ImGuiKey_UpArrow))
transY = -10 * speed;
}
if (io.KeysDown[io.KeyMap[ImGuiKey_DownArrow]])
{

if (ImGui::IsKeyDown(ImGuiKey_DownArrow))
transY = 10 * speed;
}
if (io.KeysDown[io.KeyMap[ImGuiKey_LeftArrow]])
{

if (ImGui::IsKeyDown(ImGuiKey_LeftArrow))
transX = -10 * speed;
}
if (io.KeysDown[io.KeyMap[ImGuiKey_RightArrow]])
{

if (ImGui::IsKeyDown(ImGuiKey_RightArrow))
transX = 10 * speed;
}
if (io.KeysDown[io.KeyMap[ImGuiKey_PageUp]])
{

if (ImGui::IsKeyDown(ImGuiKey_PageUp))
zoom *= 1.0f + 0.01f * speed;
}

if (io.KeysDown[io.KeyMap[ImGuiKey_PageDown]])
{
if (ImGui::IsKeyDown(ImGuiKey_PageDown))
zoom /= 1.00f + 0.01f * speed;
}

ImVec2 uv_min = ImVec2(0.0f, 0.0f); // Top-left
ImVec2 uv_max = ImVec2(1.0f, 1.0f); // Lower-right
Expand Down Expand Up @@ -934,6 +927,7 @@ void display()
}
ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplGLUT_NewFrame();
ImGui::NewFrame();

std::vector<ImVec2> picked3DPoints(SystemData::pointPickedPointCloud.size());
std::transform(SystemData::pointPickedPointCloud.begin(), SystemData::pointPickedPointCloud.end(), picked3DPoints.begin(), UnprojectPoint);
Expand Down
Loading