ply.cpp: assertion fix when using 'maxSmoothAngle'

metadata
Wenzel Jakob 2014-08-05 20:29:06 +02:00
parent 0be165de40
commit f2e8e796dd
1 changed files with 4 additions and 3 deletions

View File

@ -118,6 +118,9 @@ public:
if (m_triangleCount == 0 || m_vertexCount == 0) if (m_triangleCount == 0 || m_vertexCount == 0)
Log(EError, "Unable to load \"%s\" (no triangles or vertices found)!"); Log(EError, "Unable to load \"%s\" (no triangles or vertices found)!");
Assert(m_faceCtr == m_faceCount);
Assert(m_vertexCtr == m_vertexCount);
if (props.hasProperty("maxSmoothAngle")) { if (props.hasProperty("maxSmoothAngle")) {
if (m_faceNormals) if (m_faceNormals)
Log(EError, "The properties 'maxSmoothAngle' and 'faceNormals' " Log(EError, "The properties 'maxSmoothAngle' and 'faceNormals' "
@ -132,11 +135,9 @@ public:
delete[] m_triangles; delete[] m_triangles;
m_triangles = temp; m_triangles = temp;
} }
Assert(m_faceCtr == m_faceCount);
Assert(m_vertexCtr == m_vertexCount);
} }
PLYLoader(Stream *stream, InstanceManager *manager) : TriMesh(stream, manager) { } PLYLoader(Stream *stream, InstanceManager *manager) : TriMesh(stream, manager) { }
void loadPLY(const fs::path &path); void loadPLY(const fs::path &path);