cut_mesh_from_singularities.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@gmail.com>, Olga Diamanti <olga.diam@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. #ifndef IGL_CUT_MESH_FROM_SINGULARITIES_H
  9. #define IGL_CUT_MESH_FROM_SINGULARITIES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Given a mesh (V,F) and the integer mismatch of a cross field per edge
  15. // (MMatch), finds the cut_graph connecting the singularities (seams) and the
  16. // degree of the singularities singularity_index
  17. //
  18. // Input:
  19. // V #V by 3 list of mesh vertex positions
  20. // F #F by 3 list of faces
  21. // MMatch #F by 3 list of per corner integer mismatch
  22. // Outputs:
  23. // seams #F by 3 list of per corner booleans that denotes if an edge is a
  24. // seam or not
  25. //
  26. template <
  27. typename DerivedV,
  28. typename DerivedF,
  29. typename DerivedM,
  30. typename DerivedO>
  31. IGL_INLINE void cut_mesh_from_singularities(
  32. const Eigen::PlainObjectBase<DerivedV> &V,
  33. const Eigen::PlainObjectBase<DerivedF> &F,
  34. const Eigen::PlainObjectBase<DerivedM> &MMatch,
  35. Eigen::PlainObjectBase<DerivedO> &seams);
  36. }
  37. #ifndef IGL_STATIC_LIBRARY
  38. #include "cut_mesh_from_singularities.cpp"
  39. #endif
  40. #endif