progressive_hulls.cpp 830 B

123456789101112131415161718192021222324252627
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 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. #include "progressive_hulls.h"
  9. #include "progressive_hulls_cost_and_placement.h"
  10. #include "../decimate.h"
  11. #include "../max_faces_stopping_condition.h"
  12. IGL_INLINE bool igl::copyleft::progressive_hulls(
  13. const Eigen::MatrixXd & V,
  14. const Eigen::MatrixXi & F,
  15. const size_t max_m,
  16. Eigen::MatrixXd & U,
  17. Eigen::MatrixXi & G)
  18. {
  19. int m = F.rows();
  20. return decimate(
  21. V,
  22. F,
  23. progressive_hulls_cost_and_placement,
  24. max_faces_stopping_condition(m,max_m),
  25. U,
  26. G);
  27. }