Merge pull request #790 from ov/safe-normalizing-in-smoothing-groups

use NormalizeSafe to prevent NaN when normalizing zero vectors
pull/800/head
Alexander Gessler 2016-02-18 11:53:57 +01:00
commit 88fee56cce
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ void ComputeNormalsWithSmoothingsGroups(MeshWithSmoothingGroups<T>& sMesh)
{
vNormals += sMesh.mNormals[(*a)];
}
vNormals.Normalize();
vNormals.NormalizeSafe();
// write back into all affected normals
for (std::vector<unsigned int>::const_iterator