Ver Fonte

fixed ear

Teseo Schneider há 6 anos atrás
pai
commit
d6b3f4578a
3 ficheiros alterados com 8 adições e 8 exclusões
  1. 1 1
      include/igl/bone_parents.cpp
  2. 5 5
      include/igl/ears.cpp
  3. 2 2
      include/igl/mat_min.cpp

+ 1 - 1
include/igl/bone_parents.cpp

@@ -28,5 +28,5 @@ IGL_INLINE void igl::bone_parents(
 }
 
 #ifdef IGL_STATIC_LIBRARY
-template void igl::bone_parents<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::bone_parents<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
 #endif

+ 5 - 5
include/igl/ears.cpp

@@ -15,15 +15,15 @@ IGL_INLINE void igl::ears(
   Eigen::PlainObjectBase<Derivedear_opp> & ear_opp)
 {
   assert(F.cols() == 3 && "F should contain triangles");
-  Eigen::Array<bool,Eigen::Dynamic,3> B;
+  Eigen::Matrix<bool,Eigen::Dynamic,3> B;
   {
-    Eigen::Array<bool,Eigen::Dynamic,1> I;
+    Eigen::Matrix<bool,Eigen::Dynamic,1> I;
     on_boundary(F,I,B);
   }
-  find(B.rowwise().count() == 2,ear);
-  Eigen::Array<bool,Eigen::Dynamic,3> Bear;
+  find(B.array().rowwise().count() == 2,ear);
+  Eigen::Matrix<bool,Eigen::Dynamic,3> Bear;
   slice(B,ear,1,Bear);
-  Eigen::Array<bool,Eigen::Dynamic,1> M;
+  Eigen::Matrix<bool,Eigen::Dynamic,1> M;
   mat_min(Bear,2,M,ear_opp);
 }
 

+ 2 - 2
include/igl/mat_min.cpp

@@ -19,8 +19,8 @@ IGL_INLINE void igl::mat_min(
   // output size
   int n = (dim==1?X.cols():X.rows());
   // resize output
-  Y.resize(n);
-  I.resize(n);
+  Y.resize(n,1);
+  I.resize(n,1);
 
   // loop over dimension opposite of dim
   for(int j = 0;j<n;j++)