Add configuration of text format precision

Define ASSIMP_AI_REAL_TEXT_PRECISION
8 when ai_real is float
16 when ai_real is double
This commit is contained in:
RichardTea
2019-06-20 18:11:11 +01:00
parent fb8ee5e301
commit bf252c4452
7 changed files with 21 additions and 15 deletions

View File

@@ -111,7 +111,7 @@ STLExporter::STLExporter(const char* _filename, const aiScene* pScene, bool expo
// make sure that all formatting happens using the standard, C locale and not the user's current locale
const std::locale& l = std::locale("C");
mOutput.imbue(l);
mOutput.precision(16);
mOutput.precision(ASSIMP_AI_REAL_TEXT_PRECISION);
if (binary) {
char buf[80] = {0} ;
buf[0] = 'A'; buf[1] = 's'; buf[2] = 's'; buf[3] = 'i'; buf[4] = 'm'; buf[5] = 'p';