| 644 | } |
| 645 | |
| 646 | bool ParseScene(Scene& scene) |
| 647 | { |
| 648 | #if defined(_SUPPORT_CPP17) && (!defined(__GNUC__) || (__GNUC__ > 7)) |
| 649 | String strPath(MAKE_PATH_FULL(WORKING_FOLDER_FULL, OPT::strInputFileName)); |
| 650 | Util::ensureValidFolderPath(strPath); |
| 651 | const std::filesystem::path path(static_cast<const std::string&>(strPath)); |
| 652 | enum Type { |
| 653 | MVSNet = 0, |
| 654 | NERFSTUDIO, |
| 655 | RTMV, |
| 656 | } sceneType = MVSNet; |
| 657 | for (const std::filesystem::directory_entry& entry : std::filesystem::directory_iterator(path)) { |
| 658 | if (entry.path().extension() == RTMV_CAMERAS_EXT) { |
| 659 | if (entry.path().filename() == NERFSTUDIO_TRANSFORMS) { |
| 660 | sceneType = NERFSTUDIO; |
| 661 | break; |
| 662 | } |
| 663 | sceneType = RTMV; |
| 664 | } |
| 665 | } |
| 666 | switch (sceneType) { |
| 667 | case NERFSTUDIO: return ParseSceneNerfstudio(scene, strPath); |
| 668 | case RTMV: return ParseSceneRTMV(scene, strPath); |
| 669 | default: return ParseSceneMVSNet(scene, strPath); |
| 670 | } |
| 671 | #else |
| 672 | VERBOSE("error: C++17 is required to parse MVSNet format"); |
| 673 | return false; |
| 674 | #endif // _SUPPORT_CPP17 |
| 675 | } |
| 676 | |
| 677 | } // unnamed namespace |
| 678 |
no test coverage detected