signed_distance_isosurface.h 1.6 KB

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