signed_distance_isosurface.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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/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 signed_distance.h)
  26. // Outputs:
  27. // V #V by 3 list of input mesh vertex positions
  28. // F #F by 3 list of input triangle indices
  29. //
  30. IGL_INLINE bool signed_distance_isosurface(
  31. const Eigen::MatrixXd & IV,
  32. const Eigen::MatrixXi & IF,
  33. const double level,
  34. const double angle_bound,
  35. const double radius_bound,
  36. const double distance_bound,
  37. const SignedDistanceType sign_type,
  38. Eigen::MatrixXd & V,
  39. Eigen::MatrixXi & F);
  40. }
  41. #ifndef IGL_STATIC_LIBRARY
  42. # include "signed_distance_isosurface.cpp"
  43. #endif
  44. #endif