ソースを参照

no message

Former-commit-id: ab59d67493b7daec9a75172a8d67f19a8c23e06b
Olga Diamanti 10 年 前
コミット
4888e1540d

+ 1 - 1
include/igl/comiso/miq.cpp

@@ -2250,7 +2250,7 @@ IGL_INLINE void igl::miq(const Eigen::PlainObjectBase<DerivedV> &V,
   igl::find_cross_field_singularities(V, F, Handle_MMatch, isSingularity, singularityIndex);
   igl::find_cross_field_singularities(V, F, Handle_MMatch, isSingularity, singularityIndex);
 
 
   Eigen::Matrix<int, Eigen::Dynamic, 3> Handle_Seams;
   Eigen::Matrix<int, Eigen::Dynamic, 3> Handle_Seams;
-  igl::cut_mesh_from_singularities(V, F, Handle_MMatch, isSingularity, singularityIndex, Handle_Seams);
+  igl::cut_mesh_from_singularities(V, F, Handle_MMatch, Handle_Seams);
 
 
   Eigen::PlainObjectBase<DerivedV> PD1_combed, PD2_combed;
   Eigen::PlainObjectBase<DerivedV> PD1_combed, PD2_combed;
   igl::comb_frame_field(V, F, PD1, PD2, BIS1_combed, BIS2_combed, PD1_combed, PD2_combed);
   igl::comb_frame_field(V, F, PD1, PD2, BIS1_combed, BIS2_combed, PD1_combed, PD2_combed);

+ 7 - 6
include/igl/cross_field_missmatch.cpp

@@ -19,7 +19,7 @@
 #include <igl/rotation_matrix_from_directions.h>
 #include <igl/rotation_matrix_from_directions.h>
 
 
 namespace igl {
 namespace igl {
-  template <typename DerivedV, typename DerivedF, typename DerivedO>
+  template <typename DerivedV, typename DerivedF>
   class MissMatchCalculator
   class MissMatchCalculator
   {
   {
   public:
   public:
@@ -91,7 +91,7 @@ public:
     igl::triangle_triangle_adjacency(V,F,TT,TTi);
     igl::triangle_triangle_adjacency(V,F,TT,TTi);
   }
   }
 
 
-  inline void calculateMissmatch(Eigen::PlainObjectBase<DerivedO> &Handle_MMatch)
+  inline void calculateMissmatch(Eigen::PlainObjectBase<DerivedF> &Handle_MMatch)
   {
   {
     Handle_MMatch.setConstant(F.rows(),3,-1);
     Handle_MMatch.setConstant(F.rows(),3,-1);
     for (unsigned int i=0;i<F.rows();i++)
     for (unsigned int i=0;i<F.rows();i++)
@@ -108,13 +108,13 @@ public:
 
 
 };
 };
 }
 }
-template <typename DerivedV, typename DerivedF, typename DerivedO>
+template <typename DerivedV, typename DerivedF>
 IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
 IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
                                            const Eigen::PlainObjectBase<DerivedF> &F,
                                            const Eigen::PlainObjectBase<DerivedF> &F,
                                            const Eigen::PlainObjectBase<DerivedV> &PD1,
                                            const Eigen::PlainObjectBase<DerivedV> &PD1,
                                            const Eigen::PlainObjectBase<DerivedV> &PD2,
                                            const Eigen::PlainObjectBase<DerivedV> &PD2,
                                            const bool isCombed,
                                            const bool isCombed,
-                                           Eigen::PlainObjectBase<DerivedO> &missmatch)
+                                           Eigen::PlainObjectBase<DerivedF> &missmatch)
 {
 {
   Eigen::PlainObjectBase<DerivedV> PD1_combed;
   Eigen::PlainObjectBase<DerivedV> PD1_combed;
   Eigen::PlainObjectBase<DerivedV> PD2_combed;
   Eigen::PlainObjectBase<DerivedV> PD2_combed;
@@ -126,11 +126,12 @@ IGL_INLINE void igl::cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV
     PD1_combed = PD1;
     PD1_combed = PD1;
     PD2_combed = PD2;
     PD2_combed = PD2;
   }
   }
