forked from namreeb/namigator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Python/C way of checking if BVH/maps have been built
Fixes namreeb#51.
- Loading branch information
Gtker
committed
Sep 5, 2023
1 parent
7855f3e
commit f400272
Showing
6 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "FileExist.hpp" | ||
|
||
#include <filesystem> | ||
|
||
namespace file_exist { | ||
|
||
bool bvh_files_exist(const std::string& outputPath) { | ||
// bvh.idx is created at the very end of building game objects | ||
return std::filesystem::exists(outputPath + "/BVH/bvh.idx"); | ||
} | ||
|
||
bool map_files_exist(const std::string& outputPath, const std::string& mapName) { | ||
// mapName.map is created in MeshBuilder::SaveMap which should be after successful creation | ||
return std::filesystem::exists(outputPath + "/" + mapName + ".map"); | ||
} | ||
|
||
} // namespace file_exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <string> | ||
|
||
namespace file_exist { | ||
|
||
bool bvh_files_exist(const std::string& outputPath); | ||
|
||
bool map_files_exist(const std::string& outputPath, const std::string& mapName); | ||
|
||
} // namespace file_exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters