Added NaN check when outputting normals in PLY exporter, to avoid outputting '-1.#IND'

pull/538/head
David Jordan 2015-04-16 18:01:24 -04:00
parent c95d32564c
commit fa626aa855
1 changed files with 1 additions and 1 deletions

View File

@ -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 <<