infinite_cost_stopping_condition.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 Alec Jacobson <[email protected]>
  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_INFINITE_COST_STOPPING_CONDITION_H
  9. #define IGL_INFINITE_COST_STOPPING_CONDITION_H
  10. #include "igl_inline.h"
  11. #include "decimate_callback_types.h"
  12. #include <Eigen/Core>
  13. #include <vector>
  14. #include <set>
  15. #include <functional>
  16. namespace igl
  17. {
  18. /// Stopping condition function compatible with igl::decimate. The output
  19. /// function handle will return true if cost of next edge is infinite.
  20. ///
  21. /// @param[in] cost_and_placement handle being used by igl::collapse_edge
  22. /// @param[out] stopping_condition
  23. ///
  24. IGL_INLINE void infinite_cost_stopping_condition(
  25. const decimate_cost_and_placement_callback & cost_and_placement,
  26. decimate_stopping_condition_callback & stopping_condition);
  27. /// \overload
  28. IGL_INLINE decimate_stopping_condition_callback
  29. infinite_cost_stopping_condition(
  30. const decimate_cost_and_placement_callback & cost_and_placement);
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "infinite_cost_stopping_condition.cpp"
  34. #endif
  35. #endif