Correct scene making, merged the old raw into the new.

added option to automatically write the raw obj file
Added scene colors to the obj
use proper scene colors from hf
This commit is contained in:
Aaron Kimbrell
2025-10-15 19:56:46 -05:00
parent 12fd9d0a21
commit accdb4f9a1
19 changed files with 720 additions and 314 deletions

View File

@@ -7,7 +7,9 @@
#include <vector>
#include <string>
#include <istream>
#include <map>
#include "NiPoint3.h"
#include "dCommonVars.h"
namespace Raw {
@@ -138,6 +140,17 @@ bool ReadRaw(std::istream& stream, Raw& outRaw);
*/
void GenerateTerrainMesh(const Raw& raw, TerrainMesh& outMesh);
/**
* @brief Write terrain mesh to OBJ file for debugging/visualization
* Merged from dTerrain's WriteFinalMeshToOBJ functionality
* Vertices are colored based on their scene ID using a hash function
*
* @param mesh The terrain mesh to export
* @param path Output path for the OBJ file
* @return true if successfully written, false otherwise
*/
bool WriteTerrainMeshToOBJ(const TerrainMesh& mesh, const std::string& path);
} // namespace Raw
#endif // __RAW_H__