mesh_boolean.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #include "mesh_boolean.h"
  9. #include <igl/cgal/assign_scalar.h>
  10. #include <igl/per_face_normals.h>
  11. #include <igl/boundary_facets.h>
  12. #include <igl/exterior_edges.h>
  13. #include <igl/cgal/peel_outer_hull_layers.h>
  14. #include <igl/cgal/remesh_self_intersections.h>
  15. #include <igl/remove_unreferenced.h>
  16. #include <igl/mod.h>
  17. #include <igl/unique_simplices.h>
  18. #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
  19. #include <iostream>
  20. //#define IGL_MESH_BOOLEAN_DEBUG
  21. template <
  22. typename DerivedVA,
  23. typename DerivedFA,
  24. typename DerivedVB,
  25. typename DerivedFB,
  26. typename DerivedVC,
  27. typename DerivedFC,
  28. typename DerivedJ>
  29. IGL_INLINE void igl::boolean::mesh_boolean(
  30. const Eigen::PlainObjectBase<DerivedVA > & VA,
  31. const Eigen::PlainObjectBase<DerivedFA > & FA,
  32. const Eigen::PlainObjectBase<DerivedVB > & VB,
  33. const Eigen::PlainObjectBase<DerivedFB > & FB,
  34. const MeshBooleanType & type,
  35. Eigen::PlainObjectBase<DerivedVC > & VC,
  36. Eigen::PlainObjectBase<DerivedFC > & FC,
  37. Eigen::PlainObjectBase<DerivedJ > & J)
  38. {
  39. const std::function<void(
  40. const Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
  41. const Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
  42. Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
  43. Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
  44. Eigen::Matrix<typename DerivedJ::Scalar, Eigen::Dynamic,1>&)>
  45. empty_fun;
  46. return mesh_boolean(VA,FA,VB,FB,type,empty_fun,VC,FC,J);
  47. }
  48. template <
  49. typename DerivedVA,
  50. typename DerivedFA,
  51. typename DerivedVB,
  52. typename DerivedFB,
  53. typename DerivedVC,
  54. typename DerivedFC>
  55. IGL_INLINE void igl::boolean::mesh_boolean(
  56. const Eigen::PlainObjectBase<DerivedVA > & VA,
  57. const Eigen::PlainObjectBase<DerivedFA > & FA,
  58. const Eigen::PlainObjectBase<DerivedVB > & VB,
  59. const Eigen::PlainObjectBase<DerivedFB > & FB,
  60. const MeshBooleanType & type,
  61. Eigen::PlainObjectBase<DerivedVC > & VC,
  62. Eigen::PlainObjectBase<DerivedFC > & FC)
  63. {
  64. Eigen::Matrix<typename DerivedFC::Index, Eigen::Dynamic,1> J;
  65. const std::function<void(
  66. const Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
  67. const Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
  68. Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3> &,
  69. Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
  70. Eigen::Matrix<typename DerivedFC::Index, Eigen::Dynamic,1>&)>
  71. empty_fun;
  72. return mesh_boolean(VA,FA,VB,FB,type,empty_fun,VC,FC,J);
  73. }
  74. template <
  75. typename DerivedVA,
  76. typename DerivedFA,
  77. typename DerivedVB,
  78. typename DerivedFB,
  79. typename DerivedVC,
  80. typename DerivedFC,
  81. typename DerivedJ>
  82. IGL_INLINE void igl::boolean::mesh_boolean(
  83. const Eigen::PlainObjectBase<DerivedVA > & VA,
  84. const Eigen::PlainObjectBase<DerivedFA > & FA,
  85. const Eigen::PlainObjectBase<DerivedVB > & VB,
  86. const Eigen::PlainObjectBase<DerivedFB > & FB,
  87. const MeshBooleanType & type,
  88. const std::function<void(
  89. const Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3>&,
  90. const Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
  91. Eigen::Matrix<typename DerivedVC::Scalar,Eigen::Dynamic,3>&,
  92. Eigen::Matrix<typename DerivedFC::Scalar, Eigen::Dynamic,3>&,
  93. Eigen::Matrix<typename DerivedJ::Scalar, Eigen::Dynamic,1>&)>
  94. & resolve_fun,
  95. Eigen::PlainObjectBase<DerivedVC > & VC,
  96. Eigen::PlainObjectBase<DerivedFC > & FC,
  97. Eigen::PlainObjectBase<DerivedJ > & J)
  98. {
  99. using namespace Eigen;
  100. using namespace std;
  101. using namespace igl;
  102. using namespace igl::cgal;
  103. MeshBooleanType eff_type = type;
  104. // Concatenate A and B into a single mesh
  105. typedef CGAL::Epeck Kernel;
  106. typedef Kernel::FT ExactScalar;
  107. typedef typename DerivedVC::Scalar Scalar;
  108. typedef typename DerivedFC::Scalar Index;
  109. typedef Matrix<Scalar,Dynamic,3> MatrixX3S;
  110. typedef Matrix<ExactScalar,Dynamic,3> MatrixX3ES;
  111. typedef Matrix<Index,Dynamic,3> MatrixX3I;
  112. typedef Matrix<Index,Dynamic,2> MatrixX2I;
  113. typedef Matrix<Index,Dynamic,1> VectorXI;
  114. typedef Matrix<typename DerivedJ::Scalar,Dynamic,1> VectorXJ;
  115. #ifdef IGL_MESH_BOOLEAN_DEBUG
  116. cout<<"mesh boolean..."<<endl;
  117. #endif
  118. MatrixX3S V(VA.rows()+VB.rows(),3);
  119. MatrixX3I F(FA.rows()+FB.rows(),3);
  120. V.block(0,0,VA.rows(),VA.cols()) = VA;
  121. V.block(VA.rows(),0,VB.rows(),VB.cols()) = VB;
  122. #ifdef IGL_MESH_BOOLEAN_DEBUG
  123. cout<<"prepare selfintersect input..."<<endl;
  124. #endif
  125. switch(type)
  126. {
  127. // Minus is implemented by flipping B and computing union
  128. case MESH_BOOLEAN_TYPE_MINUS:
  129. F.block(0,0,FA.rows(),FA.cols()) = FA.rowwise().reverse();
  130. F.block(FA.rows(),0,FB.rows(),FB.cols()) = FB.array()+VA.rows();
  131. //F.block(0,0,FA.rows(),3) = FA;
  132. //F.block(FA.rows(),0,FB.rows(),3) =
  133. // FB.rowwise().reverse().array()+VA.rows();
  134. eff_type = MESH_BOOLEAN_TYPE_INTERSECT;
  135. break;
  136. default:
  137. F.block(0,0,FA.rows(),FA.cols()) = FA;
  138. F.block(FA.rows(),0,FB.rows(),FB.cols()) = FB.array()+VA.rows();
  139. break;
  140. }
  141. // Resolve intersections (assumes A and B are solid)
  142. const auto & libigl_resolve = [](
  143. const MatrixX3S & V,
  144. const MatrixX3I & F,
  145. MatrixX3ES & CV,
  146. MatrixX3I & CF,
  147. VectorXJ & J)
  148. {
  149. MatrixX3ES SV;
  150. MatrixX3I SF;
  151. MatrixX2I SIF;
  152. VectorXI SIM,UIM;
  153. igl::cgal::RemeshSelfIntersectionsParam params;
  154. remesh_self_intersections(V,F,params,SV,SF,SIF,J,SIM);
  155. for_each(SF.data(),SF.data()+SF.size(),[&SIM](int & a){a=SIM(a);});
  156. {
  157. remove_unreferenced(SV,SF,CV,CF,UIM);
  158. }
  159. #ifdef IGL_MESH_BOOLEAN_DEBUG
  160. cout<<"#F: "<<F.rows()<<endl;
  161. cout<<"#CF: "<<CF.rows()<<endl;
  162. #endif
  163. };
  164. #ifdef IGL_MESH_BOOLEAN_DEBUG
  165. cout<<"resolve..."<<endl;
  166. #endif
  167. MatrixX3S CV;
  168. MatrixX3ES EV;
  169. MatrixX3I CF;
  170. VectorXJ CJ;
  171. if(resolve_fun)
  172. {
  173. resolve_fun(V,F,CV,CF,CJ);
  174. }else
  175. {
  176. libigl_resolve(V,F,EV,CF,CJ);
  177. CV.resize(EV.rows(), EV.cols());
  178. // Just use f'ing for loops. What if EV and CV don't use the same ordering?
  179. for(int i=0;i<EV.rows();i++)
  180. {
  181. for(int j=0;j<EV.cols();j++)
  182. {
  183. assign_scalar(EV(i,j),CV(i,j));
  184. }
  185. }
  186. }
  187. if(type == MESH_BOOLEAN_TYPE_RESOLVE)
  188. {
  189. FC = CF;
  190. VC = CV;
  191. J = CJ;
  192. return;
  193. }
  194. #ifdef IGL_MESH_BOOLEAN_DEBUG
  195. cout<<"peel..."<<endl;
  196. #endif
  197. Matrix<bool,Dynamic,1> from_A(CF.rows());
  198. // peel layers keeping track of odd and even flips
  199. VectorXi I;
  200. Matrix<bool,Dynamic,1> flip;
  201. peel_outer_hull_layers(EV,CF,I,flip);
  202. //Array<bool,Dynamic,1> even = igl::mod(I,2).array()==0;
  203. const auto even = [&](const Index & f)->bool
  204. {
  205. return (I(f)%2)==0;
  206. };
  207. #ifdef IGL_MESH_BOOLEAN_DEBUG
  208. cout<<"categorize..."<<endl;
  209. #endif
  210. const Index m = CF.rows();
  211. // Faces of output vG[i] = j means ith face of output should be jth face in F
  212. std::vector<Index> vG;
  213. // Whether faces of output should be flipped, Gflip[i] = true means ith face
  214. // of output should be F.row(vG[i]).reverse() rather than F.row(vG[i])
  215. std::vector<bool> Gflip;
  216. for(Index f = 0;f<m;f++)
  217. {
  218. switch(eff_type)
  219. {
  220. case MESH_BOOLEAN_TYPE_XOR:
  221. case MESH_BOOLEAN_TYPE_UNION:
  222. if((even(f)&&!flip(f))||(!even(f)&&flip(f)))
  223. {
  224. vG.push_back(f);
  225. Gflip.push_back(false);
  226. }else if(eff_type == MESH_BOOLEAN_TYPE_XOR)
  227. {
  228. vG.push_back(f);
  229. Gflip.push_back(true);
  230. }
  231. break;
  232. case MESH_BOOLEAN_TYPE_INTERSECT:
  233. if((!even(f) && !flip(f)) || (even(f) && flip(f)))
  234. {
  235. vG.push_back(f);
  236. Gflip.push_back(type == MESH_BOOLEAN_TYPE_MINUS);
  237. }
  238. break;
  239. default:
  240. assert(false && "Unknown type");
  241. return;
  242. }
  243. }
  244. const Index gm = vG.size();
  245. MatrixX3I G(gm,3);
  246. VectorXi GJ(gm,1);
  247. for(Index g = 0;g<gm;g++)
  248. {
  249. G.row(g) = Gflip[g] ? CF.row(vG[g]).reverse().eval() : CF.row(vG[g]);
  250. GJ(g) = CJ(vG[g]);
  251. }
  252. #ifdef IGL_MESH_BOOLEAN_DEBUG
  253. {
  254. MatrixXi O;
  255. boundary_facets(FC,O);
  256. cout<<"# boundary: "<<O.rows()<<endl;
  257. }
  258. cout<<"# exterior: "<<exterior_edges(FC).rows()<<endl;
  259. #endif
  260. #ifdef IGL_MESH_BOOLEAN_DEBUG
  261. cout<<"clean..."<<endl;
  262. #endif
  263. // Deal with duplicate faces
  264. {
  265. VectorXi IA,IC;
  266. MatrixX3I uG;
  267. unique_simplices(G,uG,IA,IC);
  268. assert(IA.rows() == uG.rows());
  269. // faces ontop of each unique face
  270. vector<vector<Index> > uG2G(uG.rows());
  271. // signed counts
  272. VectorXi counts = VectorXi::Zero(uG.rows());
  273. VectorXi ucounts = VectorXi::Zero(uG.rows());
  274. // loop over all faces
  275. for(Index g = 0;g<gm;g++)
  276. {
  277. const int ug = IC(g);
  278. assert(ug < uG2G.size());
  279. uG2G[ug].push_back(g);
  280. // is uG(g,:) just a rotated version of G(g,:) ?
  281. const bool consistent =
  282. (G(g,0) == uG(ug,0) && G(g,1) == uG(ug,1) && G(g,2) == uG(ug,2)) ||
  283. (G(g,0) == uG(ug,1) && G(g,1) == uG(ug,2) && G(g,2) == uG(ug,0)) ||
  284. (G(g,0) == uG(ug,2) && G(g,1) == uG(ug,0) && G(g,2) == uG(ug,1));
  285. counts(ug) += consistent ? 1 : -1;
  286. ucounts(ug)++;
  287. }
  288. MatrixX3I oldG = G;
  289. // Faces of output vG[i] = j means ith face of output should be jth face in
  290. // oldG
  291. vG.clear();
  292. for(size_t ug = 0;ug < uG2G.size();ug++)
  293. {
  294. // if signed occurrences is zero or ±two then keep none
  295. // else if signed occurrences is ±one then keep just one facet
  296. switch(abs(counts(ug)))
  297. {
  298. case 1:
  299. assert(uG2G[ug].size() > 0);
  300. vG.push_back(uG2G[ug][0]);
  301. #ifdef IGL_MESH_BOOLEAN_DEBUG
  302. if(abs(ucounts(ug)) != 1)
  303. {
  304. cout<<"count,ucount of "<<counts(ug)<<","<<ucounts(ug)<<endl;
  305. }
  306. #endif
  307. break;
  308. case 0:
  309. #ifdef IGL_MESH_BOOLEAN_DEBUG
  310. cout<<"Skipping "<<uG2G[ug].size()<<" facets..."<<endl;
  311. if(abs(ucounts(ug)) != 0)
  312. {
  313. cout<<"count,ucount of "<<counts(ug)<<","<<ucounts(ug)<<endl;
  314. }
  315. #endif
  316. break;
  317. default:
  318. #ifdef IGL_MESH_BOOLEAN_DEBUG
  319. cout<<"Didn't expect to be here."<<endl;
  320. #endif
  321. assert(false && "Shouldn't count be -1/0/1 ?");
  322. }
  323. }
  324. G.resize(vG.size(),3);
  325. J.resize(vG.size());
  326. for(size_t g = 0;g<vG.size();g++)
  327. {
  328. G.row(g) = oldG.row(vG[g]);
  329. J(g) = GJ(vG[g]);
  330. }
  331. }
  332. // remove unreferenced vertices
  333. VectorXi newIM;
  334. remove_unreferenced(CV,G,VC,FC,newIM);
  335. //cerr<<"warning not removing unref"<<endl;
  336. //VC = CV;
  337. //FC = G;
  338. #ifdef IGL_MESH_BOOLEAN_DEBUG
  339. {
  340. MatrixXi O;
  341. boundary_facets(FC,O);
  342. cout<<"# boundary: "<<O.rows()<<endl;
  343. }
  344. cout<<"# exterior: "<<exterior_edges(FC).rows()<<endl;
  345. #endif
  346. }
  347. #ifdef IGL_STATIC_LIBRARY
  348. // This is a hack to discuss. I'm not sure why this _doesn't_ create
  349. // duplicate symbols.
  350. #include <igl/remove_unreferenced.cpp>
  351. template void igl::remove_unreferenced<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, 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> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  352. #include <igl/cgal/peel_outer_hull_layers.cpp>
  353. template unsigned long
  354. igl::cgal::peel_outer_hull_layers<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -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<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
  355. #include <igl/cgal/outer_hull.cpp>
  356. template void igl::cgal::outer_hull<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, Eigen::Matrix<bool, -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<int, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<bool, -1, 1, 0, -1, 1> >&);
  357. #include <igl/slice.cpp>
  358. template void igl::slice<Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> > const&, Eigen::Matrix<int, -1, 1, 0, -1, 1> const&, int, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&);
  359. #include <igl/barycenter.cpp>
  360. template void igl::barycenter<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::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> >&);
  361. #include <igl/mod.cpp>
  362. template Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > igl::mod<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, int);
  363. #include <igl/outer_element.cpp>
  364. template void igl::outer_edge<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, long, Eigen::Matrix<long, -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<long, -1, 1, 0, -1, 1> > const&, long&, long&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&);
  365. // Explicit template specialization
  366. template void igl::boolean::mesh_boolean<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::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> > const&, igl::boolean::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
  367. template void igl::boolean::mesh_boolean<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::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<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::boolean::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  368. template void igl::boolean::mesh_boolean<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<long, -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, -1, 0, -1, -1> > 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> > const&, igl::boolean::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&);
  369. #endif