signed_distance_isosurface.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 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_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. // SIGNED_DISTANCE_ISOSURFACE Compute the contour of an iso-level of the
  20. // signed distance field to a given mesh.
  21. //
  22. // Inputs:
  23. // IV #IV by 3 list of input mesh vertex positions
  24. // IF #IF by 3 list of input triangle indices
  25. // level iso-level to contour in world coords, negative is inside.
  26. // angle_bound lower bound on triangle angles (mesh quality) (e.g. 28)
  27. // radius_bound upper bound on triangle size (mesh density?) (e.g. 0.02)
  28. // distance_bound cgal mysterious parameter (mesh density?) (e.g. 0.01)
  29. // sign_type method for computing distance _sign_ (see
  30. // ../signed_distance.h)
  31. // Outputs:
  32. // V #V by 3 list of input mesh vertex positions
  33. // F #F by 3 list of input triangle indices
  34. //
  35. IGL_INLINE bool signed_distance_isosurface(
  36. const Eigen::MatrixXd & IV,
  37. const Eigen::MatrixXi & IF,
  38. const double level,
  39. const double angle_bound,
  40. const double radius_bound,
  41. const double distance_bound,
  42. const SignedDistanceType sign_type,
  43. Eigen::MatrixXd & V,
  44. Eigen::MatrixXi & F);
  45. }
  46. }
  47. }
  48. #ifndef IGL_STATIC_LIBRARY
  49. # include "signed_distance_isosurface.cpp"
  50. #endif
  51. #endif