Browse Source

leftover flipping in fit_rotations

Former-commit-id: daaacc32b585347c35148f65a01b3c08e4137bc4
Alec Jacobson 11 năm trước cách đây
mục cha
commit
ef22d68127
1 tập tin đã thay đổi với 1 bổ sung8 xóa
  1. 1 8
      include/igl/svd3x3/fit_rotations.cpp

+ 1 - 8
include/igl/svd3x3/fit_rotations.cpp

@@ -19,7 +19,7 @@ template <typename DerivedS, typename DerivedD>
 IGL_INLINE void igl::fit_rotations(
   const Eigen::PlainObjectBase<DerivedS> & S,
   const bool single_precision,
-        Eigen::PlainObjectBase<DerivedD> & R)
+  Eigen::PlainObjectBase<DerivedD> & R)
 {
   using namespace std;
   const int dim = S.cols();
@@ -55,15 +55,8 @@ IGL_INLINE void igl::fit_rotations(
       Mat3 ti,ui,vi;
       Vec3 _;
       igl::polar_svd(si,ri,ti,ui,_,vi);
-      // Check for reflection
-      if(ri.determinant() < 0)
-      {
-        vi.col(1) *= -1.;
-        ri = ui * vi.transpose();
-      }
     }
     assert(ri.determinant() >= 0);
-    // Not sure why polar_dec computes transpose...
     R.block(0,r*dim,dim,dim) = ri.block(0,0,dim,dim).transpose();
     //cout<<matlab_format(si,C_STR("si_"<<r))<<endl;
     //cout<<matlab_format(ri.transpose().eval(),C_STR("ri_"<<r))<<endl;