outer_hull.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  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 "outer_hull.h"
  9. #include "extract_cells.h"
  10. #include "remesh_self_intersections.h"
  11. #include "assign_scalar.h"
  12. #include "../../remove_unreferenced.h"
  13. #include <CGAL/AABB_tree.h>
  14. #include <CGAL/AABB_traits.h>
  15. #include <CGAL/AABB_triangle_primitive.h>
  16. #include <CGAL/intersections.h>
  17. #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
  18. template <
  19. typename DerivedV,
  20. typename DerivedF,
  21. typename DerivedHV,
  22. typename DerivedHF,
  23. typename DerivedJ,
  24. typename Derivedflip>
  25. IGL_INLINE void igl::copyleft::cgal::outer_hull(
  26. const Eigen::PlainObjectBase<DerivedV> & V,
  27. const Eigen::PlainObjectBase<DerivedF> & F,
  28. Eigen::PlainObjectBase<DerivedHV> & HV,
  29. Eigen::PlainObjectBase<DerivedHF> & HF,
  30. Eigen::PlainObjectBase<DerivedJ> & J,
  31. Eigen::PlainObjectBase<Derivedflip> & flip)
  32. {
  33. // Exact types
  34. typedef CGAL::Epeck Kernel;
  35. typedef Kernel::FT ExactScalar;
  36. typedef
  37. Eigen::Matrix<
  38. ExactScalar,
  39. Eigen::Dynamic,
  40. Eigen::Dynamic,
  41. DerivedHV::IsRowMajor>
  42. MatrixXES;
  43. // Remesh self-intersections
  44. MatrixXES Vr;
  45. DerivedHF Fr;
  46. DerivedJ Jr;
  47. {
  48. RemeshSelfIntersectionsParam params;
  49. params.stitch_all = true;
  50. Eigen::VectorXi I;
  51. Eigen::MatrixXi IF;
  52. remesh_self_intersections(V, F, params, Vr, Fr, IF, Jr, I);
  53. // Merge coinciding vertices into non-manifold vertices.
  54. std::for_each(Fr.data(), Fr.data()+Fr.size(),
  55. [&I](typename DerivedHF::Scalar& a) { a=I[a]; });
  56. // Remove unreferenced vertices.
  57. Eigen::VectorXi UIM;
  58. remove_unreferenced(MatrixXES(Vr),DerivedHF(Fr), Vr, Fr, UIM);
  59. }
  60. // Extract cells for each face
  61. Eigen::MatrixXi C;
  62. extract_cells(Vr,Fr,C);
  63. // Extract faces on ambient cell
  64. int num_outer = 0;
  65. for(int i = 0;i<C.rows();i++)
  66. {
  67. num_outer += ( C(i,0) == 0 || C(i,1) == 0 ) ? 1 : 0;
  68. }
  69. HF.resize(num_outer,3);
  70. J.resize(num_outer,1);
  71. flip.resize(num_outer,1);
  72. {
  73. int h = 0;
  74. for(int i = 0;i<C.rows();i++)
  75. {
  76. if(C(i,0)==0)
  77. {
  78. HF.row(h) = Fr.row(i);
  79. J(h) = Jr(i);
  80. flip(h) = false;
  81. h++;
  82. }else if(C(i,1) == 0)
  83. {
  84. HF.row(h) = Fr.row(i).reverse();
  85. J(h) = Jr(i);
  86. flip(h) = true;
  87. h++;
  88. }
  89. }
  90. assert(h == num_outer);
  91. }
  92. // Remove unreferenced vertices and re-index faces
  93. {
  94. // Cast to output type
  95. DerivedHV Vr_cast(Vr.rows(),Vr.cols());
  96. for(int i = 0;i<Vr.rows();i++)
  97. {
  98. for(int j = 0;j<Vr.cols();j++)
  99. {
  100. assign_scalar(Vr(i,j), Vr_cast(i,j));
  101. }
  102. }
  103. Eigen::VectorXi I;
  104. remove_unreferenced(Vr_cast,DerivedHF(HF),HV,HF,I);
  105. }
  106. }
  107. #include "points_inside_component.h"
  108. #include "order_facets_around_edges.h"
  109. #include "outer_facet.h"
  110. #include "../../sortrows.h"
  111. #include "../../facet_components.h"
  112. #include "../../winding_number.h"
  113. #include "../../triangle_triangle_adjacency.h"
  114. #include "../../unique_edge_map.h"
  115. #include "../../barycenter.h"
  116. #include "../../per_face_normals.h"
  117. #include "../../sort_angles.h"
  118. #include <Eigen/Geometry>
  119. #include <vector>
  120. #include <map>
  121. #include <queue>
  122. #include <iostream>
  123. #include <type_traits>
  124. #include <CGAL/number_utils.h>
  125. //#define IGL_OUTER_HULL_DEBUG
  126. template <
  127. typename DerivedV,
  128. typename DerivedF,
  129. typename DerivedG,
  130. typename DerivedJ,
  131. typename Derivedflip>
  132. IGL_INLINE void igl::copyleft::cgal::outer_hull_legacy(
  133. const Eigen::PlainObjectBase<DerivedV> & V,
  134. const Eigen::PlainObjectBase<DerivedF> & F,
  135. Eigen::PlainObjectBase<DerivedG> & G,
  136. Eigen::PlainObjectBase<DerivedJ> & J,
  137. Eigen::PlainObjectBase<Derivedflip> & flip)
  138. {
  139. #ifdef IGL_OUTER_HULL_DEBUG
  140. std::cerr << "Extracting outer hull" << std::endl;
  141. #endif
  142. using namespace Eigen;
  143. using namespace std;
  144. typedef typename DerivedF::Index Index;
  145. Matrix<Index,DerivedF::RowsAtCompileTime,1> C;
  146. typedef Matrix<typename DerivedV::Scalar,Dynamic,DerivedV::ColsAtCompileTime> MatrixXV;
  147. //typedef Matrix<typename DerivedF::Scalar,Dynamic,DerivedF::ColsAtCompileTime> MatrixXF;
  148. typedef Matrix<typename DerivedG::Scalar,Dynamic,DerivedG::ColsAtCompileTime> MatrixXG;
  149. typedef Matrix<typename DerivedJ::Scalar,Dynamic,DerivedJ::ColsAtCompileTime> MatrixXJ;
  150. const Index m = F.rows();
  151. // UNUSED:
  152. //const auto & duplicate_simplex = [&F](const int f, const int g)->bool
  153. //{
  154. // return
  155. // (F(f,0) == F(g,0) && F(f,1) == F(g,1) && F(f,2) == F(g,2)) ||
  156. // (F(f,1) == F(g,0) && F(f,2) == F(g,1) && F(f,0) == F(g,2)) ||
  157. // (F(f,2) == F(g,0) && F(f,0) == F(g,1) && F(f,1) == F(g,2)) ||
  158. // (F(f,0) == F(g,2) && F(f,1) == F(g,1) && F(f,2) == F(g,0)) ||
  159. // (F(f,1) == F(g,2) && F(f,2) == F(g,1) && F(f,0) == F(g,0)) ||
  160. // (F(f,2) == F(g,2) && F(f,0) == F(g,1) && F(f,1) == F(g,0));
  161. //};
  162. #ifdef IGL_OUTER_HULL_DEBUG
  163. cout<<"outer hull..."<<endl;
  164. #endif
  165. #ifdef IGL_OUTER_HULL_DEBUG
  166. cout<<"edge map..."<<endl;
  167. #endif
  168. typedef Matrix<typename DerivedF::Scalar,Dynamic,2> MatrixX2I;
  169. typedef Matrix<typename DerivedF::Index,Dynamic,1> VectorXI;
  170. //typedef Matrix<typename DerivedV::Scalar, 3, 1> Vector3F;
  171. MatrixX2I E,uE;
  172. VectorXI EMAP;
  173. vector<vector<typename DerivedF::Index> > uE2E;
  174. unique_edge_map(F,E,uE,EMAP,uE2E);
  175. #ifdef IGL_OUTER_HULL_DEBUG
  176. for (size_t ui=0; ui<uE.rows(); ui++) {
  177. std::cout << ui << ": " << uE2E[ui].size() << " -- (";
  178. for (size_t i=0; i<uE2E[ui].size(); i++) {
  179. std::cout << uE2E[ui][i] << ", ";
  180. }
  181. std::cout << ")" << std::endl;
  182. }
  183. #endif
  184. std::vector<std::vector<typename DerivedF::Index> > uE2oE;
  185. std::vector<std::vector<bool> > uE2C;
  186. order_facets_around_edges(V, F, uE, uE2E, uE2oE, uE2C);
  187. uE2E = uE2oE;
  188. VectorXI diIM(3*m);
  189. for (auto ue : uE2E) {
  190. for (size_t i=0; i<ue.size(); i++) {
  191. auto fe = ue[i];
  192. diIM[fe] = i;
  193. }
  194. }
  195. vector<vector<vector<Index > > > TT,_1;
  196. triangle_triangle_adjacency(E,EMAP,uE2E,false,TT,_1);
  197. VectorXI counts;
  198. #ifdef IGL_OUTER_HULL_DEBUG
  199. cout<<"facet components..."<<endl;
  200. #endif
  201. facet_components(TT,C,counts);
  202. assert(C.maxCoeff()+1 == counts.rows());
  203. const size_t ncc = counts.rows();
  204. G.resize(0,F.cols());
  205. J.resize(0,1);
  206. flip.setConstant(m,1,false);
  207. #ifdef IGL_OUTER_HULL_DEBUG
  208. cout<<"reindex..."<<endl;
  209. #endif
  210. // H contains list of faces on outer hull;
  211. vector<bool> FH(m,false);
  212. vector<bool> EH(3*m,false);
  213. vector<MatrixXG> vG(ncc);
  214. vector<MatrixXJ> vJ(ncc);
  215. vector<MatrixXJ> vIM(ncc);
  216. //size_t face_count = 0;
  217. for(size_t id = 0;id<ncc;id++)
  218. {
  219. vIM[id].resize(counts[id],1);
  220. }
  221. // current index into each IM
  222. vector<size_t> g(ncc,0);
  223. // place order of each face in its respective component
  224. for(Index f = 0;f<m;f++)
  225. {
  226. vIM[C(f)](g[C(f)]++) = f;
  227. }
  228. #ifdef IGL_OUTER_HULL_DEBUG
  229. cout<<"barycenters..."<<endl;
  230. #endif
  231. // assumes that "resolve" has handled any coplanar cases correctly and nearly
  232. // coplanar cases can be sorted based on barycenter.
  233. MatrixXV BC;
  234. barycenter(V,F,BC);
  235. #ifdef IGL_OUTER_HULL_DEBUG
  236. cout<<"loop over CCs (="<<ncc<<")..."<<endl;
  237. #endif
  238. for(Index id = 0;id<(Index)ncc;id++)
  239. {
  240. auto & IM = vIM[id];
  241. // starting face that's guaranteed to be on the outer hull and in this
  242. // component
  243. int f;
  244. bool f_flip;
  245. #ifdef IGL_OUTER_HULL_DEBUG
  246. cout<<"outer facet..."<<endl;
  247. #endif
  248. igl::copyleft::cgal::outer_facet(V,F,IM,f,f_flip);
  249. #ifdef IGL_OUTER_HULL_DEBUG
  250. cout<<"outer facet: "<<f<<endl;
  251. //cout << V.row(F(f, 0)) << std::endl;
  252. //cout << V.row(F(f, 1)) << std::endl;
  253. //cout << V.row(F(f, 2)) << std::endl;
  254. #endif
  255. int FHcount = 1;
  256. FH[f] = true;
  257. // Q contains list of face edges to continue traversing upong
  258. queue<int> Q;
  259. Q.push(f+0*m);
  260. Q.push(f+1*m);
  261. Q.push(f+2*m);
  262. flip(f) = f_flip;
  263. //std::cout << "face " << face_count++ << ": " << f << std::endl;
  264. //std::cout << "f " << F.row(f).array()+1 << std::endl;
  265. //cout<<"flip("<<f<<") = "<<(flip(f)?"true":"false")<<endl;
  266. #ifdef IGL_OUTER_HULL_DEBUG
  267. cout<<"BFS..."<<endl;
  268. #endif
  269. while(!Q.empty())
  270. {
  271. // face-edge
  272. const int e = Q.front();
  273. Q.pop();
  274. // face
  275. const int f = e%m;
  276. // corner
  277. const int c = e/m;
  278. #ifdef IGL_OUTER_HULL_DEBUG
  279. std::cout << "edge: " << e << ", ue: " << EMAP(e) << std::endl;
  280. std::cout << "face: " << f << std::endl;
  281. std::cout << "corner: " << c << std::endl;
  282. std::cout << "consistent: " << uE2C[EMAP(e)][diIM[e]] << std::endl;
  283. #endif
  284. // Should never see edge again...
  285. if(EH[e] == true)
  286. {
  287. continue;
  288. }
  289. EH[e] = true;
  290. // source of edge according to f
  291. const int fs = flip(f)?F(f,(c+2)%3):F(f,(c+1)%3);
  292. // destination of edge according to f
  293. const int fd = flip(f)?F(f,(c+1)%3):F(f,(c+2)%3);
  294. // edge valence
  295. const size_t val = uE2E[EMAP(e)].size();
  296. #ifdef IGL_OUTER_HULL_DEBUG
  297. //std::cout << "vd: " << V.row(fd) << std::endl;
  298. //std::cout << "vs: " << V.row(fs) << std::endl;
  299. //std::cout << "edge: " << V.row(fd) - V.row(fs) << std::endl;
  300. for (size_t i=0; i<val; i++) {
  301. if (i == diIM(e)) {
  302. std::cout << "* ";
  303. } else {
  304. std::cout << " ";
  305. }
  306. std::cout << i << ": "
  307. << " (e: " << uE2E[EMAP(e)][i] << ", f: "
  308. << uE2E[EMAP(e)][i] % m * (uE2C[EMAP(e)][i] ? 1:-1) << ")" << std::endl;
  309. }
  310. #endif
  311. // is edge consistent with edge of face used for sorting
  312. const int e_cons = (uE2C[EMAP(e)][diIM(e)] ? 1: -1);
  313. int nfei = -1;
  314. // Loop once around trying to find suitable next face
  315. for(size_t step = 1; step<val+2;step++)
  316. {
  317. const int nfei_new = (diIM(e) + 2*val + e_cons*step*(flip(f)?-1:1))%val;
  318. const int nf = uE2E[EMAP(e)][nfei_new] % m;
  319. {
  320. #ifdef IGL_OUTER_HULL_DEBUG
  321. //cout<<"Next facet: "<<(f+1)<<" --> "<<(nf+1)<<", |"<<
  322. // di[EMAP(e)][diIM(e)]<<" - "<<di[EMAP(e)][nfei_new]<<"| = "<<
  323. // abs(di[EMAP(e)][diIM(e)] - di[EMAP(e)][nfei_new])
  324. // <<endl;
  325. #endif
  326. // Only use this face if not already seen
  327. if(!FH[nf])
  328. {
  329. nfei = nfei_new;
  330. //} else {
  331. // std::cout << "skipping face " << nfei_new << " because it is seen before"
  332. // << std::endl;
  333. }
  334. break;
  335. //} else {
  336. // std::cout << di[EMAP(e)][diIM(e)].transpose() << std::endl;
  337. // std::cout << di[EMAP(e)][diIM(nfei_new)].transpose() << std::endl;
  338. // std::cout << "skipping face " << nfei_new << " with identical dihedral angle"
  339. // << std::endl;
  340. }
  341. //#ifdef IGL_OUTER_HULL_DEBUG
  342. // cout<<"Skipping co-planar facet: "<<(f+1)<<" --> "<<(nf+1)<<endl;
  343. //#endif
  344. }
  345. int max_ne = -1;
  346. if(nfei >= 0)
  347. {
  348. max_ne = uE2E[EMAP(e)][nfei];
  349. }
  350. if(max_ne>=0)
  351. {
  352. // face of neighbor
  353. const int nf = max_ne%m;
  354. #ifdef IGL_OUTER_HULL_DEBUG
  355. if(!FH[nf])
  356. {
  357. // first time seeing face
  358. cout<<(f+1)<<" --> "<<(nf+1)<<endl;
  359. }
  360. #endif
  361. FH[nf] = true;
  362. //std::cout << "face " << face_count++ << ": " << nf << std::endl;
  363. //std::cout << "f " << F.row(nf).array()+1 << std::endl;
  364. FHcount++;
  365. // corner of neighbor
  366. const int nc = max_ne/m;
  367. const int nd = F(nf,(nc+2)%3);
  368. const bool cons = (flip(f)?fd:fs) == nd;
  369. flip(nf) = (cons ? flip(f) : !flip(f));
  370. //cout<<"flip("<<nf<<") = "<<(flip(nf)?"true":"false")<<endl;
  371. const int ne1 = nf+((nc+1)%3)*m;
  372. const int ne2 = nf+((nc+2)%3)*m;
  373. if(!EH[ne1])
  374. {
  375. Q.push(ne1);
  376. }
  377. if(!EH[ne2])
  378. {
  379. Q.push(ne2);
  380. }
  381. }
  382. }
  383. {
  384. vG[id].resize(FHcount,3);
  385. vJ[id].resize(FHcount,1);
  386. //nG += FHcount;
  387. size_t h = 0;
  388. assert(counts(id) == IM.rows());
  389. for(int i = 0;i<counts(id);i++)
  390. {
  391. const size_t f = IM(i);
  392. //if(f_flip)
  393. //{
  394. // flip(f) = !flip(f);
  395. //}
  396. if(FH[f])
  397. {
  398. vG[id].row(h) = (flip(f)?F.row(f).reverse().eval():F.row(f));
  399. vJ[id](h,0) = f;
  400. h++;
  401. }
  402. }
  403. assert((int)h == FHcount);
  404. }
  405. }
  406. // Is A inside B? Assuming A and B are consistently oriented but closed and
  407. // non-intersecting.
  408. const auto & has_overlapping_bbox = [](
  409. const Eigen::PlainObjectBase<DerivedV> & V,
  410. const MatrixXG & A,
  411. const MatrixXG & B)->bool
  412. {
  413. const auto & bounding_box = [](
  414. const Eigen::PlainObjectBase<DerivedV> & V,
  415. const MatrixXG & F)->
  416. DerivedV
  417. {
  418. DerivedV BB(2,3);
  419. BB<<
  420. 1e26,1e26,1e26,
  421. -1e26,-1e26,-1e26;
  422. const size_t m = F.rows();
  423. for(size_t f = 0;f<m;f++)
  424. {
  425. for(size_t c = 0;c<3;c++)
  426. {
  427. const auto & vfc = V.row(F(f,c)).eval();
  428. BB(0,0) = std::min(BB(0,0), vfc(0,0));
  429. BB(0,1) = std::min(BB(0,1), vfc(0,1));
  430. BB(0,2) = std::min(BB(0,2), vfc(0,2));
  431. BB(1,0) = std::max(BB(1,0), vfc(0,0));
  432. BB(1,1) = std::max(BB(1,1), vfc(0,1));
  433. BB(1,2) = std::max(BB(1,2), vfc(0,2));
  434. }
  435. }
  436. return BB;
  437. };
  438. // A lot of the time we're dealing with unrelated, distant components: cull
  439. // them.
  440. DerivedV ABB = bounding_box(V,A);
  441. DerivedV BBB = bounding_box(V,B);
  442. if( (BBB.row(0)-ABB.row(1)).maxCoeff()>0 ||
  443. (ABB.row(0)-BBB.row(1)).maxCoeff()>0 )
  444. {
  445. // bounding boxes do not overlap
  446. return false;
  447. } else {
  448. return true;
  449. }
  450. };
  451. // Reject components which are completely inside other components
  452. vector<bool> keep(ncc,true);
  453. size_t nG = 0;
  454. // This is O( ncc * ncc * m)
  455. for(size_t id = 0;id<ncc;id++)
  456. {
  457. if (!keep[id]) continue;
  458. std::vector<size_t> unresolved;
  459. for(size_t oid = 0;oid<ncc;oid++)
  460. {
  461. if(id == oid || !keep[oid])
  462. {
  463. continue;
  464. }
  465. if (has_overlapping_bbox(V, vG[id], vG[oid])) {
  466. unresolved.push_back(oid);
  467. }
  468. }
  469. const size_t num_unresolved_components = unresolved.size();
  470. DerivedV query_points(num_unresolved_components, 3);
  471. for (size_t i=0; i<num_unresolved_components; i++) {
  472. const size_t oid = unresolved[i];
  473. DerivedF f = vG[oid].row(0);
  474. query_points(i,0) = (V(f(0,0), 0) + V(f(0,1), 0) + V(f(0,2), 0))/3.0;
  475. query_points(i,1) = (V(f(0,0), 1) + V(f(0,1), 1) + V(f(0,2), 1))/3.0;
  476. query_points(i,2) = (V(f(0,0), 2) + V(f(0,1), 2) + V(f(0,2), 2))/3.0;
  477. }
  478. Eigen::VectorXi inside;
  479. igl::copyleft::cgal::points_inside_component(V, vG[id], query_points, inside);
  480. assert((size_t)inside.size() == num_unresolved_components);
  481. for (size_t i=0; i<num_unresolved_components; i++) {
  482. if (inside(i, 0)) {
  483. const size_t oid = unresolved[i];
  484. keep[oid] = false;
  485. }
  486. }
  487. }
  488. for (size_t id = 0; id<ncc; id++) {
  489. if (keep[id]) {
  490. nG += vJ[id].rows();
  491. }
  492. }
  493. // collect G and J across components
  494. G.resize(nG,3);
  495. J.resize(nG,1);
  496. {
  497. size_t off = 0;
  498. for(Index id = 0;id<(Index)ncc;id++)
  499. {
  500. if(keep[id])
  501. {
  502. assert(vG[id].rows() == vJ[id].rows());
  503. G.block(off,0,vG[id].rows(),vG[id].cols()) = vG[id];
  504. J.block(off,0,vJ[id].rows(),vJ[id].cols()) = vJ[id];
  505. off += vG[id].rows();
  506. }
  507. }
  508. }
  509. }
  510. #ifdef IGL_STATIC_LIBRARY
  511. // Explicit template specialization
  512. template void igl::copyleft::cgal::outer_hull<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> >&, 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> >&);
  513. template void igl::copyleft::cgal::outer_hull_legacy< 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::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<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> > &);
  514. #endif