orientable_patches.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 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_ORIENTABLE_PATCHES_H
  9. #define IGL_ORIENTABLE_PATCHES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <Eigen/Sparse>
  13. namespace igl
  14. {
  15. /// Compute connected components of facets connected by manifold edges.
  16. ///
  17. /// @param[in] F #F by simplex-size list of facets
  18. /// @param[out] C #F list of component ids
  19. /// @param[out] A #F by #F adjacency matrix
  20. ///
  21. /// \bug This will detect a moebius strip as a single patch (manifold,
  22. /// non-orientable) and also non-manfiold, yet orientable patches. So the
  23. /// _name_ of this function is inappropriate.
  24. template <typename DerivedF, typename DerivedC, typename AScalar>
  25. IGL_INLINE void orientable_patches(
  26. const Eigen::MatrixBase<DerivedF> & F,
  27. Eigen::PlainObjectBase<DerivedC> & C,
  28. Eigen::SparseMatrix<AScalar> & A);
  29. /// \overload
  30. template <typename DerivedF, typename DerivedC>
  31. IGL_INLINE void orientable_patches(
  32. const Eigen::MatrixBase<DerivedF> & F,
  33. Eigen::PlainObjectBase<DerivedC> & C);
  34. };
  35. #ifndef IGL_STATIC_LIBRARY
  36. # include "orientable_patches.cpp"
  37. #endif
  38. #endif