-  igl::MissMatchCalculator<DerivedV, DerivedF, DerivedO> sf(V, F, PD1_combed, PD2_combed);
+  igl::MissMatchCalculator<DerivedV, DerivedF> sf(V, F, PD1_combed, PD2_combed);
   sf.calculateMissmatch(missmatch);
   sf.calculateMissmatch(missmatch);
 }
 }
 
 
 #ifdef IGL_STATIC_LIBRARY
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
-template void igl::cross_field_missmatch<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&);
+template void igl::cross_field_missmatch<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&);
+
 #endif
 #endif

+ 4 - 4
include/igl/cross_field_missmatch.h

@@ -15,7 +15,7 @@ namespace igl
   // Calculates the missmatch (integer), at each face edge, of a cross field defined on the mesh faces.
   // 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 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.
   // the cross on the other side. It represents the deviation from a Lie connection across the edge.
-  
+
   // Inputs:
   // Inputs:
   //   V         #V by 3 eigen Matrix of mesh vertex 3D positions
   //   V         #V by 3 eigen Matrix of mesh vertex 3D positions
   //   F         #F by 3 eigen Matrix of face (quad) indices
   //   F         #F by 3 eigen Matrix of face (quad) indices
@@ -27,14 +27,14 @@ namespace igl
   //   Handle_MMatch    #F by 3 eigen Matrix containing the integer missmatch of the cross field
   //   Handle_MMatch    #F by 3 eigen Matrix containing the integer missmatch of the cross field
   //                    across all face edges
   //                    across all face edges
   //
   //
-  
-  template <typename DerivedV, typename DerivedF, typename DerivedO>
+
+  template <typename DerivedV, typename DerivedF>
   IGL_INLINE void cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
   IGL_INLINE void cross_field_missmatch(const Eigen::PlainObjectBase<DerivedV> &V,
                                         const Eigen::PlainObjectBase<DerivedF> &F,
                                         const Eigen::PlainObjectBase<DerivedF> &F,
                                         const Eigen::PlainObjectBase<DerivedV> &PD1,
                                         const Eigen::PlainObjectBase<DerivedV> &PD1,
                                         const Eigen::PlainObjectBase<DerivedV> &PD2,
                                         const Eigen::PlainObjectBase<DerivedV> &PD2,
                                         const bool isCombed,
                                         const bool isCombed,
-                                        Eigen::PlainObjectBase<DerivedO> &missmatch);
+                                        Eigen::PlainObjectBase<DerivedF> &missmatch);
 }
 }
 #ifndef IGL_STATIC_LIBRARY
 #ifndef IGL_STATIC_LIBRARY
 #include "cross_field_missmatch.cpp"
 #include "cross_field_missmatch.cpp"

+ 4 - 14
include/igl/cut_mesh_from_singularities.cpp

