Tech ENABLE_RAYCAST_PICKING_DEBUG - Extended data shown into debug imgui dialog
This commit is contained in:
parent
b27653493a
commit
8ef55ff82e
1 changed files with 21 additions and 1 deletions
|
@ -5542,12 +5542,17 @@ void GLCanvas3D::_picking_pass()
|
||||||
default: { break; }
|
default: { break; }
|
||||||
}
|
}
|
||||||
|
|
||||||
auto add_strings_row_to_table = [&imgui](const std::string& col_1, const ImVec4& col_1_color, const std::string& col_2, const ImVec4& col_2_color) {
|
auto add_strings_row_to_table = [&imgui](const std::string& col_1, const ImVec4& col_1_color, const std::string& col_2, const ImVec4& col_2_color,
|
||||||
|
const std::string& col_3 = "", const ImVec4& col_3_color = ImGui::GetStyleColorVec4(ImGuiCol_Text)) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableSetColumnIndex(0);
|
ImGui::TableSetColumnIndex(0);
|
||||||
imgui.text_colored(col_1_color, col_1.c_str());
|
imgui.text_colored(col_1_color, col_1.c_str());
|
||||||
ImGui::TableSetColumnIndex(1);
|
ImGui::TableSetColumnIndex(1);
|
||||||
imgui.text_colored(col_2_color, col_2.c_str());
|
imgui.text_colored(col_2_color, col_2.c_str());
|
||||||
|
if (!col_3.empty()) {
|
||||||
|
ImGui::TableSetColumnIndex(2);
|
||||||
|
imgui.text_colored(col_3_color, col_3.c_str());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
@ -5576,6 +5581,21 @@ void GLCanvas3D::_picking_pass()
|
||||||
add_strings_row_to_table("Gizmo elements", ImGuiWrapper::COL_ORANGE_LIGHT, std::string(buf), ImGui::GetStyleColorVec4(ImGuiCol_Text));
|
add_strings_row_to_table("Gizmo elements", ImGuiWrapper::COL_ORANGE_LIGHT, std::string(buf), ImGui::GetStyleColorVec4(ImGuiCol_Text));
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::shared_ptr<SceneRaycasterItem>>* gizmo_raycasters = m_scene_raycaster.get_raycasters(SceneRaycaster::EType::Gizmo);
|
||||||
|
if (gizmo_raycasters != nullptr && !gizmo_raycasters->empty()) {
|
||||||
|
ImGui::Separator();
|
||||||
|
imgui.text("Gizmo raycasters IDs:");
|
||||||
|
if (ImGui::BeginTable("GizmoRaycasters", 3)) {
|
||||||
|
for (size_t i = 0; i < gizmo_raycasters->size(); ++i) {
|
||||||
|
add_strings_row_to_table(std::to_string(i), ImGuiWrapper::COL_ORANGE_LIGHT,
|
||||||
|
std::to_string(SceneRaycaster::decode_id(SceneRaycaster::EType::Gizmo, (*gizmo_raycasters)[i]->get_id())), ImGui::GetStyleColorVec4(ImGuiCol_Text),
|
||||||
|
to_string(Geometry::Transformation((*gizmo_raycasters)[i]->get_transform()).get_offset()), ImGui::GetStyleColorVec4(ImGuiCol_Text));
|
||||||
|
}
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
imgui.end();
|
imgui.end();
|
||||||
#endif // ENABLE_RAYCAST_PICKING_DEBUG
|
#endif // ENABLE_RAYCAST_PICKING_DEBUG
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue