outer_hull.cpp 18 KB

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