ソースを参照

Merge branch 'dev' of github.com:libigl/libigl into dev

Former-commit-id: 1e4efe160642c391167c073ae40eefe2fd8e9c44
Jérémie Dumas 6 年 前
コミット
8847026227

+ 1 - 1
include/igl/cotmatrix.h

@@ -32,7 +32,7 @@ namespace igl
   //   Scalar  scalar type for eigen sparse matrix (e.g. double)
   // Inputs:
   //   V  #V by dim list of mesh vertex positions
-  //   F  #F by simplex_size list of mesh faces (must be triangles)
+  //   F  #F by simplex_size list of mesh elements (triangles or tetrahedra)
   // Outputs: 
   //   L  #V by #V cotangent matrix, each row i corresponding to V(i,:)
   //

+ 1 - 1
include/igl/exact_geodesic.cpp.REMOVED.git-id

@@ -1 +1 @@
-a0c5a93d2bc144890fbfa8d5e413d4dddc4a2827
+d962df24e92081e5b1fa2cd25f3123a7b0e03235

+ 1 - 1
include/igl/massmatrix.h

@@ -35,7 +35,7 @@ namespace igl
   //   Scalar  scalar type for eigen sparse matrix (e.g. double)
   // Inputs:
   //   V  #V by dim list of mesh vertex positions
-  //   F  #F by simplex_size list of mesh faces (must be triangles)
+  //   F  #F by simplex_size list of mesh elements (triangles or tetrahedra)
   //   type  one of the following ints:
   //     MASSMATRIX_TYPE_BARYCENTRIC  barycentric
   //     MASSMATRIX_TYPE_VORONOI voronoi-hybrid {default}

+ 6 - 2
include/igl/qslim.h

@@ -18,12 +18,16 @@ namespace igl
   // mesh can have open boundaries but should be edge-manifold.
   //
   // Inputs:
-  //   V  #V by dim list of vertex positions. Assumes that vertices w
+  //   V  #V by dim list of vertex positions. Assumes that vertices with
+  //     infinite coordinates are "points at infinity" being used to close up
+  //     boundary edges with faces. This allows special subspace quadrice for
+  //     boundary edges: There should never be more than one "point at
+  //     infinity" in a single triangle.
   //   F  #F by 3 list of triangle indices into V
   //   max_m  desired number of output faces
   // Outputs:
   //   U  #U by dim list of output vertex posistions (can be same ref as V)
-  //   G  #G by 3 list of output face indices into U (can be same ref as G)
+  //   G  #G by 3 list of output face indices into U (can be same ref as F)
   //   J  #G list of indices into F of birth face
   //   I  #U list of indices into V of birth vertices
   IGL_INLINE bool qslim(

+ 6 - 0
include/igl/read_triangle_mesh.cpp

@@ -85,6 +85,12 @@ IGL_INLINE bool igl::read_triangle_mesh(
   // Convert extension to lower case
   transform(ext.begin(), ext.end(), ext.begin(), ::tolower);
   FILE * fp = fopen(filename.c_str(),"rb");
+  if(NULL==fp)
+  {
+    fprintf(stderr,"IOError: %s could not be opened...\n",
+            filename.c_str());
+    return false;
+  }
   return read_triangle_mesh(ext,fp,V,F);
 }
 

+ 2 - 2
include/igl/redux.h

@@ -34,7 +34,6 @@ namespace igl
 
 // Implementation
 
-#include "redux.h"
 #include "for_each.h"
 
 template <typename AType, typename Func, typename DerivedB>
@@ -44,13 +43,14 @@ inline void igl::redux(
   const Func & func,
   Eigen::PlainObjectBase<DerivedB> & B)
 {
+  typedef typename Eigen::SparseMatrix<AType>::StorageIndex Index;
   assert((dim == 1 || dim == 2) && "dim must be 2 or 1");
   // Get size of input
   int m = A.rows();
   int n = A.cols();
   // resize output
   B = DerivedB::Zero(dim==1?n:m);
-  const auto func_wrap = [&func,&B,&dim](const int i, const int j, const int v)
+  const auto func_wrap = [&func,&B,&dim](const Index i, const Index j, const AType v)
   {
     if(dim == 1)
     {

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

@@ -240,7 +240,6 @@ int main(int argc, char *argv[])
   double iter = 0;
   double stiffness = 5.0;
   bool direct_round = 0;
-  std::string filename = "/Users/daniele/x.dat";
 
   // Compute face barycenters
   igl::barycenter(V, F, B);