find_cross_field_singularities.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef IGL_FIND_CROSS_FIELD_SINGULARITIES_H
  2. #define IGL_FIND_CROSS_FIELD_SINGULARITIES_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. //todo
  8. // Creates a quad mesh from a triangular mesh and a set of two directions
  9. // per face, using the algorithm described in the paper
  10. // "Mixed-Integer Quadrangulation" by D. Bommes, H. Zimmer, L. Kobbelt
  11. // ACM SIGGRAPH 2009, Article No. 77 (http://dl.acm.org/citation.cfm?id=1531383)
  12. // Inputs:
  13. // Vin #V by 3 eigen Matrix of mesh vertex 3D positions
  14. // F #F by 4 eigen Matrix of face (quad) indices
  15. // maxIter maximum numbers of iterations
  16. // threshold minimum allowed threshold for non-planarity
  17. // Output:
  18. // Vout #V by 3 eigen Matrix of planar mesh vertex 3D positions
  19. //
  20. template <typename DerivedV, typename DerivedF, typename DerivedM, typename DerivedO>
  21. IGL_INLINE void find_cross_field_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
  22. const Eigen::PlainObjectBase<DerivedF> &F,
  23. const Eigen::PlainObjectBase<DerivedM> &Handle_MMatch,
  24. Eigen::PlainObjectBase<DerivedO> &isSingularity,
  25. Eigen::PlainObjectBase<DerivedO> &singularityIndex);
  26. // TODO: this returns singularity index modulo 4. It may need to be modified to cover indices
  27. template <typename DerivedV, typename DerivedF, typename DerivedO>
  28. IGL_INLINE void find_cross_field_singularities(const Eigen::PlainObjectBase<DerivedV> &V,
  29. const Eigen::PlainObjectBase<DerivedF> &F,
  30. const Eigen::PlainObjectBase<DerivedV> &PD1,
  31. const Eigen::PlainObjectBase<DerivedV> &PD2,
  32. Eigen::PlainObjectBase<DerivedO> &isSingularity,
  33. Eigen::PlainObjectBase<DerivedO> &singularityIndex);
  34. }
  35. #ifdef IGL_HEADER_ONLY
  36. #include "find_cross_field_singularities.cpp"
  37. #endif
  38. #endif