mesh_boolean.cpp 18 KB

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