outer_hull.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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_OUTER_HULL_H
  9. #define IGL_COPYLEFT_CGAL_OUTER_HULL_H
  10. #include "../../igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. namespace copyleft
  15. {
  16. namespace cgal
  17. {
  18. /// Compute the "outer hull" of a piecewise constant winding number induce
  19. /// triangle mesh (V,F).
  20. ///
  21. /// @param[in] V #V by 3 list of vertex positions
  22. /// @param[in] F #F by 3 list of triangle indices into V
  23. /// @param[out] HV #HV by 3 list of output vertex positions
  24. /// @param[out] HF #HF by 3 list of output triangle indices into HV
  25. /// @param[out] J #HF list of indices into F
  26. /// @param[out] flip #HF list of whether facet was flipped when added to HF
  27. ///
  28. template <
  29. typename DerivedV,
  30. typename DerivedF,
  31. typename DerivedHV,
  32. typename DerivedHF,
  33. typename DerivedJ,
  34. typename Derivedflip>
  35. IGL_INLINE void outer_hull(
  36. const Eigen::PlainObjectBase<DerivedV> & V,
  37. const Eigen::PlainObjectBase<DerivedF> & F,
  38. Eigen::PlainObjectBase<DerivedHV> & HV,
  39. Eigen::PlainObjectBase<DerivedHF> & HF,
  40. Eigen::PlainObjectBase<DerivedJ> & J,
  41. Eigen::PlainObjectBase<Derivedflip> & flip);
  42. }
  43. }
  44. }
  45. #ifndef IGL_STATIC_LIBRARY
  46. # include "outer_hull.cpp"
  47. #endif
  48. #endif