@@ -19,7 +19,6 @@ namespace igl {
   typename DerivedV,
   typename DerivedV,
   typename DerivedF,
   typename DerivedF,
   typename DerivedM,
   typename DerivedM,
-  typename DerivedS,
   typename DerivedO
   typename DerivedO
   >
   >
   class MeshCutter
   class MeshCutter
@@ -27,8 +26,6 @@ namespace igl {
   protected:
   protected:
     const Eigen::PlainObjectBase<DerivedV> &V;
     const Eigen::PlainObjectBase<DerivedV> &V;
     const Eigen::PlainObjectBase<DerivedF> &F;
     const Eigen::PlainObjectBase<DerivedF> &F;
-    const Eigen::PlainObjectBase<DerivedS> &Handle_Singular;
-    const Eigen::PlainObjectBase<DerivedS> &Handle_SingularDegree;
     const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch;
     const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch;
 
 
     Eigen::VectorXi F_visited;
     Eigen::VectorXi F_visited;
@@ -128,14 +125,10 @@ namespace igl {
 
 
     inline MeshCutter(const Eigen::PlainObjectBase<DerivedV> &V_,
     inline MeshCutter(const Eigen::PlainObjectBase<DerivedV> &V_,
                const Eigen::PlainObjectBase<DerivedF> &F_,
                const Eigen::PlainObjectBase<DerivedF> &F_,
-               const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch_,
-               const Eigen::PlainObjectBase<DerivedS> &Handle_Singular_,
-               const Eigen::PlainObjectBase<DerivedS> &Handle_SingularDegree_):
+               const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch_):
     V(V_),
     V(V_),
     F(F_),
     F(F_),
-    Handle_MMatch(Handle_MMatch_),
-    Handle_Singular(Handle_Singular_),
-    Handle_SingularDegree(Handle_SingularDegree_)
+    Handle_MMatch(Handle_MMatch_)
     {
     {
       triangle_triangle_adjacency(V,F,TT,TTi);
       triangle_triangle_adjacency(V,F,TT,TTi);
     };
     };
@@ -172,20 +165,17 @@ namespace igl {
 template <typename DerivedV,
 template <typename DerivedV,
   typename DerivedF,
   typename DerivedF,
   typename DerivedM,
   typename DerivedM,
-  typename DerivedS,
   typename DerivedO>
   typename DerivedO>
 IGL_INLINE void igl::cut_mesh_from_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
 IGL_INLINE void igl::cut_mesh_from_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
                                                  const Eigen::PlainObjectBase<DerivedF> &F,
                                                  const Eigen::PlainObjectBase<DerivedF> &F,
                                                  const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch,
                                                  const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch,
-                                                 const Eigen::PlainObjectBase<DerivedS> &isSingularity,
-                                                 const Eigen::PlainObjectBase<DerivedS> &singularityIndex,
                                                  Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
                                                  Eigen::PlainObjectBase<DerivedO> &Handle_Seams)
 {
 {
-  igl::MeshCutter< DerivedV, DerivedF, DerivedM, DerivedS, DerivedO> mc(V, F, Handle_MMatch, isSingularity, singularityIndex);
+  igl::MeshCutter< DerivedV, DerivedF, DerivedM, DerivedO> mc(V, F, Handle_MMatch);
   mc.cut(Handle_Seams);
   mc.cut(Handle_Seams);
 
 
 }
 }
 #ifdef IGL_STATIC_LIBRARY
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
-template void igl::cut_mesh_from_singularities<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&);
+template void igl::cut_mesh_from_singularities<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 #endif
 #endif

+ 2 - 7
include/igl/cut_mesh_from_singularities.h

@@ -20,19 +20,14 @@ namespace igl
   // V:                 #V by 3 list of mesh vertex positions
   // V:                 #V by 3 list of mesh vertex positions
   // F:                 #F by 3 list of faces
   // F:                 #F by 3 list of faces
   // MMatch:            #F by 3 list of per corner integer mismatch
   // MMatch:            #F by 3 list of per corner integer mismatch
-  // is_singularity:    #V by 1 list of booleans that denotes if a vertex is a singularity
-  // singularity_index: #V by 1 list of degree of the singularity
   // seams:             #F by 3 list of per corner booleans that denotes if an edge is a seam or not
   // seams:             #F by 3 list of per corner booleans that denotes if an edge is a seam or not
   //
   //
-  // TODO: remove is_singularity, it is redundant
-  //       make the name of the variables consistent in the cpp
+  // TODO: make the name of the variables consistent in the cpp
 
 
-  template <typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedS, typename DerivedO>
+  template <typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedO>
   IGL_INLINE void cut_mesh_from_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
   IGL_INLINE void cut_mesh_from_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
                                                    const Eigen::PlainObjectBase<DerivedF> &F,
                                                    const Eigen::PlainObjectBase<DerivedF> &F,
                                                    const Eigen::PlainObjectBase<DerivedM> &MMatch,
                                                    const Eigen::PlainObjectBase<DerivedM> &MMatch,
-                                                   const Eigen::PlainObjectBase<DerivedS> &is_singularity,
-                                                   const Eigen::PlainObjectBase<DerivedS> &singularity_index,
                                                    Eigen::PlainObjectBase<DerivedO> &seams);
                                                    Eigen::PlainObjectBase<DerivedO> &seams);
 }
 }
 #ifndef IGL_STATIC_LIBRARY
 #ifndef IGL_STATIC_LIBRARY

+ 11 - 4
include/igl/find_cross_field_singularities.cpp

