Prechádzať zdrojové kódy

Fix mesh orientation flip error

Bug discovered using lscm as an initial guess for arap revealed mesh flipping. Changing the setting of V_uv fixes the issue

Former-commit-id: 27f3123dcb2a5820051783044345c3d44d61984a
Klint Qinami 9 rokov pred
rodič
commit
e4876bd595
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      include/igl/lscm.cpp

+ 1 - 1
include/igl/lscm.cpp

@@ -63,7 +63,7 @@ IGL_INLINE bool igl::lscm(
   V_uv.resize(V.rows(),2);
   for (unsigned i=0;i<V_uv.cols();++i)
   {
-    V_uv.col(i) = W_flat.block(V_uv.rows()*i,0,V_uv.rows(),1);
+    V_uv.col(V_uv.cols()-i-1) = W_flat.block(V_uv.rows()*i,0,V_uv.rows(),1);
   }
   return true;
 }