cut_mesh_from_singularities.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  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 (MMatch),
  15. // finds the cut_graph connecting the singularities (seams) and the degree of the singularities
  16. // 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. // seams: #F by 3 list of per corner booleans that denotes if an edge is a seam or not
  23. //
  24. template <typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedO>
  25. IGL_INLINE void cut_mesh_from_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
  26. const Eigen::PlainObjectBase<DerivedF> &F,
  27. const Eigen::PlainObjectBase<DerivedM> &MMatch,
  28. Eigen::PlainObjectBase<DerivedO> &seams);
  29. }
  30. #ifndef IGL_STATIC_LIBRARY
  31. #include "cut_mesh_from_singularities.cpp"
  32. #endif
  33. #endif