Răsfoiți Sursa

small changes for python to compile (#2241)

Alec Jacobson 2 ani în urmă
părinte
comite
418dd43cfe

+ 2 - 2
include/igl/bijective_composite_harmonic_mapping.cpp

@@ -52,7 +52,7 @@ IGL_INLINE bool igl::bijective_composite_harmonic_mapping(
   int tries = 0;
   int nsteps = min_steps;
   Eigen::Matrix<typename Derivedbc::Scalar, Eigen::Dynamic, Eigen::Dynamic> bc0;
-  slice(V,b,1,bc0);
+  slice(V,b.col(0),1,bc0);
 
   // It's difficult to check for flips "robustly" in the sense that the input
   // mesh might not have positive/consistent sign to begin with.
@@ -83,7 +83,7 @@ IGL_INLINE bool igl::bijective_composite_harmonic_mapping(
         //mw.save(bct,"bct");
         //mw.write("numerical.mat");
         harmonic(Eigen::Matrix<typename DerivedU::Scalar, Eigen::Dynamic, Eigen::Dynamic>(U), F, b, bct, 1, U);
-        igl::slice(U,b,1,bct);
+        igl::slice(U,b.col(0),1,bct);
         nans = (U.array() != U.array()).count();
         if(test_for_flips)
         {

+ 1 - 1
include/igl/harmonic.cpp

@@ -58,7 +58,7 @@ IGL_INLINE bool igl::harmonic(
   SparseMatrix<Scalar> A;
   adjacency_matrix(F,A);
   // sum each row
-  Eigen::VectorXd Asum;
+  Eigen::Matrix<Scalar,Eigen::Dynamic,1> Asum;
   igl::sum(A,1,Asum);
   // Eigen 3.4 still struggles to do arithmetic with sparse and diagonal matrices
   Eigen::SparseMatrix<Scalar> L = A - Eigen::SparseMatrix<Scalar>(Asum.asDiagonal());

+ 0 - 2
include/igl/random_points_on_mesh_intrinsic.h

@@ -21,8 +21,6 @@ namespace igl
   /// @param[in] dblA  #F list of double areas of triangles
   /// @param[out] B  n by 3 list of barycentric coordinates, ith row are coordinates of
   ///     ith sampled point in face FI(i)
-  /// @param[in] urbg An instance of UnformRandomBitGenerator (e.g.,
-  ///  `std::minstd_rand(0)`)
   /// @param[out] FI  n list of indices into F 
   /// @param[in,out] urbg An instance of UnformRandomBitGenerator.
   template <