outer_hull.cpp 18 KB

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