@@ -65,15 +65,22 @@ IGL_INLINE void igl::find_cross_field_singularities(const Eigen::PlainObjectBase
                                                     const Eigen::PlainObjectBase<DerivedV> &PD1,
                                                     const Eigen::PlainObjectBase<DerivedV> &PD1,
                                                     const Eigen::PlainObjectBase<DerivedV> &PD2,
                                                     const Eigen::PlainObjectBase<DerivedV> &PD2,
                                                     Eigen::PlainObjectBase<DerivedO> &isSingularity,
                                                     Eigen::PlainObjectBase<DerivedO> &isSingularity,
-                                                    Eigen::PlainObjectBase<DerivedO> &singularityIndex)
+                                                    Eigen::PlainObjectBase<DerivedO> &singularityIndex,
+                                                    bool isCombed)
 {
 {
-
-  Eigen::Matrix<typename DerivedV::Scalar, Eigen::Dynamic, 3> Handle_MMatch;
-  igl::cross_field_missmatch<DerivedV, DerivedF, DerivedO>(V, F, PD1, PD2, Handle_MMatch);
+  // Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > Handle_MMatch;
+  // Eigen::PlainObjectBase<Eigen::Matrix<int,  Eigen::Dynamic, 3> > Handle_MMatch;
+  // Eigen::Matrix<int, Eigen::Dynamic, 3> Handle_MMatch;
+  Eigen::PlainObjectBase<DerivedF> Handle_MMatch;
+  // Eigen::Matrix<typename DerivedF::Scalar, Eigen::Dynamic, 3> Handle_MMatch;
+  // Eigen::Matrix<typename DerivedF::Scalar, Eigen::Dynamic, Eigen::Dynamic> Handle_MMatch;
+  igl::cross_field_missmatch<DerivedV, DerivedF>(V, F, PD1, PD2, isCombed, Handle_MMatch);
   igl::find_cross_field_singularities(V, F, Handle_MMatch, isSingularity, singularityIndex);
   igl::find_cross_field_singularities(V, F, Handle_MMatch, isSingularity, singularityIndex);
 }
 }
 
 
 #ifdef IGL_STATIC_LIBRARY
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 template void igl::find_cross_field_singularities<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
 template void igl::find_cross_field_singularities<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::find_cross_field_singularities<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&,
+Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, bool);
 #endif
 #endif

+ 4 - 3
include/igl/find_cross_field_singularities.h

@@ -13,8 +13,8 @@
 namespace igl
 namespace igl
 {
 {
   // Computes singularities of a cross field, assumed combed
   // Computes singularities of a cross field, assumed combed
-  
-  
+
+
   // Inputs:
   // Inputs:
   //   V                #V by 3 eigen Matrix of mesh vertex 3D positions
   //   V                #V by 3 eigen Matrix of mesh vertex 3D positions
   //   F                #F by 3 eigen Matrix of face (quad) indices
   //   F                #F by 3 eigen Matrix of face (quad) indices
@@ -47,7 +47,8 @@ namespace igl
                                                  const Eigen::PlainObjectBase<DerivedV> &PD1,
                                                  const Eigen::PlainObjectBase<DerivedV> &PD1,
                                                  const Eigen::PlainObjectBase<DerivedV> &PD2,
                                                  const Eigen::PlainObjectBase<DerivedV> &PD2,
                                                  Eigen::PlainObjectBase<DerivedO> &isSingularity,
                                                  Eigen::PlainObjectBase<DerivedO> &isSingularity,
-                                                 Eigen::PlainObjectBase<DerivedO> &singularityIndex);
+                                                 Eigen::PlainObjectBase<DerivedO> &singularityIndex,
+                                                 bool isCombed = false);
 }
 }
 #ifndef IGL_STATIC_LIBRARY
 #ifndef IGL_STATIC_LIBRARY
 #include "find_cross_field_singularities.cpp"
 #include "find_cross_field_singularities.cpp"

+ 1 - 0
include/igl/grad.cpp

