MCPcopy Create free account
hub / github.com/cdcseacave/openMVS / ShowSceneInfo

Method ShowSceneInfo

apps/Viewer/UI.cpp:395–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395void UI::ShowSceneInfo(const Window& window) {
396 if (!showSceneInfo) return;
397 const MVS::Scene& scene = window.GetScene().GetScene();
398
399 ImGui::SetNextWindowPos(ImVec2(10, 110), ImGuiCond_FirstUseEver);
400 ImGui::SetNextWindowSize(ImVec2(240, 410), ImGuiCond_FirstUseEver);
401 if (ImGui::Begin("Scene Info", &showSceneInfo)) {
402 ImGui::Text("Scene Statistics");
403 ImGui::Separator();
404 ImGui::Text("Images: %u valid (%u total)", scene.nCalibratedImages, scene.images.size());
405 ImGui::Text("Platforms: %u", scene.platforms.size());
406 ImGui::Text("OBB: %s", scene.obb.IsValid() ? "valid" : "NA");
407 // Show full obb
408 if (scene.obb.IsValid() && ImGui::CollapsingHeader("Oriented Bounding-Box")) {
409 ImGui::Text(" rot1: [%.6f %.6f %.6f]", scene.obb.m_rot(0, 0), scene.obb.m_rot(0, 1), scene.obb.m_rot(0, 2));
410 ImGui::Text(" rot2: [%.6f %.6f %.6f]", scene.obb.m_rot(1, 0), scene.obb.m_rot(1, 1), scene.obb.m_rot(1, 2));
411 ImGui::Text(" rot3: [%.6f %.6f %.6f]", scene.obb.m_rot(2, 0), scene.obb.m_rot(2, 1), scene.obb.m_rot(2, 2));
412 ImGui::Text(" pos : [%.6f %.6f %.6f]", scene.obb.m_pos.x(), scene.obb.m_pos.y(), scene.obb.m_pos.z());
413 ImGui::Text(" ext : [%.6f %.6f %.6f]", scene.obb.m_ext.x(), scene.obb.m_ext.y(), scene.obb.m_ext.z());
414 }
415 ImGui::Text("Transform: %s", scene.HasTransform() ? "valid" : "NA");
416 // Show full transform
417 if (scene.HasTransform() && ImGui::CollapsingHeader("Transform")) {
418 ImGui::Text(" [%.6f %.6f %.6f %.6f]", scene.transform(0, 0), scene.transform(0, 1), scene.transform(0, 2), scene.transform(0, 3));
419 ImGui::Text(" [%.6f %.6f %.6f %.6f]", scene.transform(1, 0), scene.transform(1, 1), scene.transform(1, 2), scene.transform(1, 3));
420 ImGui::Text(" [%.6f %.6f %.6f %.6f]", scene.transform(2, 0), scene.transform(2, 1), scene.transform(2, 2), scene.transform(2, 3));
421 ImGui::Text(" [%.6f %.6f %.6f %.6f]", scene.transform(3, 0), scene.transform(3, 1), scene.transform(3, 2), scene.transform(3, 3));
422 }
423
424 if (!scene.pointcloud.IsEmpty()) {
425 ImGui::Separator();
426 ImGui::Text("Point Cloud Statistics");
427 ImGui::Separator();
428 ImGui::Text("Points: %zu", scene.pointcloud.points.size());
429 ImGui::Text("Point Views: %zu", scene.pointcloud.pointViews.size());
430 ImGui::Text("Point Weights: %zu", scene.pointcloud.pointWeights.size());
431 ImGui::Text("Colors: %zu", scene.pointcloud.colors.size());
432 ImGui::Text("Normals: %zu", scene.pointcloud.normals.size());
433 AABB3f bounds = scene.pointcloud.GetAABB();
434 ImGui::Text("Bounds:");
435 ImGui::Text(" Min: (%.3f, %.3f, %.3f)", bounds.ptMin.x(), bounds.ptMin.y(), bounds.ptMin.z());
436 ImGui::Text(" Max: (%.3f, %.3f, %.3f)", bounds.ptMax.x(), bounds.ptMax.y(), bounds.ptMax.z());
437 Point3f size = bounds.GetSize();
438 ImGui::Text(" Size: (%.3f, %.3f, %.3f)", size.x, size.y, size.z);
439 }
440
441 if (!scene.mesh.IsEmpty()) {
442 ImGui::Separator();
443 ImGui::Text("Mesh Statistics");
444 ImGui::Separator();
445 ImGui::Text("Vertices: %u", scene.mesh.vertices.size());
446 ImGui::Text("Faces: %u", scene.mesh.faces.size());
447 ImGui::Text("Textures: %u", scene.mesh.texturesDiffuse.size());
448 // Show mesh bounds if available
449 AABB3f meshBounds = scene.mesh.GetAABB();
450 ImGui::Text("Mesh Bounds:");
451 ImGui::Text(" Min: (%.3f, %.3f, %.3f)", meshBounds.ptMin.x(), meshBounds.ptMin.y(), meshBounds.ptMin.z());
452 ImGui::Text(" Max: (%.3f, %.3f, %.3f)", meshBounds.ptMax.x(), meshBounds.ptMax.y(), meshBounds.ptMax.z());

Callers 1

RenderMethod · 0.80

Calls 6

RequestRedrawMethod · 0.80
sizeMethod · 0.45
IsValidMethod · 0.45
IsEmptyMethod · 0.45
GetAABBMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected