signed_distance.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 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 "signed_distance.h"
  9. #include "get_seconds.h"
  10. #include "per_edge_normals.h"
  11. #include "per_face_normals.h"
  12. #include "per_vertex_normals.h"
  13. #include "point_mesh_squared_distance.h"
  14. #include "pseudonormal_test.h"
  15. template <
  16. typename DerivedP,
  17. typename DerivedV,
  18. typename DerivedF,
  19. typename DerivedS,
  20. typename DerivedI,
  21. typename DerivedC,
  22. typename DerivedN>
  23. IGL_INLINE void igl::signed_distance(
  24. const Eigen::MatrixBase<DerivedP> & P,
  25. const Eigen::MatrixBase<DerivedV> & V,
  26. const Eigen::MatrixBase<DerivedF> & F,
  27. const SignedDistanceType sign_type,
  28. Eigen::PlainObjectBase<DerivedS> & S,
  29. Eigen::PlainObjectBase<DerivedI> & I,
  30. Eigen::PlainObjectBase<DerivedC> & C,
  31. Eigen::PlainObjectBase<DerivedN> & N)
  32. {
  33. using namespace Eigen;
  34. using namespace std;
  35. const int dim = V.cols();
  36. assert((V.cols() == 3||V.cols() == 2) && "V should have 3d or 2d positions");
  37. assert((P.cols() == 3||P.cols() == 2) && "P should have 3d or 2d positions");
  38. assert(V.cols() == P.cols() && "V should have same dimension as P");
  39. // Only unsigned distance is supported for non-triangles
  40. if(sign_type != SIGNED_DISTANCE_TYPE_UNSIGNED)
  41. {
  42. assert(F.cols() == dim && "F should have co-dimension 0 simplices");
  43. }
  44. typedef Eigen::Matrix<typename DerivedV::Scalar,1,3> RowVector3S;
  45. // Prepare distance computation
  46. AABB<DerivedV,3> tree3;
  47. AABB<DerivedV,2> tree2;
  48. switch(dim)
  49. {
  50. default:
  51. case 3:
  52. tree3.init(V,F);
  53. break;
  54. case 2:
  55. tree2.init(V,F);
  56. break;
  57. }
  58. Eigen::Matrix<typename DerivedV::Scalar,Eigen::Dynamic,3> FN,VN,EN;
  59. Eigen::Matrix<typename DerivedF::Scalar,Eigen::Dynamic,2> E;
  60. Eigen::Matrix<typename DerivedF::Scalar,Eigen::Dynamic,1> EMAP;
  61. WindingNumberAABB<RowVector3S,DerivedV,DerivedF> hier3;
  62. switch(sign_type)
  63. {
  64. default:
  65. assert(false && "Unknown SignedDistanceType");
  66. case SIGNED_DISTANCE_TYPE_UNSIGNED:
  67. // do nothing
  68. break;
  69. case SIGNED_DISTANCE_TYPE_DEFAULT:
  70. case SIGNED_DISTANCE_TYPE_WINDING_NUMBER:
  71. switch(dim)
  72. {
  73. default:
  74. case 3:
  75. hier3.set_mesh(V,F);
  76. hier3.grow();
  77. break;
  78. case 2:
  79. // no precomp, no hierarchy
  80. break;
  81. }
  82. break;
  83. case SIGNED_DISTANCE_TYPE_PSEUDONORMAL:
  84. switch(dim)
  85. {
  86. default:
  87. case 3:
  88. // "Signed Distance Computation Using the Angle Weighted Pseudonormal"
  89. // [Bærentzen & Aanæs 2005]
  90. per_face_normals(V,F,FN);
  91. per_vertex_normals(V,F,PER_VERTEX_NORMALS_WEIGHTING_TYPE_ANGLE,FN,VN);
  92. per_edge_normals(
  93. V,F,PER_EDGE_NORMALS_WEIGHTING_TYPE_UNIFORM,FN,EN,E,EMAP);
  94. break;
  95. case 2:
  96. FN.resize(F.rows(),2);
  97. VN = DerivedV::Zero(V.rows(),2);
  98. for(int e = 0;e<F.rows();e++)
  99. {
  100. // rotate edge vector
  101. FN(e,0) = (V(F(e,1),1)-V(F(e,0),1));
  102. FN(e,1) = -(V(F(e,1),0)-V(F(e,0),0));
  103. FN.row(e).normalize();
  104. // add to vertex normal
  105. VN.row(F(e,1)) += FN.row(e);
  106. VN.row(F(e,0)) += FN.row(e);
  107. }
  108. // normalize to average
  109. VN.rowwise().normalize();
  110. break;
  111. }
  112. N.resize(P.rows(),dim);
  113. break;
  114. }
  115. S.resize(P.rows(),1);
  116. I.resize(P.rows(),1);
  117. C.resize(P.rows(),dim);
  118. for(int p = 0;p<P.rows();p++)
  119. {
  120. RowVector3S q3;
  121. Eigen::Matrix<typename DerivedV::Scalar,1,2> q2;
  122. switch(P.cols())
  123. {
  124. default:
  125. case 3:
  126. q3 = P.row(p);
  127. break;
  128. case 2:
  129. q2 = P.row(p);
  130. break;
  131. }
  132. typename DerivedV::Scalar s,sqrd;
  133. Eigen::Matrix<typename DerivedV::Scalar,1,Eigen::Dynamic> c;
  134. RowVector3S c3;
  135. Eigen::Matrix<typename DerivedV::Scalar,1,2> c2;
  136. int i=-1;
  137. switch(sign_type)
  138. {
  139. default:
  140. assert(false && "Unknown SignedDistanceType");
  141. case SIGNED_DISTANCE_TYPE_UNSIGNED:
  142. s = 1.;
  143. sqrd = dim==3?
  144. tree3.squared_distance(V,F,q3,i,c3):
  145. tree2.squared_distance(V,F,q2,i,c2);
  146. break;
  147. case SIGNED_DISTANCE_TYPE_DEFAULT:
  148. case SIGNED_DISTANCE_TYPE_WINDING_NUMBER:
  149. dim==3 ?
  150. signed_distance_winding_number(tree3,V,F,hier3,q3,s,sqrd,i,c3):
  151. signed_distance_winding_number(tree2,V,F,q2,s,sqrd,i,c2);
  152. break;
  153. case SIGNED_DISTANCE_TYPE_PSEUDONORMAL:
  154. {
  155. RowVector3S n3;
  156. Eigen::Matrix<typename DerivedV::Scalar,1,2> n2;
  157. dim==3 ?
  158. signed_distance_pseudonormal(tree3,V,F,FN,VN,EN,EMAP,q3,s,sqrd,i,c3,n3):
  159. signed_distance_pseudonormal(tree2,V,F,FN,VN,q2,s,sqrd,i,c2,n2);
  160. Eigen::Matrix<typename DerivedV::Scalar,1,Eigen::Dynamic> n;
  161. (dim==3 ? n = n3 : n = n2);
  162. N.row(p) = n;
  163. break;
  164. }
  165. }
  166. I(p) = i;
  167. S(p) = s*sqrt(sqrd);
  168. C.row(p) = (dim==3 ? c=c3 : c=c2);
  169. }
  170. }
  171. template <
  172. typename DerivedV,
  173. typename DerivedF,
  174. typename DerivedFN,
  175. typename DerivedVN,
  176. typename DerivedEN,
  177. typename DerivedEMAP,
  178. typename Derivedq>
  179. IGL_INLINE typename DerivedV::Scalar igl::signed_distance_pseudonormal(
  180. const AABB<DerivedV,3> & tree,
  181. const Eigen::MatrixBase<DerivedV> & V,
  182. const Eigen::MatrixBase<DerivedF> & F,
  183. const Eigen::MatrixBase<DerivedFN> & FN,
  184. const Eigen::MatrixBase<DerivedVN> & VN,
  185. const Eigen::MatrixBase<DerivedEN> & EN,
  186. const Eigen::MatrixBase<DerivedEMAP> & EMAP,
  187. const Eigen::MatrixBase<Derivedq> & q)
  188. {
  189. typename DerivedV::Scalar s,sqrd;
  190. Eigen::Matrix<typename DerivedV::Scalar,1,3> n,c;
  191. int i = -1;
  192. signed_distance_pseudonormal(tree,V,F,FN,VN,EN,EMAP,q,s,sqrd,i,c,n);
  193. return s*sqrt(sqrd);
  194. }
  195. template <
  196. typename DerivedP,
  197. typename DerivedV,
  198. typename DerivedF,
  199. typename DerivedFN,
  200. typename DerivedVN,
  201. typename DerivedEN,
  202. typename DerivedEMAP,
  203. typename DerivedS,
  204. typename DerivedI,
  205. typename DerivedC,
  206. typename DerivedN>
  207. IGL_INLINE void igl::signed_distance_pseudonormal(
  208. const Eigen::MatrixBase<DerivedP> & P,
  209. const Eigen::MatrixBase<DerivedV> & V,
  210. const Eigen::MatrixBase<DerivedF> & F,
  211. const AABB<DerivedV,3> & tree,
  212. const Eigen::MatrixBase<DerivedFN> & FN,
  213. const Eigen::MatrixBase<DerivedVN> & VN,
  214. const Eigen::MatrixBase<DerivedEN> & EN,
  215. const Eigen::MatrixBase<DerivedEMAP> & EMAP,
  216. Eigen::PlainObjectBase<DerivedS> & S,
  217. Eigen::PlainObjectBase<DerivedI> & I,
  218. Eigen::PlainObjectBase<DerivedC> & C,
  219. Eigen::PlainObjectBase<DerivedN> & N)
  220. {
  221. using namespace Eigen;
  222. const size_t np = P.rows();
  223. S.resize(np,1);
  224. I.resize(np,1);
  225. N.resize(np,3);
  226. C.resize(np,3);
  227. typedef Eigen::Matrix<typename DerivedV::Scalar,1,3> RowVector3S;
  228. # pragma omp parallel for if(np>1000)
  229. for(size_t p = 0;p<np;p++)
  230. {
  231. typename DerivedV::Scalar s,sqrd;
  232. RowVector3S n,c;
  233. int i = -1;
  234. RowVector3S q = P.row(p);
  235. signed_distance_pseudonormal(tree,V,F,FN,VN,EN,EMAP,q,s,sqrd,i,c,n);
  236. S(p) = s*sqrt(sqrd);
  237. I(p) = i;
  238. N.row(p) = n;
  239. C.row(p) = c;
  240. }
  241. }
  242. template <
  243. typename DerivedV,
  244. typename DerivedF,
  245. typename DerivedFN,
  246. typename DerivedVN,
  247. typename DerivedEN,
  248. typename DerivedEMAP,
  249. typename Derivedq,
  250. typename Scalar,
  251. typename Derivedc,
  252. typename Derivedn>
  253. IGL_INLINE void igl::signed_distance_pseudonormal(
  254. const AABB<DerivedV,3> & tree,
  255. const Eigen::MatrixBase<DerivedV> & V,
  256. const Eigen::MatrixBase<DerivedF> & F,
  257. const Eigen::MatrixBase<DerivedFN> & FN,
  258. const Eigen::MatrixBase<DerivedVN> & VN,
  259. const Eigen::MatrixBase<DerivedEN> & EN,
  260. const Eigen::MatrixBase<DerivedEMAP> & EMAP,
  261. const Eigen::MatrixBase<Derivedq> & q,
  262. Scalar & s,
  263. Scalar & sqrd,
  264. int & i,
  265. Eigen::PlainObjectBase<Derivedc> & c,
  266. Eigen::PlainObjectBase<Derivedn> & n)
  267. {
  268. using namespace Eigen;
  269. using namespace std;
  270. typedef Eigen::Matrix<typename DerivedV::Scalar,1,3> RowVector3S;
  271. sqrd = tree.squared_distance(V,F,RowVector3S(q),i,(RowVector3S&)c);
  272. pseudonormal_test(V,F,FN,VN,EN,EMAP,q,i,c,s,n);
  273. }
  274. template <
  275. typename DerivedV,
  276. typename DerivedE,
  277. typename DerivedEN,
  278. typename DerivedVN,
  279. typename Derivedq,
  280. typename Scalar,
  281. typename Derivedc,
  282. typename Derivedn>
  283. IGL_INLINE void igl::signed_distance_pseudonormal(
  284. const AABB<DerivedV,2> & tree,
  285. const Eigen::MatrixBase<DerivedV> & V,
  286. const Eigen::MatrixBase<DerivedE> & E,
  287. const Eigen::MatrixBase<DerivedEN> & EN,
  288. const Eigen::MatrixBase<DerivedVN> & VN,
  289. const Eigen::MatrixBase<Derivedq> & q,
  290. Scalar & s,
  291. Scalar & sqrd,
  292. int & i,
  293. Eigen::PlainObjectBase<Derivedc> & c,
  294. Eigen::PlainObjectBase<Derivedn> & n)
  295. {
  296. using namespace Eigen;
  297. using namespace std;
  298. typedef Eigen::Matrix<typename DerivedV::Scalar,1,2> RowVector2S;
  299. sqrd = tree.squared_distance(V,E,RowVector2S(q),i,(RowVector2S&)c);
  300. pseudonormal_test(V,E,EN,VN,q,i,c,s,n);
  301. }
  302. template <
  303. typename DerivedV,
  304. typename DerivedF,
  305. typename Derivedq>
  306. IGL_INLINE typename DerivedV::Scalar igl::signed_distance_winding_number(
  307. const AABB<DerivedV,3> & tree,
  308. const Eigen::MatrixBase<DerivedV> & V,
  309. const Eigen::MatrixBase<DerivedF> & F,
  310. const igl::WindingNumberAABB<Derivedq,DerivedV,DerivedF> & hier,
  311. const Eigen::MatrixBase<Derivedq> & q)
  312. {
  313. typedef typename DerivedV::Scalar Scalar;
  314. Scalar s,sqrd;
  315. Eigen::Matrix<Scalar,1,3> c;
  316. int i=-1;
  317. signed_distance_winding_number(tree,V,F,hier,q,s,sqrd,i,c);
  318. return s*sqrt(sqrd);
  319. }
  320. template <
  321. typename DerivedV,
  322. typename DerivedF,
  323. typename Derivedq,
  324. typename Scalar,
  325. typename Derivedc>
  326. IGL_INLINE void igl::signed_distance_winding_number(
  327. const AABB<DerivedV,3> & tree,
  328. const Eigen::MatrixBase<DerivedV> & V,
  329. const Eigen::MatrixBase<DerivedF> & F,
  330. const igl::WindingNumberAABB<Derivedq,DerivedV,DerivedF> & hier,
  331. const Eigen::MatrixBase<Derivedq> & q,
  332. Scalar & s,
  333. Scalar & sqrd,
  334. int & i,
  335. Eigen::PlainObjectBase<Derivedc> & c)
  336. {
  337. using namespace Eigen;
  338. using namespace std;
  339. typedef Eigen::Matrix<typename DerivedV::Scalar,1,3> RowVector3S;
  340. sqrd = tree.squared_distance(V,F,RowVector3S(q),i,(RowVector3S&)c);
  341. const Scalar w = hier.winding_number(q.transpose());
  342. s = 1.-2.*w;
  343. }
  344. template <
  345. typename DerivedV,
  346. typename DerivedF,
  347. typename Derivedq,
  348. typename Scalar,
  349. typename Derivedc>
  350. IGL_INLINE void igl::signed_distance_winding_number(
  351. const AABB<DerivedV,2> & tree,
  352. const Eigen::MatrixBase<DerivedV> & V,
  353. const Eigen::MatrixBase<DerivedF> & F,
  354. const Eigen::MatrixBase<Derivedq> & q,
  355. Scalar & s,
  356. Scalar & sqrd,
  357. int & i,
  358. Eigen::PlainObjectBase<Derivedc> & c)
  359. {
  360. using namespace Eigen;
  361. using namespace std;
  362. typedef Eigen::Matrix<typename DerivedV::Scalar,1,2> RowVector2S;
  363. sqrd = tree.squared_distance(V,F,RowVector2S(q),i,(RowVector2S&)c);
  364. Scalar w;
  365. // TODO: using .data() like this is very dangerous... This is assuming
  366. // colmajor order
  367. assert(!V.derived().IsRowMajor);
  368. assert(!F.derived().IsRowMajor);
  369. winding_number_2(V.derived().data(), V.rows(), F.derived().data(), F.rows(), q.derived().data(), 1, &w);
  370. s = 1.-2.*w;
  371. }
  372. #ifdef IGL_STATIC_LIBRARY
  373. // Explicit template instantiation
  374. template void igl::signed_distance<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<int, -1, 3, 1, -1, 3>, Eigen::Matrix<float, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<float, -1, 3, 0, -1, 3>, Eigen::Matrix<float, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, igl::SignedDistanceType, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> >&);
  375. template void igl::signed_distance_pseudonormal<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<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, 1, 3, 1, 1, 3>, double, Eigen::Matrix<double, 1, 3, 1, 1, 3>, Eigen::Matrix<double, 1, 3, 1, 1, 3> >(igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3> const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> > const&, double&, double&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&);
  376. template void igl::signed_distance<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 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<double, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::SignedDistanceType, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);
  377. template Eigen::Matrix<double, -1, -1, 0, -1, -1>::Scalar igl::signed_distance_pseudonormal<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<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, 1, 3, 1, 1, 3> >(igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3> const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> > const&);
  378. template void igl::signed_distance_pseudonormal<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 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<double, -1, -1, 0, -1, -1>, 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<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3> const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
  379. template void igl::signed_distance<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 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<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, igl::SignedDistanceType, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
  380. #endif