projected_delaunay.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <[email protected]>
  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_COPYLEFT_CGAL_PROJECTED_DELAUNAY_H
  9. #define IGL_COPYLEFT_CGAL_PROJECTED_DELAUNAY_H
  10. #include "../../igl_inline.h"
  11. #include "CGAL_includes.hpp"
  12. namespace igl
  13. {
  14. namespace copyleft
  15. {
  16. namespace cgal
  17. {
  18. /// Compute 2D delaunay triangulation of a given 3d triangle and a list of
  19. /// intersection objects (points,segments,triangles). CGAL uses an affine
  20. /// projection rather than an isometric projection, so we're not guaranteed
  21. /// that the 2D delaunay triangulation here will be a delaunay triangulation
  22. /// in 3D.
  23. ///
  24. /// @param[in] A triangle in 3D
  25. /// @param[in] A_objects_3 updated list of intersection objects for A
  26. /// @param[out] 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. }
  41. #ifndef IGL_STATIC_LIBRARY
  42. # include "projected_delaunay.cpp"
  43. #endif
  44. #endif