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

Method HandleFileDrop

apps/Viewer/Window.cpp:827–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

825}
826
827void Window::HandleFileDrop(int count, const char** paths) {
828 if (count > 0) {
829 // Handle first dropped file
830 String filename(paths[0]);
831 // Check file extension to determine if it's a scene or geometry file
832 String ext = Util::getFileExt(filename).ToLower();
833 if (ext == ".mvs" || ext == ".sfm" || ext == ".dmap") {
834 // Scene file
835 String geometryFilename;
836 if (count > 1) {
837 // Use second dropped file as geometry file if available
838 geometryFilename = String(paths[1]);
839 }
840 GetScene().Open(filename, geometryFilename);
841 } else if (ext == ".ply" || ext == ".obj" || ext == ".off" || ext == ".gltf" || ext == ".glb") {
842 // Geometry file
843 GetScene().Open(filename, "");
844 } else {
845 DEBUG("Unsupported file format: %s", ext.c_str());
846 }
847 }
848}
849
850bool Window::CaptureScreenshot(const String& filename) {
851 const cv::Size& size = camera.GetSize();

Callers 1

DropCallbackMethod · 0.80

Calls 3

getFileExtFunction · 0.85
StringClass · 0.50
OpenMethod · 0.45

Tested by

no test coverage detected