Преглед изворни кода

SIGN CHANGE: use right hand rule, -1 on inside of CCW polygons

Former-commit-id: 4843b1088656bf137e4d8f573712d5d3369b2905
Alec Jacobson пре 8 година
родитељ
комит
6baa0bef57
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      include/igl/signed_distance.cpp

+ 2 - 2
include/igl/signed_distance.cpp

@@ -93,8 +93,8 @@ IGL_INLINE void igl::signed_distance(
           for(int e = 0;e<F.rows();e++)
           {
             // rotate edge vector
-            FN(e,0) = -(V(F(e,1),1)-V(F(e,0),1));
-            FN(e,1) =  (V(F(e,1),0)-V(F(e,0),0));
+            FN(e,0) =  (V(F(e,1),1)-V(F(e,0),1));
+            FN(e,1) = -(V(F(e,1),0)-V(F(e,0),0));
             FN.row(e).normalize();
             // add to vertex normal
             VN.row(F(e,1)) += FN.row(e);