From fa626aa8557021b18ed321577f2abc265df08f2a Mon Sep 17 00:00:00 2001 From: David Jordan Date: Thu, 16 Apr 2015 18:01:24 -0400 Subject: [PATCH] Added NaN check when outputting normals in PLY exporter, to avoid outputting '-1.#IND' --- code/PlyExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/PlyExporter.cpp b/code/PlyExporter.cpp index 692b02668..a1479ee32 100644 --- a/code/PlyExporter.cpp +++ b/code/PlyExporter.cpp @@ -216,7 +216,7 @@ void PlyExporter::WriteMeshVerts(const aiMesh* m, unsigned int components) m->mVertices[i].z ; if(components & PLY_EXPORT_HAS_NORMALS) { - if (m->HasNormals()) { + if (m->HasNormals() && is_not_qnan(m->mNormals[i].x)) { mOutput << " " << m->mNormals[i].x << " " << m->mNormals[i].y <<