outer_hull.cpp 17 KB

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