signed_distance_isosurface.h 1.7 KB

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