is_intrinsic_delaunay.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2018 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. #ifndef IGL_IS_INTRINSIC_DELAUNAY_H
  9. #define IGL_IS_INTRINSIC_DELAUNAY_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <vector>
  13. namespace igl
  14. {
  15. // IS_INTRINSIC_DELAUNAY Determine if each edge in the mesh (V,F) is Delaunay.
  16. //
  17. // Inputs:
  18. // l #l by dim list of edge lengths
  19. // F #F by 3 list of triangles indices
  20. // Outputs:
  21. // D #F by 3 list of bools revealing whether edges corresponding 23 31 12
  22. // are locally Delaunay. Boundary edges are by definition Delaunay.
  23. // Non-Manifold edges are by definition not Delaunay.
  24. template <
  25. typename Derivedl,
  26. typename DerivedF,
  27. typename DerivedD>
  28. IGL_INLINE void is_intrinsic_delaunay(
  29. const Eigen::MatrixBase<Derivedl> & l,
  30. const Eigen::MatrixBase<DerivedF> & F,
  31. Eigen::PlainObjectBase<DerivedD> & D);
  32. // Determine whether a single edge is Delaunay using a provided (extrinsic) incirle
  33. // test.
  34. //
  35. // Inputs:
  36. // l #l by dim list of edge lengths
  37. // F #F by 3 list of triangles indices
  38. // uE2E #uE list of lists of indices into E of coexisting edges (see
  39. // unique_edge_map)
  40. // uei index into uE2E of edge to check
  41. // Returns true iff edge is Delaunay
  42. template <
  43. typename Derivedl,
  44. typename DerivedF,
  45. typename uE2EType,
  46. typename ueiType>
  47. IGL_INLINE bool is_intrinsic_delaunay(
  48. const Eigen::MatrixBase<Derivedl> & l,
  49. const Eigen::MatrixBase<DerivedF> & F,
  50. const std::vector<std::vector<uE2EType> > & uE2E,
  51. const ueiType uei);
  52. }
  53. #ifndef IGL_STATIC_LIBRARY
  54. #include "is_intrinsic_delaunay.cpp"
  55. #endif
  56. #endif