Selaa lähdekoodia

Fixed what Alec changed before, lib compiles with the new files. Made
files more libigl-like.


Former-commit-id: 3f9410493903fb6127d61e8f6b16be10d10e95c8

Olga Diamanti 11 vuotta sitten
vanhempi
commit
e44af8ca3f

+ 1 - 1
include/igl/InElementAABB.h

@@ -3,7 +3,7 @@
 
 #include <Eigen/Core>
 #include <memory>
-
+#include <vector>
 namespace igl
 {
   class InElementAABB

+ 21 - 66
include/igl/comb_cross_field.cpp

@@ -1,9 +1,19 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #include "comb_cross_field.h"
 
 #include <vector>
 #include <deque>
 #include "per_face_normals.h"
 #include "is_border_vertex.h"
+#include "rotation_matrix_from_directions.h"
+
 #include "tt.h"
 
 namespace igl {
@@ -27,74 +37,14 @@ namespace igl {
   private:
     
     
-    static double Sign(double a){return (double)((a>0)?+1:-1);}
-    
-    ///given 2 vector centered into origin calculate the rotation matrix from first to the second
-    static Eigen::Matrix<typename DerivedV::Scalar, 3, 3> RotationMatrix(Eigen::Matrix<typename DerivedV::Scalar, 3, 1> v0,
-                                                                         Eigen::Matrix<typename DerivedV::Scalar, 3, 1> v1,
-                                                                         bool normalized=true)
-    {
-      Eigen::Matrix<typename DerivedV::Scalar, 3, 3> rotM;
-      const double epsilon=0.00001;
-      if (!normalized)
-      {
-        v0.normalize();
-        v1.normalize();
-      }
-      typename DerivedV::Scalar dot=v0.dot(v1);
-      ///control if there is no rotation
-      if (dot>((double)1-epsilon))
-      {
-        rotM = Eigen::Matrix<typename DerivedV::Scalar, 3, 3>::Identity();
-        return rotM;
-      }
-      
-      ///find the axis of rotation
-      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> axis;
-      axis=v0.cross(v1);
-      axis.normalize();
-      
-      ///construct rotation matrix
-      typename DerivedV::Scalar u=axis(0);
-      typename DerivedV::Scalar v=axis(1);
-      typename DerivedV::Scalar w=axis(2);
-      typename DerivedV::Scalar phi=acos(dot);
-      typename DerivedV::Scalar rcos = cos(phi);
-      typename DerivedV::Scalar rsin = sin(phi);
-      
-      rotM(0,0) =      rcos + u*u*(1-rcos);
-      rotM(1,0) =  w * rsin + v*u*(1-rcos);
-      rotM(2,0) = -v * rsin + w*u*(1-rcos);
-      rotM(0,1) = -w * rsin + u*v*(1-rcos);
-      rotM(1,1) =      rcos + v*v*(1-rcos);
-      rotM(2,1) =  u * rsin + w*v*(1-rcos);
-      rotM(0,2) =  v * rsin + u*w*(1-rcos);
-      rotM(1,2) = -u * rsin + v*w*(1-rcos);
-      rotM(2,2) =      rcos + w*w*(1-rcos);
-      
-      return rotM;
-    }
-    
+    static inline double Sign(double a){return (double)((a>0)?+1:-1);}
     
-  public:
-    ///rotate a given vector from the tangent space
-    ///of f0 to the tangent space of f1 by considering the difference of normals
-    static Eigen::Matrix<typename DerivedV::Scalar, 3, 1> Rotate(Eigen::Matrix<typename DerivedV::Scalar, 3, 1> N0,
-                                                                 Eigen::Matrix<typename DerivedV::Scalar, 3, 1> N1,
-                                                                 const Eigen::Matrix<typename DerivedV::Scalar, 3, 1>& dir3D)
-    {
-      ///find the rotation matrix that maps between normals
-      //    vcg::Matrix33<ScalarType> rotation=vcg::RotationMatrix(N0,N1);
-      Eigen::Matrix<typename DerivedV::Scalar, 3, 3> rotation = RotationMatrix(N0,N1);
-      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> rotated=rotation*dir3D;
-      return rotated;
-    }
     
   private:
     
     // returns the 90 deg rotation of a (around n) most similar to target b
     /// a and b should be in the same plane orthogonal to N
-    static Eigen::Matrix<typename DerivedV::Scalar, 3, 1> K_PI_new(const Eigen::Matrix<typename DerivedV::Scalar, 3, 1>& a,
+    static inline Eigen::Matrix<typename DerivedV::Scalar, 3, 1> K_PI_new(const Eigen::Matrix<typename DerivedV::Scalar, 3, 1>& a,
                                                                    const Eigen::Matrix<typename DerivedV::Scalar, 3, 1>& b,
                                                                    const Eigen::Matrix<typename DerivedV::Scalar, 3, 1>& n)
     {
@@ -110,7 +60,7 @@ namespace igl {
  
     
   public:
-    Comb(const Eigen::PlainObjectBase<DerivedV> &_V,
+    inline Comb(const Eigen::PlainObjectBase<DerivedV> &_V,
          const Eigen::PlainObjectBase<DerivedF> &_F,
          const Eigen::PlainObjectBase<DerivedV> &_PD1,
          const Eigen::PlainObjectBase<DerivedV> &_PD2
@@ -123,7 +73,7 @@ namespace igl {
       igl::per_face_normals(V,F,N);
       igl::tt(V,F,TT,TTi);
     }
-    void comb(Eigen::PlainObjectBase<DerivedV> &PD1out,
+    inline void comb(Eigen::PlainObjectBase<DerivedV> &PD1out,
               Eigen::PlainObjectBase<DerivedV> &PD2out)
     {
 //      PD1out = PD1;
@@ -153,7 +103,8 @@ namespace igl {
           Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n0    = N.row(f0);
           Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n1    = N.row(f1);
 
-          Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir0Rot = Rotate(n0,n1,dir0);
+          
+          Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir0Rot = igl::rotation_matrix_from_directions(n0, n1)*dir0;
           dir0Rot.normalize();
           Eigen::Matrix<typename DerivedV::Scalar, 3, 1> targD   = K_PI_new(dir1,dir0Rot,n1);
           
@@ -187,4 +138,8 @@ IGL_INLINE void igl::comb_cross_field(const Eigen::PlainObjectBase<DerivedV> &V,
 {
   igl::Comb<DerivedV, DerivedF> cmb(V, F, PD1, PD2);
   cmb.comb(PD1out, PD2out);
-}
+}
+
+#ifndef IGL_HEADER_ONLY
+// Explicit template specialization
+#endif

+ 15 - 9
include/igl/comb_cross_field.h

@@ -1,22 +1,28 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #ifndef IGL_COMB_CROSS_FIELD_H
 #define IGL_COMB_CROSS_FIELD_H
 #include "igl_inline.h"
 #include <Eigen/Core>
 namespace igl
 {
-  //todo
-  // Creates a quad mesh from a triangular mesh and a set of two directions
-  // per face, using the algorithm described in the paper
-  // "Mixed-Integer Quadrangulation" by D. Bommes, H. Zimmer, L. Kobbelt
-  // ACM SIGGRAPH 2009, Article No. 77 (http://dl.acm.org/citation.cfm?id=1531383)
+  // Computes principal matchings of the vectors of a cross field across face edges,
+  // and generates a combed cross field defined on the mesh faces
   
   // Inputs:
-  //   Vin        #V by 3 eigen Matrix of mesh vertex 3D positions
+  //   V          #V by 3 eigen Matrix of mesh vertex 3D positions
   //   F          #F by 4 eigen Matrix of face (quad) indices
-  //   maxIter    maximum numbers of iterations
-  //   threshold  minimum allowed threshold for non-planarity
+  //   PD1in      #F by 3 eigen Matrix of the first per face cross field vector
+  //   PD2in      #F by 3 eigen Matrix of the second per face cross field vector
   // Output:
-  //   Vout       #V by 3 eigen Matrix of planar mesh vertex 3D positions
+  //   PD1out      #F by 3 eigen Matrix of the first combed cross field vector
+  //   PD2out      #F by 3 eigen Matrix of the second combed cross field vector
   //
   
   

+ 13 - 0
include/igl/comb_frame_field.cpp

@@ -1,3 +1,11 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #include "comb_frame_field.h"
 #include "local_basis.h"
 
@@ -61,3 +69,8 @@ IGL_INLINE void igl::comb_frame_field(const Eigen::PlainObjectBase<DerivedV> &V,
   //    PD2_combed = BIS2_combed;
 }
 
+#ifndef IGL_HEADER_ONLY
+// Explicit template specialization
+#endif
+
+

+ 20 - 10
include/igl/comb_frame_field.h

@@ -1,22 +1,32 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #ifndef IGL_COMB_FRAME_FIELD_H
 #define IGL_COMB_FRAME_FIELD_H
 #include "igl_inline.h"
 #include <Eigen/Core>
 namespace igl
 {
-  //todo
-  // Creates a quad mesh from a triangular mesh and a set of two directions
-  // per face, using the algorithm described in the paper
-  // "Mixed-Integer Quadrangulation" by D. Bommes, H. Zimmer, L. Kobbelt
-  // ACM SIGGRAPH 2009, Article No. 77 (http://dl.acm.org/citation.cfm?id=1531383)
+  // Computes principal matchings of the vectors of a frame field across face edges,
+  // and generates a combed frame field defined on the mesh faces. This makes use of a
+  // combed cross field generated by combing the field created by the bisectors of the
+  // frame field.
   
   // Inputs:
-  //   Vin        #V by 3 eigen Matrix of mesh vertex 3D positions
-  //   F          #F by 4 eigen Matrix of face (quad) indices
-  //   maxIter    maximum numbers of iterations
-  //   threshold  minimum allowed threshold for non-planarity
+  //   V            #V by 3 eigen Matrix of mesh vertex 3D positions
+  //   F            #F by 4 eigen Matrix of face (quad) indices
+  //   PD1          #F by 3 eigen Matrix of the first per face cross field vector
+  //   PD2          #F by 3 eigen Matrix of the second per face cross field vector
+  //   BIS1_combed  #F by 3 eigen Matrix of the first combed bisector field vector
+  //   BIS2_combed  #F by 3 eigen Matrix of the second combed bisector field vector
   // Output:
-  //   Vout       #V by 3 eigen Matrix of planar mesh vertex 3D positions
+  //   PD1_combed  #F by 3 eigen Matrix of the first combed cross field vector
+  //   PD2_combed  #F by 3 eigen Matrix of the second combed cross field vector
   //
   
   

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 269 - 261
include/igl/comiso/miq.cpp


+ 5 - 5
include/igl/comiso/mixed_integer_quadrangulate.h → include/igl/comiso/miq.h

@@ -1,5 +1,5 @@
-#ifndef IGL_MIXED_INTEGER_QUADRANGULATE_H
-#define IGL_MIXED_INTEGER_QUADRANGULATE_H
+#ifndef IGL_MIQ_H
+#define IGL_MIQ_H
 #include <igl/igl_inline.h>
 #include <Eigen/Core>
 #include <vector>
@@ -21,7 +21,7 @@ namespace igl
   //
 
   template <typename DerivedV, typename DerivedF, typename DerivedU>
-  IGL_INLINE void mixed_integer_quadrangulate(const Eigen::PlainObjectBase<DerivedV> &V,
+  IGL_INLINE void miq(const Eigen::PlainObjectBase<DerivedV> &V,
                                               const Eigen::PlainObjectBase<DerivedF> &F,
                                               const Eigen::PlainObjectBase<DerivedV> &PD1,
                                               const Eigen::PlainObjectBase<DerivedV> &PD2,
@@ -36,7 +36,7 @@ namespace igl
                                               std::vector<std::vector<int> > hardFeatures = std::vector<std::vector<int> >());
 
   template <typename DerivedV, typename DerivedF, typename DerivedU>
-  IGL_INLINE void mixed_integer_quadrangulate(const Eigen::PlainObjectBase<DerivedV> &V,
+  IGL_INLINE void miq(const Eigen::PlainObjectBase<DerivedV> &V,
                                               const Eigen::PlainObjectBase<DerivedF> &F,
                                               const Eigen::PlainObjectBase<DerivedV> &PD1_combed,
                                               const Eigen::PlainObjectBase<DerivedV> &PD2_combed,
@@ -57,7 +57,7 @@ namespace igl
                                               std::vector<std::vector<int> > hardFeatures = std::vector<std::vector<int> >());
 };
 #ifdef IGL_HEADER_ONLY
-#include "mixed_integer_quadrangulate.cpp"
+#include "miq.cpp"
 #endif
 
 #endif

+ 9 - 0
include/igl/compute_frame_field_bisectors.cpp

@@ -1,3 +1,11 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #include "compute_frame_field_bisectors.h"
 #include "igl/local_basis.h"
 
@@ -65,4 +73,5 @@ IGL_INLINE void igl::compute_frame_field_bisectors(
 }
 
 #ifndef IGL_HEADER_ONLY
+// Explicit template specialization
 #endif

+ 10 - 1
include/igl/compute_frame_field_bisectors.h

@@ -1,10 +1,18 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #ifndef IGL_COMPUTE_FRAME_FIELD_BISECTORS_H
 #define IGL_COMPUTE_FRAME_FIELD_BISECTORS_H
 #include "igl_inline.h"
 #include <Eigen/Core>
 namespace igl
 {
-  // Compute face normals via vertex position list, face list
+  // Compute bisectors of a frame field defined on mesh faces
   // Inputs:
   //   V     #V by 3 eigen Matrix of mesh vertex 3D positions
   //   F     #F by 3 eigen Matrix of face (triangle) indices
@@ -26,6 +34,7 @@ namespace igl
                                                 const Eigen::PlainObjectBase<DerivedV>& PD2,
                                                 Eigen::PlainObjectBase<DerivedV>& BIS1,
                                                 Eigen::PlainObjectBase<DerivedV>& BIS2);
+
   // Wrapper without given basis vectors.
   template <typename DerivedV, typename DerivedF>
   IGL_INLINE void compute_frame_field_bisectors(

+ 153 - 140
include/igl/cross_field_missmatch.cpp

@@ -1,3 +1,11 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #include "cross_field_missmatch.h"
 #include "comb_cross_field.h"
 
@@ -7,145 +15,150 @@
 #include "is_border_vertex.h"
 #include "vf.h"
 #include "tt.h"
+#include "rotation_matrix_from_directions.h"
+
+namespace igl {
+  template <typename DerivedV, typename DerivedF, typename DerivedO>
+  class MissMatchCalculator
+  {
+  public:
+    
+    const Eigen::PlainObjectBase<DerivedV> &V;
+    const Eigen::PlainObjectBase<DerivedF> &F;
+    const Eigen::PlainObjectBase<DerivedV> &PD1;
+    const Eigen::PlainObjectBase<DerivedV> &PD2;
+    Eigen::PlainObjectBase<DerivedV> N;
+    
+  private:
+    // internal
+    std::vector<bool> V_border; // bool
+    std::vector<std::vector<int> > VF;
+    std::vector<std::vector<int> > VFi;
+    Eigen::PlainObjectBase<DerivedF> TT;
+    Eigen::PlainObjectBase<DerivedF> TTi;
+    
+    
+  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;
+    }
+    
+    
+    ///compute the mismatch between 2 faces
+    inline int MissMatchByCross(const int f0,
+                         const int f1)
+    {
+      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir0 = PD1.row(f0);
+      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir1 = PD1.row(f1);
+      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n0 = N.row(f0);
+      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n1 = N.row(f1);
+      
+      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir1Rot = igl::rotation_matrix_from_directions(n1,n0)*dir1;
+      dir1Rot.normalize();
+      
+      // TODO: this should be equivalent to the other code below, to check!
+      // Compute the angle between the two vectors
+      //    double a0 = atan2(dir0.dot(B2.row(f0)),dir0.dot(B1.row(f0)));
+      //    double a1 = atan2(dir1Rot.dot(B2.row(f0)),dir1Rot.dot(B1.row(f0)));
+      //
+      //    double angle_diff = a1-a0;   //VectToAngle(f0,dir1Rot);
+      
+      double angle_diff = atan2(dir1Rot.dot(PD2.row(f0)),dir1Rot.dot(PD1.row(f0)));
+      
+      //    std::cerr << "Dani: " << dir0(0) << " " << dir0(1) << " " << dir0(2) << " " << dir1Rot(0) << " " << dir1Rot(1) << " " << dir1Rot(2) << " " << angle_diff << std::endl;
+      
+      double step=M_PI/2.0;
+      int i=(int)floor((angle_diff/step)+0.5);
+      int k=0;
+      if (i>=0)
+        k=i%4;
+      else
+        k=(-(3*i))%4;
+      return k;
+    }
+    
+    
+public:
+  inline MissMatchCalculator(const Eigen::PlainObjectBase<DerivedV> &_V,
+                      const Eigen::PlainObjectBase<DerivedF> &_F,
+                      const Eigen::PlainObjectBase<DerivedV> &_PD1,
+                      const Eigen::PlainObjectBase<DerivedV> &_PD2
+                      ):
+  V(_V),
+  F(_F),
+  PD1(_PD1),
+  PD2(_PD2)
+  {
+    igl::per_face_normals(V,F,N);
+    V_border = igl::is_border_vertex(V,F);
+    igl::vf(V,F,VF,VFi);
+    igl::tt(V,F,TT,TTi);
+  }
+  
+  inline void calculateMissmatch(Eigen::PlainObjectBase<DerivedO> &Handle_MMatch)
+  {
+    Handle_MMatch.setConstant(F.rows(),3,-1);
+    for (unsigned int i=0;i<F.rows();i++)
+    {
+      for (int j=0;j<3;j++)
+      {
+        if (i==TT(i,j) || TT(i,j) == -1)
+          Handle_MMatch(i,j)=0;
+        else
+          Handle_MMatch(i,j) = MissMatchByCross(i,TT(i,j));
+      }
+    }
+  }
+  
+};
+}
+template <typename DerivedV, typename DerivedF, typename DerivedO>
+IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
+                                           const Eigen::PlainObjectBase<DerivedF> &F,
+                                           const Eigen::PlainObjectBase<DerivedV> &PD1,
+                                           const Eigen::PlainObjectBase<DerivedV> &PD2,
+                                           const bool isCombed,
+                                           Eigen::PlainObjectBase<DerivedO> &missmatch)
+{
+  Eigen::PlainObjectBase<DerivedV> PD1_combed;
+  Eigen::PlainObjectBase<DerivedV> PD2_combed;
+  
+  if (!isCombed)
+    igl::comb_cross_field(V,F,PD1,PD2,PD1_combed,PD2_combed);
+  else
+  {
+    PD1_combed = PD1;
+    PD2_combed = PD2;
+  }
+  igl::MissMatchCalculator<DerivedV, DerivedF, DerivedO> sf(V, F, PD1_combed, PD2_combed);
+  sf.calculateMissmatch(missmatch);
+}
 
+#ifndef IGL_HEADER_ONLY
+// Explicit template specialization
+#endif
 
-//namespace igl {
-//  template <typename DerivedV, typename DerivedF, typename DerivedO>
-//  class MissMatchCalculator
-//  {
-//  public:
-//    
-//    const Eigen::PlainObjectBase<DerivedV> &V;
-//    const Eigen::PlainObjectBase<DerivedF> &F;
-//    const Eigen::PlainObjectBase<DerivedV> &PD1;
-//    const Eigen::PlainObjectBase<DerivedV> &PD2;
-//    Eigen::PlainObjectBase<DerivedV> N;
-//    
-//  private:
-//    // internal
-//    std::vector<bool> V_border; // bool
-//    std::vector<std::vector<int> > VF;
-//    std::vector<std::vector<int> > VFi;
-//    Eigen::PlainObjectBase<DerivedF> TT;
-//    Eigen::PlainObjectBase<DerivedF> TTi;
-//    
-//    
-//  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.
-//    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
-//    int MissMatchByCross(const int f0,
-//                         const int f1)
-//    {
-//      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir0 = PD1.row(f0);
-//      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir1 = PD1.row(f1);
-//      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n0 = N.row(f0);
-//      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> n1 = N.row(f1);
-//      
-//      Eigen::Matrix<typename DerivedV::Scalar, 3, 1> dir1Rot = Comb<DerivedV, DerivedF>::Rotate(n1,n0,dir1);
-//      dir1Rot.normalize();
-//      
-//      // TODO: this should be equivalent to the other code below, to check!
-//      // Compute the angle between the two vectors
-//      //    double a0 = atan2(dir0.dot(B2.row(f0)),dir0.dot(B1.row(f0)));
-//      //    double a1 = atan2(dir1Rot.dot(B2.row(f0)),dir1Rot.dot(B1.row(f0)));
-//      //
-//      //    double angle_diff = a1-a0;   //VectToAngle(f0,dir1Rot);
-//      
-//      double angle_diff = atan2(dir1Rot.dot(PD2.row(f0)),dir1Rot.dot(PD1.row(f0)));
-//      
-//      //    std::cerr << "Dani: " << dir0(0) << " " << dir0(1) << " " << dir0(2) << " " << dir1Rot(0) << " " << dir1Rot(1) << " " << dir1Rot(2) << " " << angle_diff << std::endl;
-//      
-//      double step=M_PI/2.0;
-//      int i=(int)floor((angle_diff/step)+0.5);
-//      int k=0;
-//      if (i>=0)
-//        k=i%4;
-//      else
-//        k=(-(3*i))%4;
-//      return k;
-//    }
-//    
-//    
-//public:
-//  MissMatchCalculator(const Eigen::PlainObjectBase<DerivedV> &_V,
-//                      const Eigen::PlainObjectBase<DerivedF> &_F,
-//                      const Eigen::PlainObjectBase<DerivedV> &_PD1,
-//                      const Eigen::PlainObjectBase<DerivedV> &_PD2
-//                      ):
-//  V(_V),
-//  F(_F),
-//  PD1(_PD1),
-//  PD2(_PD2)
-//  {
-//    igl::per_face_normals(V,F,N);
-//    V_border = igl::is_border_vertex(V,F);
-//    igl::vf(V,F,VF,VFi);
-//    igl::tt(V,F,TT,TTi);
-//  }
-//  
-//  void calculateMissmatch(Eigen::PlainObjectBase<DerivedO> &Handle_MMatch)
-//  {
-//    Handle_MMatch.setConstant(F.rows(),3,-1);
-//    for (unsigned int i=0;i<F.rows();i++)
-//    {
-//      for (int j=0;j<3;j++)
-//      {
-//        if (i==TT(i,j) || TT(i,j) == -1)
-//          Handle_MMatch(i,j)=0;
-//        else
-//          Handle_MMatch(i,j) = MissMatchByCross(i,TT(i,j));
-//      }
-//    }
-//  }
-//  
-//};
-//}
-//template <typename DerivedV, typename DerivedF, typename DerivedO>
-//IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
-//                                           const Eigen::PlainObjectBase<DerivedF> &F,
-//                                           const Eigen::PlainObjectBase<DerivedV> &PD1,
-//                                           const Eigen::PlainObjectBase<DerivedV> &PD2,
-//                                           const bool isCombed,
-//                                           Eigen::PlainObjectBase<DerivedO> &missmatch)
-//{
-//  Eigen::PlainObjectBase<DerivedV> PD1_combed;
-//  Eigen::PlainObjectBase<DerivedV> PD2_combed;
-//  
-//  if (!isCombed)
-//    igl::comb_cross_field(V,F,PD1,PD2,PD1_combed,PD2_combed);
-//  else
-//  {
-//    PD1_combed = PD1;
-//    PD2_combed = PD2;
-//  }
-//  igl::MissMatchCalculator<DerivedV, DerivedF, DerivedO> sf(V, F, PD1_combed, PD2_combed);
-//  sf.calculateMissmatch(missmatch);
-//}

+ 19 - 12
include/igl/cross_field_missmatch.h

@@ -1,26 +1,33 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #ifndef IGL_CROSS_FIELD_MISSMATCH_H
 #define IGL_CROSS_FIELD_MISSMATCH_H
 #include "igl_inline.h"
 #include <Eigen/Core>
 namespace igl
 {
-  //todo
-  // Creates a quad mesh from a triangular mesh and a set of two directions
-  // per face, using the algorithm described in the paper
-  // "Mixed-Integer Quadrangulation" by D. Bommes, H. Zimmer, L. Kobbelt
-  // ACM SIGGRAPH 2009, Article No. 77 (http://dl.acm.org/citation.cfm?id=1531383)
+  // Calculates the missmatch (integer), at each face edge, of a cross field defined on the mesh faces.
+  // The integer missmatch is a multiple of pi/2 that transforms the cross on one side of the edge to
+  // the cross on the other side. It represents the deviation from a Lie connection across the edge.
   
   // Inputs:
-  //   Vin        #V by 3 eigen Matrix of mesh vertex 3D positions
-  //   F          #F by 4 eigen Matrix of face (quad) indices
-  //   maxIter    maximum numbers of iterations
-  //   threshold  minimum allowed threshold for non-planarity
+  //   V         #V by 3 eigen Matrix of mesh vertex 3D positions
+  //   F         #F by 3 eigen Matrix of face (quad) indices
+  //   PD1       #F by 3 eigen Matrix of the first per face cross field vector
+  //   PD2       #F by 3 eigen Matrix of the second per face cross field vector
+  //   isCombed  boolean, specifying whether the field is combed (i.e. matching has been precomputed.
+  //             If not, the field is combed first.
   // Output:
-  //   Vout       #V by 3 eigen Matrix of planar mesh vertex 3D positions
+  //   Handle_MMatch    #F by 3 eigen Matrix containing the integer missmatch of the cross field
+  //                    across all face edges
   //
   
-  
-  // TODO: this returns singularity index modulo 4. It may need to be modified to cover indices
   template <typename DerivedV, typename DerivedF, typename DerivedO>
   IGL_INLINE void cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
                                         const Eigen::PlainObjectBase<DerivedF> &F,

+ 17 - 6
include/igl/cut_mesh_from_singularities.cpp

@@ -1,3 +1,11 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #include "cut_mesh_from_singularities.h"
 
 #include <vector>
@@ -27,13 +35,13 @@ namespace igl {
 
   protected:
     
-    bool IsRotSeam(const int f0,const int edge)
+    inline bool IsRotSeam(const int f0,const int edge)
     {
       unsigned char MM = Handle_MMatch(f0,edge);
       return (MM!=0);
     }
     
-    void FloodFill(const int start, Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
+    inline void FloodFill(const int start, Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
     {
       std::deque<int> d;
       ///clean the visited flag
@@ -65,7 +73,7 @@ namespace igl {
       }
     }
     
-    void Retract(Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
+    inline void Retract(Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
     {
       std::vector<int> e(V.rows(),0); // number of edges per vert
       
@@ -116,7 +124,7 @@ namespace igl {
 
   public:
    
-    MeshCutter(const Eigen::PlainObjectBase<DerivedV> &V_,
+    inline MeshCutter(const Eigen::PlainObjectBase<DerivedV> &V_,
                const Eigen::PlainObjectBase<DerivedF> &F_,
                const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch_,
                const Eigen::PlainObjectBase<DerivedS> &Handle_Singular_,
@@ -130,7 +138,7 @@ namespace igl {
       tt(V,F,TT,TTi);
     };
     
-    void cut(Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
+    inline void cut(Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
     {
       F_visited.setConstant(F.rows(),0);
       Handle_Seams.setConstant(F.rows(),3,1);
@@ -174,4 +182,7 @@ IGL_INLINE void igl::cut_mesh_from_singularities(const Eigen::PlainObjectBase<De
   igl::MeshCutter< DerivedV, DerivedF, DerivedM, DerivedS, DerivedO> mc(V, F, Handle_MMatch, isSingularity, singularityIndex);
   mc.cut(Handle_Seams);
 
-}
+}
+#ifndef IGL_HEADER_ONLY
+// Explicit template specialization
+#endif

+ 8 - 13
include/igl/cut_mesh_from_singularities.h

@@ -1,3 +1,11 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #ifndef IGL_CUT_MESH_FROM_SINGULARITIES_H
 #define IGL_CUT_MESH_FROM_SINGULARITIES_H
 #include "igl_inline.h"
@@ -5,19 +13,6 @@
 namespace igl
 {
   //todo
-  // Creates a quad mesh from a triangular mesh and a set of two directions
-  // per face, using the algorithm described in the paper
-  // "Mixed-Integer Quadrangulation" by D. Bommes, H. Zimmer, L. Kobbelt
-  // ACM SIGGRAPH 2009, Article No. 77 (http://dl.acm.org/citation.cfm?id=1531383)
-  
-  // Inputs:
-  //   Vin        #V by 3 eigen Matrix of mesh vertex 3D positions
-  //   F          #F by 4 eigen Matrix of face (quad) indices
-  //   maxIter    maximum numbers of iterations
-  //   threshold  minimum allowed threshold for non-planarity
-  // Output:
-  //   Vout       #V by 3 eigen Matrix of planar mesh vertex 3D positions
-  //
   
   template <typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedS, typename DerivedO>
   IGL_INLINE void cut_mesh_from_singularities(const Eigen::PlainObjectBase<DerivedV> &V,

+ 13 - 1
include/igl/find_cross_field_singularities.cpp

@@ -1,3 +1,11 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #include "find_cross_field_singularities.h"
 #include "cross_field_missmatch.h"
 
@@ -63,4 +71,8 @@ IGL_INLINE void igl::find_cross_field_singularities(const Eigen::PlainObjectBase
   Eigen::Matrix<typename DerivedV::Scalar, Eigen::Dynamic, 3> Handle_MMatch;
   igl::cross_field_missmatch<DerivedV, DerivedF, DerivedO>(V, F, PD1, PD2, Handle_MMatch);
   igl::find_cross_field_singularities(V, F, Handle_MMatch, isSingularity, singularityIndex);
-}
+}
+
+#ifndef IGL_HEADER_ONLY
+// Explicit template specialization
+#endif

+ 26 - 14
include/igl/find_cross_field_singularities.h

@@ -1,25 +1,29 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
 #ifndef IGL_FIND_CROSS_FIELD_SINGULARITIES_H
 #define IGL_FIND_CROSS_FIELD_SINGULARITIES_H
 #include "igl_inline.h"
 #include <Eigen/Core>
 namespace igl
 {
-  //todo
-  // Creates a quad mesh from a triangular mesh and a set of two directions
-  // per face, using the algorithm described in the paper
-  // "Mixed-Integer Quadrangulation" by D. Bommes, H. Zimmer, L. Kobbelt
-  // ACM SIGGRAPH 2009, Article No. 77 (http://dl.acm.org/citation.cfm?id=1531383)
+  // Computes singularities of a cross field, assumed combed
+  
   
   // Inputs:
-  //   Vin        #V by 3 eigen Matrix of mesh vertex 3D positions
-  //   F          #F by 4 eigen Matrix of face (quad) indices
-  //   maxIter    maximum numbers of iterations
-  //   threshold  minimum allowed threshold for non-planarity
+  //   V                #V by 3 eigen Matrix of mesh vertex 3D positions
+  //   F                #F by 3 eigen Matrix of face (quad) indices
+  //   Handle_MMatch    #F by 3 eigen Matrix containing the integer missmatch of the cross field
+  //                    across all face edges
   // Output:
-  //   Vout       #V by 3 eigen Matrix of planar mesh vertex 3D positions
+  //   isSingularity    #V by 1 boolean eigen Vector indicating the presence of a singularity on a vertex
+  //   singularityIndex #V by 1 integer eigen Vector containing the singularity indices
   //
-  
-  
   template <typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedO>
   IGL_INLINE void find_cross_field_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
                                                  const Eigen::PlainObjectBase<DerivedF> &F,
@@ -27,8 +31,16 @@ namespace igl
                                                  Eigen::PlainObjectBase<DerivedO> &isSingularity,
                                                  Eigen::PlainObjectBase<DerivedO> &singularityIndex);
 
-  
-  // TODO: this returns singularity index modulo 4. It may need to be modified to cover indices
+  // Wrapper that calculates the missmatch if it is not provided
+  // Inputs:
+  //   V                #V by 3 eigen Matrix of mesh vertex 3D positions
+  //   F                #F by 3 eigen Matrix of face (quad) indices
+  //   PD1              #F by 3 eigen Matrix of the first per face cross field vector
+  //   PD2              #F by 3 eigen Matrix of the second per face  cross field vector
+  // Output:
+  //   isSingularity    #V by 1 boolean eigen Vector indicating the presence of a singularity on a vertex
+  //   singularityIndex #V by 1 integer eigen Vector containing the singularity indices
+  //
   template <typename DerivedV, typename DerivedF, typename DerivedO>
   IGL_INLINE void find_cross_field_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
                                                  const Eigen::PlainObjectBase<DerivedF> &F,

+ 15 - 14
include/igl/planarize_quad_mesh.cpp

@@ -1,6 +1,7 @@
 #include "planarize_quad_mesh.h"
 #include "quad_planarity.h"
 #include <Eigen/Sparse>
+#include <Eigen/Eigenvalues> 
 #include <iostream>
 
 namespace igl
@@ -31,12 +32,12 @@ namespace igl
     const int ni = 4;
     
     // Matrix assemblers
-    void assembleQ();
-    void assembleP();
-    void assembleNi();
+    inline void assembleQ();
+    inline void assembleP();
+    inline void assembleNi();
 
     // Selects out of Vv the 4 vertices belonging to face fi
-    void assembleSelector(int fi,
+    inline void assembleSelector(int fi,
                           Eigen::SparseMatrix<typename DerivedV::Scalar > &S);
     
     
@@ -172,16 +173,16 @@ inline void igl::PlanarizerShapeUp<DerivedV, DerivedF>::assembleP()
     Eigen::Matrix<typename DerivedV::Scalar, 3, 3> C = CC*CC.transpose();
     
     // Alec: Doesn't compile
-    //Eigen::EigenSolver<Eigen::Matrix<typename DerivedV::Scalar, 3, 3>> es(C);
-    //// the real() is for compilation purposes
-    //Eigen::Matrix<typename DerivedV::Scalar, 3, 1> lambda = es.eigenvalues().real();
-    //Eigen::Matrix<typename DerivedV::Scalar, 3, 3> U = es.eigenvectors().real();
-    //int min_i;
-    //lambda.cwiseAbs().minCoeff(&min_i);
-    //U.col(min_i).setZero();
-    //Eigen::Matrix<typename DerivedV::Scalar, Eigen::Dynamic, Eigen::Dynamic> PP = U*U.transpose()*CC;
-    //for (int i = 0; i <ni; ++i)
-    //  P.segment(3*ni*fi+3*i, 3) =  weightsSqrt[fi]*PP.col(i);
+    Eigen::EigenSolver<Eigen::Matrix<typename DerivedV::Scalar, 3, 3>> es(C);
+    // the real() is for compilation purposes
+    Eigen::Matrix<typename DerivedV::Scalar, 3, 1> lambda = es.eigenvalues().real();
+    Eigen::Matrix<typename DerivedV::Scalar, 3, 3> U = es.eigenvectors().real();
+    int min_i;
+    lambda.cwiseAbs().minCoeff(&min_i);
+    U.col(min_i).setZero();
+    Eigen::Matrix<typename DerivedV::Scalar, Eigen::Dynamic, Eigen::Dynamic> PP = U*U.transpose()*CC;
+    for (int i = 0; i <ni; ++i)
+     P.segment(3*ni*fi+3*i, 3) =  weightsSqrt[fi]*PP.col(i);
     
   }
 }

+ 60 - 0
include/igl/rotation_matrix_from_directions.cpp

@@ -0,0 +1,60 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
+#include "rotation_matrix_from_directions.h"
+
+template <typename Scalar>
+IGL_INLINE Eigen::Matrix<Scalar, 3, 3> igl::rotation_matrix_from_directions(Eigen::Matrix<Scalar, 3, 1> v0,
+                                                                        Eigen::Matrix<Scalar, 3, 1> v1,
+                                                                        bool normalized)
+{
+  Eigen::Matrix<Scalar, 3, 3> rotM;
+  const double epsilon=0.00001;
+  if (!normalized)
+  {
+    v0.normalize();
+    v1.normalize();
+  }
+  Scalar dot=v0.dot(v1);
+  ///control if there is no rotation
+  if (dot>((double)1-epsilon))
+  {
+    rotM = Eigen::Matrix<Scalar, 3, 3>::Identity();
+    return rotM;
+  }
+  
+  ///find the axis of rotation
+  Eigen::Matrix<Scalar, 3, 1> axis;
+  axis=v0.cross(v1);
+  axis.normalize();
+  
+  ///construct rotation matrix
+  Scalar u=axis(0);
+  Scalar v=axis(1);
+  Scalar w=axis(2);
+  Scalar phi=acos(dot);
+  Scalar rcos = cos(phi);
+  Scalar rsin = sin(phi);
+  
+  rotM(0,0) =      rcos + u*u*(1-rcos);
+  rotM(1,0) =  w * rsin + v*u*(1-rcos);
+  rotM(2,0) = -v * rsin + w*u*(1-rcos);
+  rotM(0,1) = -w * rsin + u*v*(1-rcos);
+  rotM(1,1) =      rcos + v*v*(1-rcos);
+  rotM(2,1) =  u * rsin + w*v*(1-rcos);
+  rotM(0,2) =  v * rsin + u*w*(1-rcos);
+  rotM(1,2) = -u * rsin + v*w*(1-rcos);
+  rotM(2,2) =      rcos + w*w*(1-rcos);
+  
+  return rotM;
+}
+
+#ifndef IGL_HEADER_ONLY
+// Explicit template specialization
+#endif
+

+ 36 - 0
include/igl/rotation_matrix_from_directions.h

@@ -0,0 +1,36 @@
+// This file is part of libigl, a simple c++ geometry processing library.
+//
+// Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
+// obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef IGL_ROTATION_MATRIX_FROM_DIRECTIONS
+#define IGL_ROTATION_MATRIX_FROM_DIRECTIONS
+#include "igl_inline.h"
+
+#include <Eigen/Core>
+
+namespace igl {
+  /// Given 2 vectors centered on origin calculate the rotation matrix from first to the second
+  
+  // Inputs:
+  //   v0, v1         the two #3 by 1 vectors
+  //   normalized     boolean, if false, then the vectors are normalized prior to the calculation
+  // Output:
+  //                  3 by 3 rotation matrix that takes v0 to v1
+  //
+  template <typename Scalar>
+  IGL_INLINE Eigen::Matrix<Scalar, 3, 3> rotation_matrix_from_directions(Eigen::Matrix<Scalar, 3, 1> v0,
+                                                                     Eigen::Matrix<Scalar, 3, 1> v1,
+                                                                     bool normalized=true);
+}
+
+
+#ifdef IGL_HEADER_ONLY
+#include "rotation_matrix_from_directions.cpp"
+#endif
+
+
+#endif /* defined(IGL_ROTATION_MATRIX_FROM_DIRECTIONS) */

+ 1 - 0
include/igl/writeOBJ.cpp

@@ -121,4 +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&);
 #endif

+ 1 - 1
tutorial/505_MIQ/main.cpp

@@ -1,7 +1,7 @@
 #define IGL_HEADER_ONLY
 #include <igl/readOBJ.h>
 #include <igl/viewer/Viewer.h>
-#include <igl/comiso/mixed_integer_quadrangulate.h>
+#include <igl/comiso/miq.h>
 #include <igl/barycenter.h>
 #include <igl/avg_edge_length.h>
 #include <sstream>

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä