Browse Source

skip faces with zero normals

Former-commit-id: 176f869195f2a20f144ee1900c77d9f3c06a9ac9
Kenshi Takayama (kenshi 11 years ago
parent
commit
6aa8e11d5b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      include/igl/embree/reorient_facets_raycast.cpp

+ 1 - 0
include/igl/embree/reorient_facets_raycast.cpp

@@ -122,6 +122,7 @@
                  + b * V.row(FF(f,1)).template cast<float>().eval()
                  + c * V.row(FF(f,2)).template cast<float>().eval();
       Vector3f n = N.row(f).cast<float>();
+      if (n.isZero()) continue;
       // random direction in hemisphere around n (avoid too grazing angle)
       Vector3f d;
       while (true) {