mesh_boolean.cpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <alecjacobson@gmail.com>
  4. // Qingnan Zhou <qnzhou@gmail.com>
  5. //
  6. // This Source Code Form is subject to the terms of the Mozilla Public License
  7. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  8. // obtain one at http://mozilla.org/MPL/2.0/.
  9. //
  10. #include "mesh_boolean.h"
  11. #include "BinaryWindingNumberOperations.h"
  12. #include "assign_scalar.h"
  13. #include "string_to_mesh_boolean_type.h"
  14. #include "propagate_winding_numbers.h"
  15. #include "remesh_self_intersections.h"
  16. #include "relabel_small_immersed_cells.h"
  17. #include "extract_cells.h"
  18. #include "../../cumsum.h"
  19. #include "../../extract_manifold_patches.h"
  20. #include "../../get_seconds.h"
  21. #include "../../remove_unreferenced.h"
  22. #include "../../resolve_duplicated_faces.h"
  23. #include "../../slice.h"
  24. #include "../../unique_edge_map.h"
  25. #include "../../unique_simplices.h"
  26. #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
  27. #include <algorithm>
  28. //#define MESH_BOOLEAN_TIMING
  29. //#define DOUBLE_CHECK_EXACT_OUTPUT
  30. //#define SMALL_CELL_REMOVAL
  31. template <
  32. typename DerivedVA,
  33. typename DerivedFA,
  34. typename DerivedVB,
  35. typename DerivedFB,
  36. typename DerivedVC,
  37. typename DerivedFC,
  38. typename DerivedJ>
  39. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  40. const Eigen::PlainObjectBase<DerivedVA > & VA,
  41. const Eigen::PlainObjectBase<DerivedFA > & FA,
  42. const Eigen::PlainObjectBase<DerivedVB > & VB,
  43. const Eigen::PlainObjectBase<DerivedFB > & FB,
  44. const MeshBooleanType & type,
  45. Eigen::PlainObjectBase<DerivedVC > & VC,
  46. Eigen::PlainObjectBase<DerivedFC > & FC,
  47. Eigen::PlainObjectBase<DerivedJ > & J)
  48. {
  49. switch (type)
  50. {
  51. case MESH_BOOLEAN_TYPE_UNION:
  52. return igl::copyleft::cgal::mesh_boolean(
  53. VA, FA, VB, FB, igl::copyleft::cgal::BinaryUnion(),
  54. igl::copyleft::cgal::KeepInside(), VC, FC, J);
  55. case MESH_BOOLEAN_TYPE_INTERSECT:
  56. return igl::copyleft::cgal::mesh_boolean(
  57. VA, FA, VB, FB, igl::copyleft::cgal::BinaryIntersect(),
  58. igl::copyleft::cgal::KeepInside(), VC, FC, J);
  59. case MESH_BOOLEAN_TYPE_MINUS:
  60. return igl::copyleft::cgal::mesh_boolean(
  61. VA, FA, VB, FB, igl::copyleft::cgal::BinaryMinus(),
  62. igl::copyleft::cgal::KeepInside(), VC, FC, J);
  63. case MESH_BOOLEAN_TYPE_XOR:
  64. return igl::copyleft::cgal::mesh_boolean(
  65. VA, FA, VB, FB, igl::copyleft::cgal::BinaryXor(),
  66. igl::copyleft::cgal::KeepInside(), VC, FC, J);
  67. case MESH_BOOLEAN_TYPE_RESOLVE:
  68. //op = binary_resolve();
  69. return igl::copyleft::cgal::mesh_boolean(
  70. VA, FA, VB, FB, igl::copyleft::cgal::BinaryResolve(),
  71. igl::copyleft::cgal::KeepAll(), VC, FC, J);
  72. default:
  73. assert(false && "Unsupported boolean type.");
  74. return false;
  75. }
  76. }
  77. template <
  78. typename DerivedVA,
  79. typename DerivedFA,
  80. typename DerivedVB,
  81. typename DerivedFB,
  82. typename DerivedVC,
  83. typename DerivedFC,
  84. typename DerivedJ>
  85. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  86. const Eigen::PlainObjectBase<DerivedVA > & VA,
  87. const Eigen::PlainObjectBase<DerivedFA > & FA,
  88. const Eigen::PlainObjectBase<DerivedVB > & VB,
  89. const Eigen::PlainObjectBase<DerivedFB > & FB,
  90. const std::string & type_str,
  91. Eigen::PlainObjectBase<DerivedVC > & VC,
  92. Eigen::PlainObjectBase<DerivedFC > & FC,
  93. Eigen::PlainObjectBase<DerivedJ > & J)
  94. {
  95. return mesh_boolean(
  96. VA,FA,VB,FB,string_to_mesh_boolean_type(type_str),VC,FC,J);
  97. }
  98. template <
  99. typename DerivedVA,
  100. typename DerivedFA,
  101. typename DerivedVB,
  102. typename DerivedFB,
  103. typename DerivedVC,
  104. typename DerivedFC,
  105. typename DerivedJ>
  106. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  107. const Eigen::PlainObjectBase<DerivedVA> & VA,
  108. const Eigen::PlainObjectBase<DerivedFA> & FA,
  109. const Eigen::PlainObjectBase<DerivedVB> & VB,
  110. const Eigen::PlainObjectBase<DerivedFB> & FB,
  111. const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
  112. const std::function<int(const int, const int)> & keep,
  113. Eigen::PlainObjectBase<DerivedVC > & VC,
  114. Eigen::PlainObjectBase<DerivedFC > & FC,
  115. Eigen::PlainObjectBase<DerivedJ > & J)
  116. {
  117. // Generate combined mesh (VA,FA,VB,FB) -> (V,F)
  118. Eigen::Matrix<size_t,2,1> sizes(FA.rows(),FB.rows());
  119. DerivedVA VV(VA.rows() + VB.rows(), 3);
  120. DerivedFC FF(FA.rows() + FB.rows(), 3);
  121. // Can't use comma initializer
  122. for(int a = 0;a<VA.rows();a++)
  123. {
  124. for(int d = 0;d<3;d++) VV(a,d) = VA(a,d);
  125. }
  126. for(int b = 0;b<VB.rows();b++)
  127. {
  128. for(int d = 0;d<3;d++) VV(VA.rows()+b,d) = VB(b,d);
  129. }
  130. FF << FA, FB.array() + VA.rows();
  131. return mesh_boolean(VV,FF,sizes,wind_num_op,keep,VC,FC,J);
  132. }
  133. template <
  134. typename DerivedV,
  135. typename DerivedF,
  136. typename DerivedVC,
  137. typename DerivedFC,
  138. typename DerivedJ>
  139. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  140. const std::vector<DerivedV > & Vlist,
  141. const std::vector<DerivedF > & Flist,
  142. const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
  143. const std::function<int(const int, const int)> & keep,
  144. Eigen::PlainObjectBase<DerivedVC > & VC,
  145. Eigen::PlainObjectBase<DerivedFC > & FC,
  146. Eigen::PlainObjectBase<DerivedJ > & J)
  147. {
  148. assert(Flist.size() == Vlist.size() && "#Vlist and #Flist should match");
  149. const size_t num_inputs = Vlist.size();
  150. // Gather sizes
  151. Eigen::Matrix<size_t,Eigen::Dynamic,1> sizes(num_inputs);
  152. int numf = 0;
  153. int numv = 0;
  154. for(int i = 0;i<num_inputs;i++)
  155. {
  156. sizes(i) = Flist[i].rows();
  157. numf += Flist[i].rows();
  158. numv += Vlist[i].rows();
  159. }
  160. // Combined mesh
  161. DerivedV VV(numv,3);
  162. DerivedF FF(numf,3);
  163. {
  164. int fk = 0;
  165. int vk = 0;
  166. for(int i = 0;i<num_inputs;i++)
  167. {
  168. FF.block(fk,0,Flist[i].rows(),3) = Flist[i].array() + vk;
  169. fk += Flist[i].rows();
  170. VV.block(vk,0,Vlist[i].rows(),3) = Vlist[i];
  171. vk += Vlist[i].rows();
  172. }
  173. }
  174. return mesh_boolean(VV,FF,sizes,wind_num_op,keep,VC,FC,J);
  175. }
  176. template <
  177. typename DerivedVV,
  178. typename DerivedFF,
  179. typename Derivedsizes,
  180. typename DerivedVC,
  181. typename DerivedFC,
  182. typename DerivedJ>
  183. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  184. const Eigen::PlainObjectBase<DerivedVV > & VV,
  185. const Eigen::PlainObjectBase<DerivedFF > & FF,
  186. const Eigen::PlainObjectBase<Derivedsizes> & sizes,
  187. const std::function<int(const Eigen::Matrix<int,1,Eigen::Dynamic>) >& wind_num_op,
  188. const std::function<int(const int, const int)> & keep,
  189. Eigen::PlainObjectBase<DerivedVC > & VC,
  190. Eigen::PlainObjectBase<DerivedFC > & FC,
  191. Eigen::PlainObjectBase<DerivedJ > & J)
  192. {
  193. #ifdef MESH_BOOLEAN_TIMING
  194. const auto & tictoc = []() -> double
  195. {
  196. static double t_start = igl::get_seconds();
  197. double diff = igl::get_seconds()-t_start;
  198. t_start += diff;
  199. return diff;
  200. };
  201. const auto log_time = [&](const std::string& label) -> void {
  202. std::cout << "mesh_boolean." << label << ": "
  203. << tictoc() << std::endl;
  204. };
  205. tictoc();
  206. #endif
  207. typedef typename DerivedVC::Scalar Scalar;
  208. typedef CGAL::Epeck Kernel;
  209. typedef Kernel::FT ExactScalar;
  210. typedef Eigen::Matrix<Scalar,Eigen::Dynamic,3> MatrixX3S;
  211. typedef Eigen::Matrix<typename DerivedJ::Scalar,Eigen::Dynamic,1> VectorXJ;
  212. typedef Eigen::Matrix<
  213. ExactScalar,
  214. Eigen::Dynamic,
  215. Eigen::Dynamic,
  216. DerivedVC::IsRowMajor> MatrixXES;
  217. MatrixXES V;
  218. DerivedFC F;
  219. VectorXJ CJ;
  220. {
  221. Eigen::VectorXi I;
  222. igl::copyleft::cgal::RemeshSelfIntersectionsParam params;
  223. params.stitch_all = true;
  224. MatrixXES Vr;
  225. DerivedFC Fr;
  226. Eigen::MatrixXi IF;
  227. igl::copyleft::cgal::remesh_self_intersections(
  228. VV, FF, params, Vr, Fr, IF, CJ, I);
  229. assert(I.size() == Vr.rows());
  230. // Merge coinciding vertices into non-manifold vertices.
  231. std::for_each(Fr.data(), Fr.data()+Fr.size(),
  232. [&I](typename DerivedFC::Scalar& a) { a=I[a]; });
  233. // Remove unreferenced vertices.
  234. Eigen::VectorXi UIM;
  235. igl::remove_unreferenced(Vr, Fr, V, F, UIM);
  236. }
  237. #ifdef MESH_BOOLEAN_TIMING
  238. log_time("resolve_self_intersection");
  239. #endif
  240. // Compute edges of (F) --> (E,uE,EMAP,uE2E)
  241. Eigen::MatrixXi E, uE;
  242. Eigen::VectorXi EMAP;
  243. std::vector<std::vector<size_t> > uE2E;
  244. igl::unique_edge_map(F, E, uE, EMAP, uE2E);
  245. // Compute patches (F,EMAP,uE2E) --> (P)
  246. Eigen::VectorXi P;
  247. const size_t num_patches = igl::extract_manifold_patches(F, EMAP, uE2E, P);
  248. #ifdef MESH_BOOLEAN_TIMING
  249. log_time("patch_extraction");
  250. #endif
  251. // Compute cells (V,F,P,E,uE,EMAP) -> (per_patch_cells)
  252. Eigen::MatrixXi per_patch_cells;
  253. const size_t num_cells =
  254. igl::copyleft::cgal::extract_cells(
  255. V, F, P, E, uE, uE2E, EMAP, per_patch_cells);
  256. #ifdef MESH_BOOLEAN_TIMING
  257. log_time("cell_extraction");
  258. #endif
  259. // Compute winding numbers on each side of each facet.
  260. const size_t num_faces = F.rows();
  261. // W(f,:) --> [w1out,w1in,w2out,w2in, ... wnout,wnint] winding numbers above
  262. // and below each face w.r.t. each input mesh, so that W(f,2*i) is the
  263. // winding number above face f w.r.t. input i, and W(f,2*i+1) is the winding
  264. // number below face f w.r.t. input i.
  265. Eigen::MatrixXi W;
  266. // labels(f) = i means that face f comes from mesh i
  267. Eigen::VectorXi labels(num_faces);
  268. // cumulative sizes
  269. Derivedsizes cumsizes;
  270. igl::cumsum(sizes,1,cumsizes);
  271. const size_t num_inputs = sizes.size();
  272. std::transform(
  273. CJ.data(),
  274. CJ.data()+CJ.size(),
  275. labels.data(),
  276. // Determine which input mesh birth face i comes from
  277. [&num_inputs,&cumsizes](int i)->int
  278. {
  279. for(int k = 0;k<num_inputs;k++)
  280. {
  281. if(i<cumsizes(k)) return k;
  282. }
  283. assert(false && "Birth parent index out of range");
  284. return -1;
  285. });
  286. bool valid = true;
  287. if (num_faces > 0)
  288. {
  289. valid = valid &
  290. igl::copyleft::cgal::propagate_winding_numbers(
  291. V, F, uE, uE2E, num_patches, P, num_cells, per_patch_cells, labels, W);
  292. } else
  293. {
  294. W.resize(0, 2*num_inputs);
  295. }
  296. assert((size_t)W.rows() == num_faces);
  297. // If W doesn't have enough columns, pad with zeros
  298. if (W.cols() <= 2*num_inputs)
  299. {
  300. const int old_ncols = W.cols();
  301. W.conservativeResize(num_faces,2*num_inputs);
  302. W.rightCols(2*num_inputs-old_ncols).setConstant(0);
  303. }
  304. assert((size_t)W.cols() == 2*num_inputs);
  305. #ifdef MESH_BOOLEAN_TIMING
  306. log_time("propagate_input_winding_number");
  307. #endif
  308. // Compute resulting winding number.
  309. Eigen::MatrixXi Wr(num_faces, 2);
  310. for (size_t i=0; i<num_faces; i++)
  311. {
  312. // Winding number vectors above and below
  313. Eigen::RowVectorXi w_out(1,num_inputs), w_in(1,num_inputs);
  314. for(size_t k =0;k<num_inputs;k++)
  315. {
  316. w_out(k) = W(i,2*k+0);
  317. w_in(k) = W(i,2*k+1);
  318. }
  319. Wr(i,0) = wind_num_op(w_out);
  320. Wr(i,1) = wind_num_op(w_in);
  321. }
  322. #ifdef MESH_BOOLEAN_TIMING
  323. log_time("compute_output_winding_number");
  324. #endif
  325. #ifdef SMALL_CELL_REMOVAL
  326. igl::copyleft::cgal::relabel_small_immersed_cells(
  327. V, F, num_patches, P, num_cells, per_patch_cells, 1e-3, Wr);
  328. #endif
  329. // Extract boundary separating inside from outside.
  330. auto index_to_signed_index = [&](size_t i, bool ori) -> int
  331. {
  332. return (i+1)*(ori?1:-1);
  333. };
  334. //auto signed_index_to_index = [&](int i) -> size_t {
  335. // return abs(i) - 1;
  336. //};
  337. std::vector<int> selected;
  338. for(size_t i=0; i<num_faces; i++)
  339. {
  340. auto should_keep = keep(Wr(i,0), Wr(i,1));
  341. if (should_keep > 0)
  342. {
  343. selected.push_back(index_to_signed_index(i, true));
  344. } else if (should_keep < 0)
  345. {
  346. selected.push_back(index_to_signed_index(i, false));
  347. }
  348. }
  349. const size_t num_selected = selected.size();
  350. DerivedFC kept_faces(num_selected, 3);
  351. DerivedJ kept_face_indices(num_selected, 1);
  352. for (size_t i=0; i<num_selected; i++)
  353. {
  354. size_t idx = abs(selected[i]) - 1;
  355. if (selected[i] > 0)
  356. {
  357. kept_faces.row(i) = F.row(idx);
  358. } else
  359. {
  360. kept_faces.row(i) = F.row(idx).reverse();
  361. }
  362. kept_face_indices(i, 0) = CJ[idx];
  363. }
  364. #ifdef MESH_BOOLEAN_TIMING
  365. log_time("extract_output");
  366. #endif
  367. // Finally, remove duplicated faces and unreferenced vertices.
  368. {
  369. DerivedFC G;
  370. DerivedJ JJ;
  371. igl::resolve_duplicated_faces(kept_faces, G, JJ);
  372. igl::slice(kept_face_indices, JJ, 1, J);
  373. #ifdef DOUBLE_CHECK_EXACT_OUTPUT
  374. {
  375. // Sanity check on exact output.
  376. igl::copyleft::cgal::RemeshSelfIntersectionsParam params;
  377. params.detect_only = true;
  378. params.first_only = true;
  379. MatrixXES dummy_VV;
  380. DerivedFC dummy_FF, dummy_IF;
  381. Eigen::VectorXi dummy_J, dummy_IM;
  382. igl::copyleft::cgal::SelfIntersectMesh<
  383. Kernel,
  384. MatrixXES, DerivedFC,
  385. MatrixXES, DerivedFC,
  386. DerivedFC,
  387. Eigen::VectorXi,
  388. Eigen::VectorXi
  389. > checker(V, G, params,
  390. dummy_VV, dummy_FF, dummy_IF, dummy_J, dummy_IM);
  391. if (checker.count != 0)
  392. {
  393. throw "Self-intersection not fully resolved.";
  394. }
  395. }
  396. #endif
  397. MatrixX3S Vs(V.rows(), V.cols());
  398. for (size_t i=0; i<(size_t)V.rows(); i++)
  399. {
  400. for (size_t j=0; j<(size_t)V.cols(); j++)
  401. {
  402. igl::copyleft::cgal::assign_scalar(V(i,j), Vs(i,j));
  403. }
  404. }
  405. Eigen::VectorXi newIM;
  406. igl::remove_unreferenced(Vs,G,VC,FC,newIM);
  407. }
  408. #ifdef MESH_BOOLEAN_TIMING
  409. log_time("clean_up");
  410. #endif
  411. return valid;
  412. }
  413. template <
  414. typename DerivedVA,
  415. typename DerivedFA,
  416. typename DerivedVB,
  417. typename DerivedFB,
  418. typename DerivedVC,
  419. typename DerivedFC>
  420. IGL_INLINE bool igl::copyleft::cgal::mesh_boolean(
  421. const Eigen::PlainObjectBase<DerivedVA > & VA,
  422. const Eigen::PlainObjectBase<DerivedFA > & FA,
  423. const Eigen::PlainObjectBase<DerivedVB > & VB,
  424. const Eigen::PlainObjectBase<DerivedFB > & FB,
  425. const MeshBooleanType & type,
  426. Eigen::PlainObjectBase<DerivedVC > & VC,
  427. Eigen::PlainObjectBase<DerivedFC > & FC)
  428. {
  429. Eigen::Matrix<typename DerivedFC::Index, Eigen::Dynamic,1> J;
  430. return igl::copyleft::cgal::mesh_boolean(VA,FA,VB,FB,type,VC,FC,J);
  431. }
  432. #ifdef IGL_STATIC_LIBRARY
  433. // Explicit template specialization
  434. template bool igl::copyleft::cgal::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::MeshBooleanType const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
  435. template bool igl::copyleft::cgal::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::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> >&);
  436. template bool igl::copyleft::cgal::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::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> >&);
  437. template bool igl::copyleft::cgal::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<double, -1, -1, 0, -1, -1>, 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<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, -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&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > 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<int, -1, 1, 0, -1, 1> >&);
  438. template bool igl::copyleft::cgal::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<int, -1, 1, 0, -1, 1> >(std::vector<Eigen::Matrix<double, -1, -1, 0, -1, -1>, std::allocator<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > const&, std::vector<Eigen::Matrix<int, -1, -1, 0, -1, -1>, std::allocator<Eigen::Matrix<int, -1, -1, 0, -1, -1> > > const&, std::function<int (Eigen::Matrix<int, 1, -1, 1, 1, -1>)> const&, std::function<int (int, int)> 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> >&);
  439. template bool igl::copyleft::cgal::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<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, -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&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > 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<int, -1, 1, 0, -1, 1> >&);
  440. #undef IGL_STATIC_LIBRARY
  441. #include "../../remove_unreferenced.cpp"
  442. template void igl::remove_unreferenced<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<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, -1, 0, -1, -1> > 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<int, -1, 1, 0, -1, 1> >&);
  443. #include "../../slice.cpp"
  444. template void igl::slice<Eigen::PlainObjectBase<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> > >(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&, int, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, 3, 0, -1, 3> >&);
  445. #endif