소스 검색

skip faces with zero normals

Former-commit-id: 176f869195f2a20f144ee1900c77d9f3c06a9ac9
Kenshi Takayama (kenshi 11 년 전
부모
커밋
6aa8e11d5b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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) {