signed_distance_isosurface.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 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_SIGNED_DISTANCE_ISOSURFACE_H
  9. #define IGL_COPYLEFT_CGAL_SIGNED_DISTANCE_ISOSURFACE_H
  10. #include "../../igl_inline.h"
  11. #include "../../signed_distance.h"
  12. #include <Eigen/Core>
  13. namespace igl
  14. {
  15. namespace copyleft
  16. {
  17. namespace cgal
  18. {
  19. /// Compute the contour of an iso-level of the signed distance field to a
  20. /// given mesh.
  21. ///
  22. /// @param[in] IV #IV by 3 list of input mesh vertex positions
  23. /// @param[in] IF #IF by 3 list of input triangle indices
  24. /// @param[in] level iso-level to contour in world coords, negative is inside.
  25. /// @param[in] angle_bound lower bound on triangle angles (mesh quality) (e.g. 28)
  26. /// @param[in] radius_bound upper bound on triangle size (mesh density?) (e.g. 0.02)
  27. /// @param[in] distance_bound cgal mysterious parameter (mesh density?) (e.g. 0.01)
  28. /// @param[in] sign_type method for computing distance _sign_ (see
  29. /// ../signed_distance.h)
  30. /// @param[out] V #V by 3 list of input mesh vertex positions
  31. /// @param[out] F #F by 3 list of input triangle indices
  32. /// @return true if complex_to_mesh is successful
  33. ///
  34. IGL_INLINE bool signed_distance_isosurface(
  35. const Eigen::MatrixXd & IV,
  36. const Eigen::MatrixXi & IF,
  37. const double level,
  38. const double angle_bound,
  39. const double radius_bound,
  40. const double distance_bound,
  41. const SignedDistanceType sign_type,
  42. Eigen::MatrixXd & V,
  43. Eigen::MatrixXi & F);
  44. }
  45. }
  46. }
  47. #ifndef IGL_STATIC_LIBRARY
  48. # include "signed_distance_isosurface.cpp"
  49. #endif
  50. #endif