Просмотр исходного кода

cross field code still not compiling. fixed warnings

Former-commit-id: d9e9f7811237f13e26dc4580eda5fdb98bbd67b7
Alec Jacobson 11 лет назад
Родитель
Сommit
dc860aa29b

+ 27 - 26
include/igl/cross_field_missmatch.cpp

@@ -40,32 +40,33 @@ namespace igl {
     
   private:
     
-    ///return true if a vertex is singluar by looking at initialized missmatches
-    // possible bugs, verify deleted flag vs IsD()
-    // not sorted vf, but should not make a difference
-    // olga: TODO: this returns the index modulo 4.
-    inline int oneRingMissMatch(const int vid)
-    {
-      ///check that is on border..
-      if (V_border[vid])
-        return 0;
-      
-      int missmatch=0;
-      for (unsigned int i=0;i<VF[vid].size();i++)
-      {
-        // look for the vertex
-        int j=-1;
-        for (unsigned z=0; z<3; ++z)
-          if (F(VF[vid][i],z) == vid)
-            j=z;
-        assert(j!=-1);
-        
-        missmatch+=Handle_MMatch(VF[vid][i],j);
-      }
-      
-      missmatch=missmatch%4;
-      return missmatch;
-    }
+    // Alec: Not compiling... Handle_MMatch not declared.
+    /////return true if a vertex is singluar by looking at initialized missmatches
+    //// possible bugs, verify deleted flag vs IsD()
+    //// not sorted vf, but should not make a difference
+    //// olga: TODO: this returns the index modulo 4.
+    //inline int oneRingMissMatch(const int vid)
+    //{
+    //  ///check that is on border..
+    //  if (V_border[vid])
+    //    return 0;
+    //  
+    //  int missmatch=0;
+    //  for (unsigned int i=0;i<VF[vid].size();i++)
+    //  {
+    //    // look for the vertex
+    //    int j=-1;
+    //    for (unsigned z=0; z<3; ++z)
+    //      if (F(VF[vid][i],z) == vid)
+    //        j=z;
+    //    assert(j!=-1);
+    //    
+    //    missmatch+=Handle_MMatch(VF[vid][i],j);
+    //  }
+    //  
+    //  missmatch=missmatch%4;
+    //  return missmatch;
+    //}
     
     
     ///compute the mismatch between 2 faces

+ 1 - 1
include/igl/matlab/matlabinterface.cpp

@@ -305,7 +305,7 @@ IGL_INLINE void igl::mlsetmatrix(Engine** mlengine, std::string name, const Eige
 //        ++count;
   
   Eigen::MatrixXd T(M.nonZeros(),3);
-  for (unsigned k=0; k<M.outerSize(); ++k)
+  for (unsigned k=0; k<(unsigned)M.outerSize(); ++k)
   {
     for (Eigen::SparseMatrix<double>::InnerIterator it(M,k); it; ++it)
     {

+ 5 - 2
include/igl/rotate_vectors.h

@@ -12,10 +12,13 @@
 #include <Eigen/Core>
 namespace igl
 {
-  // Rotate the vectors V by A radiants on the tangent plane spanned by B1 and B2
+  // Rotate the vectors V by A radiants on the tangent plane spanned by B1 and
+  // B2
+  //
   // Inputs:
   //   V     #V by 3 eigen Matrix of vectors
-  //   A     #V eigen vector of rotation angles or a single angle to be applied to all vectors
+  //   A     #V eigen vector of rotation angles or a single angle to be applied
+  //     to all vectors
   //   B1    #V by 3 eigen Matrix of base vector 1
   //   B2    #V by 3 eigen Matrix of base vector 2
   //

+ 1 - 1
include/igl/writeOBJ.cpp

@@ -121,5 +121,5 @@ template bool igl::writeOBJ<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Mat
 template bool igl::writeOBJ<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, Eigen::Matrix<double, -1, 2, 1, -1, 2> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 2, 1, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&);
 template bool igl::writeOBJ<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, Eigen::Matrix<float, -1, 2, 1, -1, 2> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 2, 1, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&);
 template bool igl::writeOBJ<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
-template bool igl::writeOBJ<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 2, 0, -1, 2> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
+template bool igl::writeOBJ<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 2, 0, -1, 2> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
 #endif

+ 4 - 4
include/igl/writeOFF.cpp

@@ -38,11 +38,11 @@ IGL_INLINE bool igl::writeOFF(
   
 //  for (int i = 0; i < F.rows(); i++)
 //      fprintf (fp, "3 %d %d %d\n", F(i,0), F(i,1), F(i,2));
-  for (int i = 0; i < F.rows(); i++)
+  for (int i = 0; i < (int)F.rows(); i++)
   {
-    fprintf (fp, "%d", F.cols());
-    for (int j = 0; j < F.cols(); j++)
-      fprintf (fp, " %d", F(i,j));
+    fprintf (fp, "%d", (int)F.cols());
+    for (int j = 0; j < (int)F.cols(); j++)
+      fprintf (fp, " %d", (int)F(i,j));
     fprintf (fp, "\n");
   }
   fclose (fp);