Forráskód Böngészése

Bug Fix for 2d grad uniform

Former-commit-id: d041de40e06900fe6f710d73832eb19eaeadfd64
Zhongshi Jiang 8 éve
szülő
commit
9d88e2c767
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      include/igl/grad.cpp

+ 1 - 1
include/igl/grad.cpp

@@ -139,7 +139,7 @@ IGL_INLINE void grad_tri(const Eigen::PlainObjectBase<DerivedV>&V,
     // This does correct l2 norm of rows, so that it contains #F list of twice
     // This does correct l2 norm of rows, so that it contains #F list of twice
     // triangle areas
     // triangle areas
     double dblA = std::sqrt(n.dot(n));
     double dblA = std::sqrt(n.dot(n));
-    Eigen::Matrix<typename DerivedV::Scalar, 1, 3> u;
+    Eigen::Matrix<typename DerivedV::Scalar, 1, 3> u(0,0,1);
     if (!uniform) {
     if (!uniform) {
       // now normalize normals to get unit normals
       // now normalize normals to get unit normals
       u = n / dblA;
       u = n / dblA;