closest_facet.cpp 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Qingnan Zhou <qnzhou@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. //
  9. #include "closest_facet.h"
  10. #include <vector>
  11. #include <stdexcept>
  12. #include <unordered_map>
  13. #include "order_facets_around_edge.h"
  14. #include "submesh_aabb_tree.h"
  15. #include "../../vertex_triangle_adjacency.h"
  16. #include "../../LinSpaced.h"
  17. //#include "../../writePLY.h"
  18. template<
  19. typename DerivedV,
  20. typename DerivedF,
  21. typename DerivedI,
  22. typename DerivedP,
  23. typename uE2EType,
  24. typename DerivedEMAP,
  25. typename DerivedR,
  26. typename DerivedS >
  27. IGL_INLINE void igl::copyleft::cgal::closest_facet(
  28. const Eigen::PlainObjectBase<DerivedV>& V,
  29. const Eigen::PlainObjectBase<DerivedF>& F,
  30. const Eigen::PlainObjectBase<DerivedI>& I,
  31. const Eigen::PlainObjectBase<DerivedP>& P,
  32. const std::vector<std::vector<uE2EType> >& uE2E,
  33. const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
  34. Eigen::PlainObjectBase<DerivedR>& R,
  35. Eigen::PlainObjectBase<DerivedS>& S)
  36. {
  37. typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
  38. typedef Kernel::Point_3 Point_3;
  39. typedef Kernel::Plane_3 Plane_3;
  40. typedef Kernel::Segment_3 Segment_3;
  41. typedef Kernel::Triangle_3 Triangle;
  42. typedef std::vector<Triangle>::iterator Iterator;
  43. typedef CGAL::AABB_triangle_primitive<Kernel, Iterator> Primitive;
  44. typedef CGAL::AABB_traits<Kernel, Primitive> AABB_triangle_traits;
  45. typedef CGAL::AABB_tree<AABB_triangle_traits> Tree;
  46. if (F.rows() <= 0 || I.rows() <= 0) {
  47. throw std::runtime_error(
  48. "Closest facet cannot be computed on empty mesh.");
  49. }
  50. std::vector<std::vector<size_t> > VF, VFi;
  51. igl::vertex_triangle_adjacency(V.rows(), F, VF, VFi);
  52. std::vector<bool> in_I;
  53. std::vector<Triangle> triangles;
  54. Tree tree;
  55. submesh_aabb_tree(V,F,I,tree,triangles,in_I);
  56. return closest_facet(
  57. V,F,I,P,uE2E,EMAP,VF,VFi,tree,triangles,in_I,R,S);
  58. }
  59. template<
  60. typename DerivedV,
  61. typename DerivedF,
  62. typename DerivedI,
  63. typename DerivedP,
  64. typename uE2EType,
  65. typename DerivedEMAP,
  66. typename Kernel,
  67. typename DerivedR,
  68. typename DerivedS >
  69. IGL_INLINE void igl::copyleft::cgal::closest_facet(
  70. const Eigen::PlainObjectBase<DerivedV>& V,
  71. const Eigen::PlainObjectBase<DerivedF>& F,
  72. const Eigen::PlainObjectBase<DerivedI>& I,
  73. const Eigen::PlainObjectBase<DerivedP>& P,
  74. const std::vector<std::vector<uE2EType> >& uE2E,
  75. const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
  76. const std::vector<std::vector<size_t> > & VF,
  77. const std::vector<std::vector<size_t> > & VFi,
  78. const CGAL::AABB_tree<
  79. CGAL::AABB_traits<
  80. Kernel,
  81. CGAL::AABB_triangle_primitive<
  82. Kernel, typename std::vector<
  83. typename Kernel::Triangle_3 >::iterator > > > & tree,
  84. const std::vector<typename Kernel::Triangle_3 > & triangles,
  85. const std::vector<bool> & in_I,
  86. Eigen::PlainObjectBase<DerivedR>& R,
  87. Eigen::PlainObjectBase<DerivedS>& S)
  88. {
  89. typedef typename Kernel::Point_3 Point_3;
  90. typedef typename Kernel::Plane_3 Plane_3;
  91. typedef typename Kernel::Segment_3 Segment_3;
  92. typedef typename Kernel::Triangle_3 Triangle;
  93. typedef typename std::vector<Triangle>::iterator Iterator;
  94. typedef typename CGAL::AABB_triangle_primitive<Kernel, Iterator> Primitive;
  95. typedef typename CGAL::AABB_traits<Kernel, Primitive> AABB_triangle_traits;
  96. typedef typename CGAL::AABB_tree<AABB_triangle_traits> Tree;
  97. const size_t num_faces = I.rows();
  98. if (F.rows() <= 0 || I.rows() <= 0) {
  99. throw std::runtime_error(
  100. "Closest facet cannot be computed on empty mesh.");
  101. }
  102. auto on_the_positive_side = [&](size_t fid, const Point_3& p) -> bool
  103. {
  104. const auto& f = F.row(fid).eval();
  105. Point_3 v0(V(f[0], 0), V(f[0], 1), V(f[0], 2));
  106. Point_3 v1(V(f[1], 0), V(f[1], 1), V(f[1], 2));
  107. Point_3 v2(V(f[2], 0), V(f[2], 1), V(f[2], 2));
  108. auto ori = CGAL::orientation(v0, v1, v2, p);
  109. switch (ori) {
  110. case CGAL::POSITIVE:
  111. return true;
  112. case CGAL::NEGATIVE:
  113. return false;
  114. case CGAL::COPLANAR:
  115. // Warning:
  116. // This can only happen if fid contains a boundary edge.
  117. // Categorized this ambiguous case as negative side.
  118. return false;
  119. default:
  120. throw std::runtime_error("Unknown CGAL state.");
  121. }
  122. return false;
  123. };
  124. auto get_orientation = [&](size_t fid, size_t s, size_t d) -> bool
  125. {
  126. const auto& f = F.row(fid);
  127. if ((size_t)f[0] == s && (size_t)f[1] == d) return false;
  128. else if ((size_t)f[1] == s && (size_t)f[2] == d) return false;
  129. else if ((size_t)f[2] == s && (size_t)f[0] == d) return false;
  130. else if ((size_t)f[0] == d && (size_t)f[1] == s) return true;
  131. else if ((size_t)f[1] == d && (size_t)f[2] == s) return true;
  132. else if ((size_t)f[2] == d && (size_t)f[0] == s) return true;
  133. else {
  134. throw std::runtime_error(
  135. "Cannot compute orientation due to incorrect connectivity");
  136. return false;
  137. }
  138. };
  139. auto index_to_signed_index = [&](size_t index, bool ori) -> int{
  140. return (index+1) * (ori? 1:-1);
  141. };
  142. //auto signed_index_to_index = [&](int signed_index) -> size_t {
  143. // return abs(signed_index) - 1;
  144. //};
  145. enum ElementType { VERTEX, EDGE, FACE };
  146. auto determine_element_type = [&](const Point_3& p, const size_t fid,
  147. size_t& element_index) -> ElementType {
  148. const auto& tri = triangles[fid];
  149. const Point_3 p0 = tri[0];
  150. const Point_3 p1 = tri[1];
  151. const Point_3 p2 = tri[2];
  152. if (p == p0) { element_index = 0; return VERTEX; }
  153. if (p == p1) { element_index = 1; return VERTEX; }
  154. if (p == p2) { element_index = 2; return VERTEX; }
  155. if (CGAL::collinear(p0, p1, p)) { element_index = 2; return EDGE; }
  156. if (CGAL::collinear(p1, p2, p)) { element_index = 0; return EDGE; }
  157. if (CGAL::collinear(p2, p0, p)) { element_index = 1; return EDGE; }
  158. element_index = 0;
  159. return FACE;
  160. };
  161. auto process_edge_case = [&](
  162. size_t query_idx,
  163. const size_t s, const size_t d,
  164. size_t preferred_facet,
  165. bool& orientation) -> size_t
  166. {
  167. Point_3 query_point(
  168. P(query_idx, 0),
  169. P(query_idx, 1),
  170. P(query_idx, 2));
  171. size_t corner_idx = std::numeric_limits<size_t>::max();
  172. if ((s == F(preferred_facet, 0) && d == F(preferred_facet, 1)) ||
  173. (s == F(preferred_facet, 1) && d == F(preferred_facet, 0)))
  174. {
  175. corner_idx = 2;
  176. } else if ((s == F(preferred_facet, 0) && d == F(preferred_facet, 2)) ||
  177. (s == F(preferred_facet, 2) && d == F(preferred_facet, 0)))
  178. {
  179. corner_idx = 1;
  180. } else if ((s == F(preferred_facet, 1) && d == F(preferred_facet, 2)) ||
  181. (s == F(preferred_facet, 2) && d == F(preferred_facet, 1)))
  182. {
  183. corner_idx = 0;
  184. } else
  185. {
  186. std::cerr << "s: " << s << "\t d:" << d << std::endl;
  187. std::cerr << F.row(preferred_facet) << std::endl;
  188. throw std::runtime_error(
  189. "Invalid connectivity, edge does not belong to facet");
  190. }
  191. auto ueid = EMAP(preferred_facet + corner_idx * F.rows());
  192. auto eids = uE2E[ueid];
  193. std::vector<size_t> intersected_face_indices;
  194. for (auto eid : eids)
  195. {
  196. const size_t fid = eid % F.rows();
  197. if (in_I[fid])
  198. {
  199. intersected_face_indices.push_back(fid);
  200. }
  201. }
  202. const size_t num_intersected_faces = intersected_face_indices.size();
  203. std::vector<int> intersected_face_signed_indices(num_intersected_faces);
  204. std::transform(
  205. intersected_face_indices.begin(),
  206. intersected_face_indices.end(),
  207. intersected_face_signed_indices.begin(),
  208. [&](size_t index) {
  209. return index_to_signed_index(
  210. index, get_orientation(index, s,d));
  211. });
  212. assert(num_intersected_faces >= 1);
  213. if (num_intersected_faces == 1)
  214. {
  215. // The edge must be a boundary edge. Thus, the orientation can be
  216. // simply determined by checking if the query point is on the
  217. // positive side of the facet.
  218. const size_t fid = intersected_face_indices[0];
  219. orientation = on_the_positive_side(fid, query_point);
  220. return fid;
  221. }
  222. Eigen::VectorXi order;
  223. DerivedP pivot = P.row(query_idx).eval();
  224. igl::copyleft::cgal::order_facets_around_edge(V, F, s, d,
  225. intersected_face_signed_indices,
  226. pivot, order);
  227. // Although first and last are equivalent, make the choice based on
  228. // preferred_facet.
  229. const size_t first = order[0];
  230. const size_t last = order[num_intersected_faces-1];
  231. if (intersected_face_indices[first] == preferred_facet) {
  232. orientation = intersected_face_signed_indices[first] < 0;
  233. return intersected_face_indices[first];
  234. } else if (intersected_face_indices[last] == preferred_facet) {
  235. orientation = intersected_face_signed_indices[last] > 0;
  236. return intersected_face_indices[last];
  237. } else {
  238. orientation = intersected_face_signed_indices[order[0]] < 0;
  239. return intersected_face_indices[order[0]];
  240. }
  241. };
  242. auto process_face_case = [&](
  243. const size_t query_idx, const Point_3& closest_point,
  244. const size_t fid, bool& orientation) -> size_t {
  245. const auto& f = F.row(I(fid, 0));
  246. return process_edge_case(query_idx, f[0], f[1], I(fid, 0), orientation);
  247. };
  248. // Given that the closest point to query point P(query_idx,:) on (V,F(I,:))
  249. // is the vertex at V(s,:) which is incident at least on triangle
  250. // F(preferred_facet,:), determine a facet incident on V(s,:) that is
  251. // _exposed_ to the query point and determine whether that facet is facing
  252. // _toward_ or _away_ from the query point.
  253. //
  254. // Inputs:
  255. // query_idx index into P of query point
  256. // s index into V of closest point at vertex
  257. // preferred_facet facet incident on s
  258. // Outputs:
  259. // orientation whether returned face is facing toward or away from
  260. // query (parity unclear)
  261. // Returns face guaranteed to be "exposed" to P(query_idx,:)
  262. auto process_vertex_case = [&](
  263. const size_t query_idx,
  264. size_t s,
  265. size_t preferred_facet,
  266. bool& orientation) -> size_t
  267. {
  268. const Point_3 query_point(
  269. P(query_idx, 0), P(query_idx, 1), P(query_idx, 2));
  270. const Point_3 closest_point(V(s, 0), V(s, 1), V(s, 2));
  271. std::vector<size_t> adj_faces;
  272. std::vector<size_t> adj_face_corners;
  273. {
  274. // Gather adj faces to s within I.
  275. const auto& all_adj_faces = VF[s];
  276. const auto& all_adj_face_corners = VFi[s];
  277. const size_t num_all_adj_faces = all_adj_faces.size();
  278. for (size_t i=0; i<num_all_adj_faces; i++)
  279. {
  280. const size_t fid = all_adj_faces[i];
  281. // Shouldn't this always be true if I is a full connected component?
  282. if (in_I[fid])
  283. {
  284. adj_faces.push_back(fid);
  285. adj_face_corners.push_back(all_adj_face_corners[i]);
  286. }
  287. }
  288. }
  289. const size_t num_adj_faces = adj_faces.size();
  290. assert(num_adj_faces > 0);
  291. std::set<size_t> adj_vertices_set;
  292. std::unordered_multimap<size_t, size_t> v2f;
  293. for (size_t i=0; i<num_adj_faces; i++)
  294. {
  295. const size_t fid = adj_faces[i];
  296. const size_t cid = adj_face_corners[i];
  297. const auto& f = F.row(adj_faces[i]);
  298. const size_t next = f[(cid+1)%3];
  299. const size_t prev = f[(cid+2)%3];
  300. adj_vertices_set.insert(next);
  301. adj_vertices_set.insert(prev);
  302. v2f.insert({{next, fid}, {prev, fid}});
  303. }
  304. const size_t num_adj_vertices = adj_vertices_set.size();
  305. std::vector<size_t> adj_vertices(num_adj_vertices);
  306. std::copy(adj_vertices_set.begin(), adj_vertices_set.end(),
  307. adj_vertices.begin());
  308. std::vector<Point_3> adj_points;
  309. for (size_t vid : adj_vertices)
  310. {
  311. adj_points.emplace_back(V(vid,0), V(vid,1), V(vid,2));
  312. }
  313. // A plane is on the exterior if all adj_points lies on or to
  314. // one side of the plane.
  315. auto is_on_exterior = [&](const Plane_3& separator) -> bool{
  316. size_t positive=0;
  317. size_t negative=0;
  318. size_t coplanar=0;
  319. for (const auto& point : adj_points) {
  320. switch(separator.oriented_side(point)) {
  321. case CGAL::ON_POSITIVE_SIDE:
  322. positive++;
  323. break;
  324. case CGAL::ON_NEGATIVE_SIDE:
  325. negative++;
  326. break;
  327. case CGAL::ON_ORIENTED_BOUNDARY:
  328. coplanar++;
  329. break;
  330. default:
  331. throw "Unknown plane-point orientation";
  332. }
  333. }
  334. auto query_orientation = separator.oriented_side(query_point);
  335. if (query_orientation == CGAL::ON_ORIENTED_BOUNDARY &&
  336. (positive == 0 && negative == 0)) {
  337. // All adj vertices and query point are coplanar.
  338. // In this case, all separators are equally valid.
  339. return true;
  340. } else {
  341. bool r = (positive == 0 && query_orientation == CGAL::POSITIVE)
  342. || (negative == 0 && query_orientation == CGAL::NEGATIVE);
  343. return r;
  344. }
  345. };
  346. size_t d = std::numeric_limits<size_t>::max();
  347. for (size_t i=0; i<num_adj_vertices; i++) {
  348. const size_t vi = adj_vertices[i];
  349. for (size_t j=i+1; j<num_adj_vertices; j++) {
  350. Plane_3 separator(closest_point, adj_points[i], adj_points[j]);
  351. if (separator.is_degenerate()) {
  352. continue;
  353. }
  354. if (is_on_exterior(separator)) {
  355. if (!CGAL::collinear(
  356. query_point, adj_points[i], closest_point)) {
  357. d = vi;
  358. break;
  359. } else {
  360. d = adj_vertices[j];
  361. assert(!CGAL::collinear(
  362. query_point, adj_points[j], closest_point));
  363. break;
  364. }
  365. }
  366. }
  367. }
  368. if (d == std::numeric_limits<size_t>::max()) {
  369. Eigen::MatrixXd tmp_vertices(V.rows(), V.cols());
  370. for (size_t i=0; i<V.rows(); i++) {
  371. for (size_t j=0; j<V.cols(); j++) {
  372. tmp_vertices(i,j) = CGAL::to_double(V(i,j));
  373. }
  374. }
  375. Eigen::MatrixXi tmp_faces(adj_faces.size(), 3);
  376. for (size_t i=0; i<adj_faces.size(); i++) {
  377. tmp_faces.row(i) = F.row(adj_faces[i]);
  378. }
  379. //igl::writePLY("debug.ply", tmp_vertices, tmp_faces, false);
  380. throw std::runtime_error("Invalid vertex neighborhood");
  381. }
  382. const auto itr = v2f.equal_range(d);
  383. assert(itr.first != itr.second);
  384. return process_edge_case(query_idx, s, d, itr.first->second, orientation);
  385. };
  386. const size_t num_queries = P.rows();
  387. R.resize(num_queries, 1);
  388. S.resize(num_queries, 1);
  389. for (size_t i=0; i<num_queries; i++) {
  390. const Point_3 query(P(i,0), P(i,1), P(i,2));
  391. auto projection = tree.closest_point_and_primitive(query);
  392. const Point_3 closest_point = projection.first;
  393. size_t fid = projection.second - triangles.begin();
  394. bool fid_ori = false;
  395. // Gether all facets sharing the closest point.
  396. typename std::vector<typename Tree::Primitive_id> intersected_faces;
  397. tree.all_intersected_primitives(Segment_3(closest_point, query),
  398. std::back_inserter(intersected_faces));
  399. const size_t num_intersected_faces = intersected_faces.size();
  400. std::vector<size_t> intersected_face_indices(num_intersected_faces);
  401. std::transform(intersected_faces.begin(),
  402. intersected_faces.end(),
  403. intersected_face_indices.begin(),
  404. [&](const typename Tree::Primitive_id& itr) -> size_t
  405. { return I(itr-triangles.begin(), 0); });
  406. size_t element_index;
  407. auto element_type = determine_element_type(closest_point, fid,
  408. element_index);
  409. switch(element_type) {
  410. case VERTEX:
  411. {
  412. const auto& f = F.row(I(fid, 0));
  413. const size_t s = f[element_index];
  414. fid = process_vertex_case(i, s, I(fid, 0), fid_ori);
  415. }
  416. break;
  417. case EDGE:
  418. {
  419. const auto& f = F.row(I(fid, 0));
  420. const size_t s = f[(element_index+1)%3];
  421. const size_t d = f[(element_index+2)%3];
  422. fid = process_edge_case(i, s, d, I(fid, 0), fid_ori);
  423. }
  424. break;
  425. case FACE:
  426. {
  427. fid = process_face_case(i, closest_point, fid, fid_ori);
  428. }
  429. break;
  430. default:
  431. throw std::runtime_error("Unknown element type.");
  432. }
  433. R(i,0) = fid;
  434. S(i,0) = fid_ori;
  435. }
  436. }
  437. template<
  438. typename DerivedV,
  439. typename DerivedF,
  440. typename DerivedP,
  441. typename uE2EType,
  442. typename DerivedEMAP,
  443. typename DerivedR,
  444. typename DerivedS >
  445. IGL_INLINE void igl::copyleft::cgal::closest_facet(
  446. const Eigen::PlainObjectBase<DerivedV>& V,
  447. const Eigen::PlainObjectBase<DerivedF>& F,
  448. const Eigen::PlainObjectBase<DerivedP>& P,
  449. const std::vector<std::vector<uE2EType> >& uE2E,
  450. const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
  451. Eigen::PlainObjectBase<DerivedR>& R,
  452. Eigen::PlainObjectBase<DerivedS>& S) {
  453. const size_t num_faces = F.rows();
  454. Eigen::VectorXi I = igl::LinSpaced<Eigen::VectorXi>(num_faces, 0, num_faces-1);
  455. igl::copyleft::cgal::closest_facet(V, F, I, P, uE2E, EMAP, R, S);
  456. }
  457. #ifdef IGL_STATIC_LIBRARY
  458. // Explicit template instantiation
  459. // generated by autoexplicit.sh
  460. template void igl::copyleft::cgal::closest_facet<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, 3, 1, -1, 3>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, unsigned long, Eigen::Matrix<int, -1, 1, 0, -1, 1>, CGAL::Epeck, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, CGAL::AABB_tree<CGAL::AABB_traits<CGAL::Epeck, CGAL::AABB_triangle_primitive<CGAL::Epeck, std::vector<CGAL::Epeck::Triangle_3, std::allocator<CGAL::Epeck::Triangle_3> >::iterator, CGAL::Boolean_tag<false> > > > const&, std::vector<CGAL::Epeck::Triangle_3, std::allocator<CGAL::Epeck::Triangle_3> > const&, std::vector<bool, std::allocator<bool> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  461. // generated by autoexplicit.sh
  462. template void igl::copyleft::cgal::closest_facet<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1>, unsigned long, Eigen::Matrix<int, -1, 1, 0, -1, 1>, CGAL::Epeck, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 1, -1, -1> > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, CGAL::AABB_tree<CGAL::AABB_traits<CGAL::Epeck, CGAL::AABB_triangle_primitive<CGAL::Epeck, std::vector<CGAL::Epeck::Triangle_3, std::allocator<CGAL::Epeck::Triangle_3> >::iterator, CGAL::Boolean_tag<false> > > > const&, std::vector<CGAL::Epeck::Triangle_3, std::allocator<CGAL::Epeck::Triangle_3> > const&, std::vector<bool, std::allocator<bool> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  463. template void igl::copyleft::cgal::closest_facet<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1>, unsigned long, 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<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -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> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > 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> >&);
  464. #ifdef WIN32
  465. template void igl::copyleft::cgal::closest_facet<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 0, -1, -1>, class Eigen::Matrix<int, -1, -1, 0, -1, -1>, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 0, -1, -1>, unsigned __int64, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class CGAL::Epeck, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class Eigen::Matrix<int, -1, 1, 0, -1, 1>>(class Eigen::PlainObjectBase<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 0, -1, -1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, -1, 0, -1, -1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 0, -1, -1>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class CGAL::AABB_tree<class CGAL::AABB_traits<class CGAL::Epeck, class CGAL::AABB_triangle_primitive<class CGAL::Epeck, class std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<class CGAL::Triangle_3<class CGAL::Epeck>>>>, struct CGAL::Boolean_tag<0>>>> const &, class std::vector<class CGAL::Triangle_3<class CGAL::Epeck>, class std::allocator<class CGAL::Triangle_3<class CGAL::Epeck>>> const &, class std::vector<bool, class std::allocator<bool>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> &);
  466. template void igl::copyleft::cgal::closest_facet<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>, class Eigen::Matrix<int, -1, -1, 0, -1, -1>, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>, unsigned __int64, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class CGAL::Epeck, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class Eigen::Matrix<int, -1, 1, 0, -1, 1>>(class Eigen::PlainObjectBase<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, -1, 0, -1, -1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class CGAL::AABB_tree<class CGAL::AABB_traits<class CGAL::Epeck, class CGAL::AABB_triangle_primitive<class CGAL::Epeck, class std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<class CGAL::Triangle_3<class CGAL::Epeck>>>>, struct CGAL::Boolean_tag<0>>>> const &, class std::vector<class CGAL::Triangle_3<class CGAL::Epeck>, class std::allocator<class CGAL::Triangle_3<class CGAL::Epeck>>> const &, class std::vector<bool, class std::allocator<bool>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> &);
  467. template void igl::copyleft::cgal::closest_facet<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>, class Eigen::Matrix<int, -1, 3, 1, -1, 3>, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>, unsigned __int64, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class CGAL::Epeck, class Eigen::Matrix<int, -1, 1, 0, -1, 1>, class Eigen::Matrix<int, -1, 1, 0, -1, 1>>(class Eigen::PlainObjectBase<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 3, 1, -1, 3>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<class CGAL::Lazy_exact_nt<class CGAL::Gmpq>, -1, -1, 1, -1, -1>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class std::vector<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>, class std::allocator<class std::vector<unsigned __int64, class std::allocator<unsigned __int64>>>> const &, class CGAL::AABB_tree<class CGAL::AABB_traits<class CGAL::Epeck, class CGAL::AABB_triangle_primitive<class CGAL::Epeck, class std::_Vector_iterator<class std::_Vector_val<struct std::_Simple_types<class CGAL::Triangle_3<class CGAL::Epeck>>>>, struct CGAL::Boolean_tag<0>>>> const &, class std::vector<class CGAL::Triangle_3<class CGAL::Epeck>, class std::allocator<class CGAL::Triangle_3<class CGAL::Epeck>>> const &, class std::vector<bool, class std::allocator<bool>> const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, 1, 0, -1, 1>> &);
  468. #endif
  469. #endif