Browse Source

Merge branch 'main' of github.com:libigl/libigl

Alec Jacobson 9 months ago
parent
commit
0c9c8cd643

+ 1 - 1
cmake/recipes/external/boost.cmake

@@ -12,7 +12,7 @@ include(FetchContent)
 # Define the Boost library to fetch
 # Define the Boost library to fetch
 FetchContent_Declare(
 FetchContent_Declare(
     Boost
     Boost
-    URL https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.gz
+    URL https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz
     URL_HASH MD5=ac857d73bb754b718a039830b07b9624
     URL_HASH MD5=ac857d73bb754b718a039830b07b9624
 )
 )
 # Fetch Boost
 # Fetch Boost

+ 2 - 1
include/igl/heat_geodesics.cpp

@@ -12,6 +12,7 @@
 #include "cotmatrix.h"
 #include "cotmatrix.h"
 #include "intrinsic_delaunay_cotmatrix.h"
 #include "intrinsic_delaunay_cotmatrix.h"
 #include "massmatrix.h"
 #include "massmatrix.h"
+#include "PlainVector.h"
 #include "massmatrix_intrinsic.h"
 #include "massmatrix_intrinsic.h"
 #include "grad_intrinsic.h"
 #include "grad_intrinsic.h"
 #include "boundary_facets.h"
 #include "boundary_facets.h"
@@ -83,7 +84,7 @@ IGL_INLINE bool igl::heat_geodesics_precompute(
         return false;
         return false;
       }
       }
     }
     }
-    const DerivedV M_diag_tr = M.diagonal().transpose();
+    const Eigen::Matrix<Scalar,1,Eigen::Dynamic> M_diag_tr = M.diagonal().transpose();
     const Eigen::SparseMatrix<Scalar> Aeq = M_diag_tr.sparseView();
     const Eigen::SparseMatrix<Scalar> Aeq = M_diag_tr.sparseView();
     L *= -0.5;
     L *= -0.5;
     if(!igl::min_quad_with_fixed_precompute(
     if(!igl::min_quad_with_fixed_precompute(

+ 2 - 2
include/igl/opengl/glfw/Viewer.cpp

@@ -212,8 +212,8 @@ namespace glfw
     glfwGetFramebufferSize(window, &width, &height);
     glfwGetFramebufferSize(window, &width, &height);
     int width_window, height_window;
     int width_window, height_window;
     glfwGetWindowSize(window, &width_window, &height_window);
     glfwGetWindowSize(window, &width_window, &height_window);
-    highdpiw = windowWidth/width_window;
-    highdpih = windowHeight/height_window;
+    highdpiw = (windowWidth <= 0 || width_window <= 0) ? 1 : ((double)windowWidth/width_window);
+    highdpih = (windowHeight <= 0 || height_window <= 0) ? 1 : ((double)windowHeight/height_window);
     glfw_window_size(window,width_window,height_window);
     glfw_window_size(window,width_window,height_window);
     // Initialize IGL viewer
     // Initialize IGL viewer
     init();
     init();

+ 4 - 1
include/igl/voxel_grid.h

@@ -31,7 +31,10 @@ namespace igl
     Eigen::PlainObjectBase<DerivedGV> & GV,
     Eigen::PlainObjectBase<DerivedGV> & GV,
     Eigen::PlainObjectBase<Derivedside> & side);
     Eigen::PlainObjectBase<Derivedside> & side);
   /// \overload
   /// \overload
-  /// @param[in]  offset  offset to add to each cell center
+  /// Constructs the voxel grid to fit around a given set of points.
+  ///
+  /// @param[in] V  points that must lie within the grid
+  /// @param[in] offset  distance to pad each side of V's bounding box when determining the extents of the voxel grid.
   template <
   template <
     typename DerivedV,
     typename DerivedV,
     typename DerivedGV,
     typename DerivedGV,