@@ -105,4 +105,5 @@ IGL_INLINE void igl::grad(const Eigen::PlainObjectBase<DerivedV>&V,
 // Explicit template specialization
 // Explicit template specialization
 // template void igl::grad<double, int>(Eigen::Matrix<double, -1, -1, 0, -1,-1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&,Eigen::SparseMatrix<double, 0, int>&);
 // template void igl::grad<double, int>(Eigen::Matrix<double, -1, -1, 0, -1,-1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&,Eigen::SparseMatrix<double, 0, int>&);
 template void igl::grad<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::SparseMatrix<Eigen::Matrix<double, -1, 3, 0, -1, 3>::Scalar, 0, int>&);
 template void igl::grad<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::SparseMatrix<Eigen::Matrix<double, -1, 3, 0, -1, 3>::Scalar, 0, int>&);
+//template void igl::grad<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::SparseMatrix<Eigen::Matrix<double, -1, 3, 0, -1, 3>::Scalar, 0, int>&);
 #endif
 #endif

+ 2 - 0
include/igl/slice.cpp

@@ -203,4 +203,6 @@ template Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > igl::sl
 template Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > igl::slice<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int);
 template Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > igl::slice<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int);
 template void igl::slice<std::__1::complex<double> >(Eigen::SparseMatrix<std::__1::complex<double>, 0, int> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, Eigen::SparseMatrix<std::__1::complex<double>, 0, int>&);
 template void igl::slice<std::__1::complex<double> >(Eigen::SparseMatrix<std::__1::complex<double>, 0, int> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, Eigen::SparseMatrix<std::__1::complex<double>, 0, int>&);
 template void igl::slice<Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::Matrix<double, -1, 3, 0, -1, 3> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int, Eigen::Matrix<double, -1, 3, 0, -1, 3>&);
 template void igl::slice<Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::Matrix<double, -1, 3, 0, -1, 3> const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int, Eigen::Matrix<double, -1, 3, 0, -1, 3>&);
+template Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > igl::slice<Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&);
+template Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > igl::slice<Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int);
 #endif
 #endif

+ 12 - 11
include/igl/writeOFF.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@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 
+//
+// 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/.
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "writeOFF.h"
 #include "writeOFF.h"
 #include <cstdio>
 #include <cstdio>
@@ -16,26 +16,26 @@ IGL_INLINE bool igl::writeOFF(
   const Eigen::PlainObjectBase<DerivedF>& F)
   const Eigen::PlainObjectBase<DerivedF>& F)
 {
 {
   FILE *fp = fopen (fname.c_str(), "w");
   FILE *fp = fopen (fname.c_str(), "w");
-  
-  
+
+
   if (!fp)
   if (!fp)
   {
   {
       fprintf (stderr, "writeOFF(): could not open file %s", fname.c_str());
       fprintf (stderr, "writeOFF(): could not open file %s", fname.c_str());
     return false;
     return false;
   }
   }
-  
+
   fprintf (fp, "OFF\n%d %d 0\n",  (int) V.rows(), (int) F.rows());
   fprintf (fp, "OFF\n%d %d 0\n",  (int) V.rows(), (int) F.rows());
-  
+
   for (int i = 0; i < V.rows(); i++)
   for (int i = 0; i < V.rows(); i++)
   {
   {
     fprintf(
     fprintf(
       fp,
       fp,
       "%0.17g %0.17g %0.17g\n",
       "%0.17g %0.17g %0.17g\n",
-      (double)V(i,0), 
-      (double)V(i,1), 
+      (double)V(i,0),
+      (double)V(i,1),
       (double)V(i,2));
       (double)V(i,2));
   }
   }
-  
+
 //  for (int i = 0; i < F.rows(); i++)
 //  for (int i = 0; i < F.rows(); i++)
 //      fprintf (fp, "3 %d %d %d\n", F(i,0), F(i,1), F(i,2));
 //      fprintf (fp, "3 %d %d %d\n", F(i,0), F(i,1), F(i,2));
   for (int i = 0; i < (int)F.rows(); i++)
   for (int i = 0; i < (int)F.rows(); i++)
@@ -54,4 +54,5 @@ IGL_INLINE bool igl::writeOFF(
 template bool igl::writeOFF<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -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&);
 template bool igl::writeOFF<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -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&);
 template bool igl::writeOFF<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> >(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&);
 template bool igl::writeOFF<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> >(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&);
 template bool igl::writeOFF<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> >(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&);
 template bool igl::writeOFF<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> >(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&);
+template bool igl::writeOFF<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
 #endif
 #endif