progressive_hulls.cpp 860 B

1234567891011121314151617181920212223242526272829
  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. Eigen::VectorXi & J)
  19. {
  20. int m = F.rows();
  21. return decimate(
  22. V,
  23. F,
  24. progressive_hulls_cost_and_placement,
  25. max_faces_stopping_condition(m,max_m),
  26. U,
  27. G,
  28. J);
  29. }