projected_delaunay.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef IGL_CGAL_PROJECTED_DELAUNAY_H
  9. #define IGL_CGAL_PROJECTED_DELAUNAY_H
  10. #include "../igl_inline.h"
  11. #include "CGAL_includes.hpp"
  12. namespace igl
  13. {
  14. namespace cgal
  15. {
  16. // Compute 2D delaunay triangulation of a given 3d triangle and a list of
  17. // intersection objects (points,segments,triangles). CGAL uses an affine
  18. // projection rather than an isometric projection, so we're not guaranteed
  19. // that the 2D delaunay triangulation here will be a delaunay triangulation
  20. // in 3D.
  21. //
  22. // Inputs:
  23. // A triangle in 3D
  24. // A_objects_3 updated list of intersection objects for A
  25. // Outputs:
  26. // cdt Contrained delaunay triangulation in projected 2D plane
  27. template <typename Kernel>
  28. IGL_INLINE void projected_delaunay(
  29. const CGAL::Triangle_3<Kernel> & A,
  30. const std::vector<CGAL::Object> & A_objects_3,
  31. CGAL::Constrained_triangulation_plus_2<
  32. CGAL::Constrained_Delaunay_triangulation_2<
  33. Kernel,
  34. CGAL::Triangulation_data_structure_2<
  35. CGAL::Triangulation_vertex_base_2<Kernel>,
  36. CGAL::Constrained_triangulation_face_base_2<Kernel> >,
  37. CGAL::Exact_intersections_tag> > & cdt);
  38. }
  39. }
  40. #ifndef IGL_STATIC_LIBRARY
  41. # include "projected_delaunay.cpp"
  42. #endif
  43. #endif