fast_find_self_intersections.cpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2022 Vladimir S. FONOV <[email protected]>
  4. // Copyright (C) 2023 Alec Jacobson <[email protected]>
  5. //
  6. // This Source Code Form is subject to the terms of the Mozilla Public License
  7. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  8. // obtain one at http://mozilla.org/MPL/2.0/
  9. #include "fast_find_self_intersections.h"
  10. #include "fast_find_intersections.h"
  11. template <
  12. typename DerivedV,
  13. typename DerivedF,
  14. typename DerivedIF,
  15. typename DerivedEV,
  16. typename DerivedEE,
  17. typename DerivedEI>
  18. IGL_INLINE bool igl::fast_find_self_intersections(
  19. const Eigen::MatrixBase<DerivedV> & V,
  20. const Eigen::MatrixBase<DerivedF> & F,
  21. const bool detect_only,
  22. const bool first_only,
  23. Eigen::PlainObjectBase<DerivedIF> & IF,
  24. Eigen::PlainObjectBase<DerivedEV> & EV,
  25. Eigen::PlainObjectBase<DerivedEE> & EE,
  26. Eigen::PlainObjectBase<DerivedEI> & EI)
  27. {
  28. // This is really just a wrapper around fast_find_intersections which will
  29. // internally detect that V,F are the second set
  30. return igl::fast_find_intersections(
  31. V,F,V,F,detect_only,first_only,IF,EV,EE,EI);
  32. }
  33. #ifdef IGL_STATIC_LIBRARY
  34. // Explicit template instantiation
  35. // generated by autoexplicit.sh
  36. template bool igl::fast_find_self_intersections<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, bool, bool, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
  37. #endif