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
5 changes: 5 additions & 0 deletions apps/camera_lidar_trajectory_viewer/TrajectoryViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ static const std::vector<raylib_widgets::ShortcutEntry> appShortcuts = {
{ "Normal keys", "C", "Toggle compass/ruler" },
{ "", "P", "Toggle show path" },
{ "", "V", "Toggle show frustums" },
{ "", "1-9", "Point size" },
{ "", SHORTCUT_CTRL " (tap)", "Toggle Intensity <-> RGB point color" },
{ "", SHORTCUT_CTRL "+O", "Select session (.mjs)" },
{ "", SHORTCUT_CTRL "+Shift+O", "Select CAMERA_0 directory" },
Expand Down Expand Up @@ -2562,6 +2563,10 @@ int main(int argc, char* argv[])
s.orbit.setEulerPreset(raylib_widgets::OrbitCamera::EulerPreset::Reset);
if (IsKeyPressed(KEY_O))
s.orbit.isOrtho = !s.orbit.isOrtho;
// 1-9: point size, as in steps 2 and 3
for (int size = 1; size <= 9; size++)
if (IsKeyPressed(KEY_ZERO + size))
s.pointSize = static_cast<float>(size);
}

if (shiftDown && IsKeyPressed(KEY_R))
Expand Down
20 changes: 14 additions & 6 deletions apps/multi_session_registration/multi_session_registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ bool gui_xy_grid_01x01 = false;
TaitBryanPose motion_model_weights = { 0.01, 0.01, 0.01, 0.1, 0.1, 0.1 };
///////////////////////////////////////////////////////////////////////////////////

//! Gives every session's point clouds the current point_size (View > Points size, keys 1-9).
void applyPointSizeToSessions()
{
for (auto& session : sessions)
for (auto& point_cloud : session.point_clouds_container.point_clouds)
point_cloud.point_size = point_size;
}

void ndt_gui()
{
static bool compute_mean_and_cov_for_bucket = false;
Expand Down Expand Up @@ -637,9 +645,7 @@ void loop_closure_gui()
if (point_size < 1)
point_size = 1;
if (tmp_point_size != point_size)
for (auto& session : sessions)
for (auto& point_cloud : session.point_clouds_container.point_clouds)
point_cloud.point_size = point_size;
applyPointSizeToSessions();
}

ImGui::Text("Manualy adding edges from session %d to %d", first_session_index, second_session_index);
Expand Down Expand Up @@ -3055,7 +3061,11 @@ void display()
}
}

// Keys 1-9 set point_size, which the sessions' point clouds don't read by themselves
const int point_size_before_keys = point_size;
view_kbd_shortcuts();
if (point_size != point_size_before_keys)
applyPointSizeToSessions();

if (IsFileDropped())
loadDroppedFiles();
Expand Down Expand Up @@ -3811,9 +3821,7 @@ void display()
point_size = 10;

if (tmp != point_size)
for (auto& session : sessions)
for (auto& point_cloud : session.point_clouds_container.point_clouds)
point_cloud.point_size = point_size;
applyPointSizeToSessions();

ImGui::Separator();
}
Expand Down
Loading