refine.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2024 Alec Jacobson
  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_TRIANGLE_REFINE_H
  9. #define IGL_TRIANGLE_REFINE_H
  10. #include "../igl_inline.h"
  11. #include <string>
  12. #include <Eigen/Core>
  13. namespace igl
  14. {
  15. namespace triangle
  16. {
  17. /// Refine an existing triangulation.
  18. ///
  19. /// @param[in] V #V by 2 list of 2D vertex positions
  20. /// @param[in] E #E by 2 list of vertex ids forming segments
  21. /// @param[in] F #F by 3 list of vertex ids forming triangles
  22. /// @param[in] flags string of options pass to triangle (see triangle documentation)
  23. /// @param[out] V2 #V2 by 2 coordinates of the vertives of the generated triangulation
  24. /// @param[out] F2 #F2 by 3 list of indices forming the faces of the generated triangulation
  25. template <
  26. typename DerivedV,
  27. typename DerivedE,
  28. typename DerivedF,
  29. typename DerivedV2,
  30. typename DerivedF2>
  31. IGL_INLINE void refine(
  32. const Eigen::MatrixBase<DerivedV> & V,
  33. const Eigen::MatrixBase<DerivedE> & E,
  34. const Eigen::MatrixBase<DerivedF> & F,
  35. const std::string flags,
  36. Eigen::PlainObjectBase<DerivedV2> & V2,
  37. Eigen::PlainObjectBase<DerivedF2> & F2);
  38. }
  39. }
  40. #ifndef IGL_STATIC_LIBRARY
  41. # include "refine.cpp"
  42. #endif
  43. #endif