outer_hull.cpp 19 KB

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