فهرست منبع

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

David Jordan 10 سال پیش
والد
کامیت
fa626aa855
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      code/PlyExporter.cpp

+ 1 - 1
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 <<