mesh_boolean.cpp 18 KB

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