Эх сурвалжийг харах

fixes for static build

Former-commit-id: 5e7a2ae3dadc7a23d5496fd1111063c487aa8201
Daniele Panozzo 9 жил өмнө
parent
commit
fcea5c0757

+ 5 - 1
include/igl/cut_mesh.cpp

@@ -305,8 +305,10 @@ IGL_INLINE void igl::cut_mesh(
   std::vector<std::vector<int> > VF, VFi;
   igl::vertex_triangle_adjacency(V,F,VF,VFi);
 
+  Eigen::MatrixXd Vt = V;
+  Eigen::MatrixXi Ft = F;
   Eigen::MatrixXi TT, TTi;
-  igl::triangle_triangle_adjacency(V,F,TT,TTi);
+  igl::triangle_triangle_adjacency(Vt,Ft,TT,TTi);
 
   std::vector<bool> V_border = igl::is_border_vertex(V,F);
 
@@ -319,4 +321,6 @@ IGL_INLINE void igl::cut_mesh(
 // Explicit template specialization
 template void igl::cut_mesh<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, int, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<bool, std::allocator<bool> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 template void igl::cut_mesh<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(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<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
+template void igl::cut_mesh<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<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&);
+template void igl::cut_mesh<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(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<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 #endif

+ 7 - 3
tutorial/CMakeLists.txt

@@ -80,9 +80,13 @@ list(APPEND SHARED_LIBRARIES "nanogui")
 # NOTE: this cmakefile works only with the
 # comiso available here: https://github.com/libigl/CoMISo
 IF(LIBCOMISO_FOUND)
-  include_directories("../../CoMISo/ext/gmm-4.2/include")
-  include_directories("../../")
-  add_subdirectory("../../CoMISo/" "CoMISo")
+
+  list(GET LIBCOMISO_INCLUDE_DIRS 0 COMISO_ROOT)
+  # message( FATAL_ERROR "${COMISO_ROOT}" )
+
+  include_directories("${COMISO_ROOT}/CoMISo/ext/gmm-4.2/include")
+  include_directories("${COMISO_ROOT}/")
+  add_subdirectory("${COMISO_ROOT}/CoMISo/" "CoMISo")
 
   if(APPLE)
     find_library(accelerate_library Accelerate)

+ 1 - 1
tutorial/cmake/FindLIBCOMISOH.cmake

@@ -43,7 +43,7 @@ if(LIBCOMISO_INCLUDE_DIR)
       ${LIBCOMISO_INCLUDE_DIR}/CoMISo/Config
       ${LIBCOMISO_INCLUDE_DIR}/CoMISo/Utils
       ${LIBCOMISO_INCLUDE_DIR}/CoMISo/QtWidgets
-      ${LIBCOMISO_INCLUDE_DIR}/CoMISo/gmm/include
+      ${LIBCOMISO_INCLUDE_DIR}/CoMISo/ext/gmm-4.2/include
       )
 
    #message("${LIBCOMISO_INCLUDE_DIRS}")