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

missing templates and rm _batch

Former-commit-id: 89a8257d152165218fc514e4e35a5aa56dfeca10
Alec Jacobson 9 жил өмнө
parent
commit
2753f66b41

+ 4 - 0
include/igl/boolean/mesh_boolean.cpp

@@ -161,6 +161,10 @@ IGL_INLINE void igl::boolean::mesh_boolean(
     {
       remove_unreferenced(SV,SF,CV,CF,UIM);
     }
+#ifdef IGL_MESH_BOOLEAN_DEBUG
+    cout<<"#F:  "<<F.rows()<<endl;
+    cout<<"#CF: "<<CF.rows()<<endl;
+#endif
   };
 
 #ifdef IGL_MESH_BOOLEAN_DEBUG

+ 11 - 4
include/igl/cgal/is_inside.cpp

@@ -277,7 +277,7 @@ IGL_INLINE bool igl::cgal::is_inside(
             (V1(f[0],1) + V1(f[1],1) + V1(f[2],1))/3.0,
             (V1(f[0],2) + V1(f[1],2) + V1(f[2],2))/3.0);
     Eigen::VectorXi inside;
-    igl::cgal::is_inside_batch(V2, F2, I2, query, inside);
+    igl::cgal::is_inside(V2, F2, I2, query, inside);
     assert(inside.size() == 1);
     return inside[0];
 }
@@ -296,7 +296,7 @@ IGL_INLINE bool igl::cgal::is_inside(
 
 template<typename DerivedV, typename DerivedF, typename DerivedI,
     typename DerivedP, typename DerivedB>
-IGL_INLINE void igl::cgal::is_inside_batch(
+IGL_INLINE void igl::cgal::is_inside(
         const Eigen::PlainObjectBase<DerivedV>& V,
         const Eigen::PlainObjectBase<DerivedF>& F,
         const Eigen::PlainObjectBase<DerivedI>& I,
@@ -356,12 +356,19 @@ IGL_INLINE void igl::cgal::is_inside_batch(
 
 template<typename DerivedV, typename DerivedF, typename DerivedP,
     typename DerivedB>
-IGL_INLINE void igl::cgal::is_inside_batch(
+IGL_INLINE void igl::cgal::is_inside(
         const Eigen::PlainObjectBase<DerivedV>& V,
         const Eigen::PlainObjectBase<DerivedF>& F,
         const Eigen::PlainObjectBase<DerivedP>& P,
         Eigen::PlainObjectBase<DerivedB>& inside) {
     Eigen::VectorXi I(F.rows());
     I.setLinSpaced(F.rows(), 0, F.rows()-1);
-    igl::cgal::is_inside_batch(V, F, I, P, inside);
+    igl::cgal::is_inside(V, F, I, P, inside);
 }
+
+#ifdef IGL_STATIC_LIBRARY
+// Explicit template specialization
+template void igl::cgal::is_inside<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -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<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::cgal::is_inside<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::cgal::is_inside<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -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<int, -1, 1, 0, -1, 1> >&);
+#endif

+ 2 - 2
include/igl/cgal/is_inside.h

@@ -59,7 +59,7 @@ namespace igl {
         //           query point is inside of the mesh.
         template<typename DerivedV, typename DerivedF, typename DerivedI,
             typename DerivedP, typename DerivedB>
-            IGL_INLINE void is_inside_batch(
+            IGL_INLINE void is_inside(
                     const Eigen::PlainObjectBase<DerivedV>& V,
                     const Eigen::PlainObjectBase<DerivedF>& F,
                     const Eigen::PlainObjectBase<DerivedI>& I,
@@ -68,7 +68,7 @@ namespace igl {
 
         template<typename DerivedV, typename DerivedF, typename DerivedP,
             typename DerivedB>
-            IGL_INLINE void is_inside_batch(
+            IGL_INLINE void is_inside(
                     const Eigen::PlainObjectBase<DerivedV>& V,
                     const Eigen::PlainObjectBase<DerivedF>& F,
                     const Eigen::PlainObjectBase<DerivedP>& P,

+ 1 - 1
include/igl/cgal/outer_hull.cpp

@@ -401,7 +401,7 @@ IGL_INLINE void igl::cgal::outer_hull(
         query_points(i,2) = (V(f(0,0), 2) + V(f(0,1), 2) + V(f(0,2), 2))/3.0;
     }
     Eigen::VectorXi inside;
-    igl::cgal::is_inside_batch(V, vG[id], query_points, inside);
+    igl::cgal::is_inside(V, vG[id], query_points, inside);
     assert(inside.size() == num_unresolved_components);
     for (size_t i=0; i<num_unresolved_components; i++) {
         if (inside[i]) {