smooth_corner_adjacency.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef IGL_SMOOTH_CORNER_ADJACENCY_H
  2. #define IGL_SMOOTH_CORNER_ADJACENCY_H
  3. #include <Eigen/Core>
  4. #include "igl_inline.h"
  5. namespace igl
  6. {
  7. /// Determine the corner-to-face adjacency relationship that can be used for
  8. /// computing crease-aware per-corner normals.
  9. ///
  10. /// @param[in] V #V by 3 list of mesh vertex positions
  11. /// @param[in] F #F by 3 list of triangle mesh indices into rows of V
  12. /// @param[in] corner_threshold_radians dihedral angle considered non-smooth (in
  13. /// radians)
  14. /// @param[out] CI #CI list of face neighbors as indices into rows of F
  15. /// @param[out] CC 3*#F+1 list of cumulative sizes so that CC(i*3+j+1) - CC(i*3+j) is
  16. /// the number of faces considered smoothly incident on corner at F(i,j)
  17. void smooth_corner_adjacency(
  18. const Eigen::MatrixXd & V,
  19. const Eigen::MatrixXi & F,
  20. const double corner_threshold_radians,
  21. Eigen::VectorXi & CI,
  22. Eigen::VectorXi & CC);
  23. /// Determine the effective corner-to-face adjacency relationship implied by a
  24. /// set of indexed vertex positions (FV) and normals (FV) (e.g., those read in
  25. /// from a .obj file).
  26. ///
  27. /// @param[in] FV #F by 3 list of triangle mesh indices into rows of some V
  28. /// @param[in] FN #F by 3 list of triangle mesh indices into rows of some N
  29. /// @param[out] CI #CI list of face neighbors as indices into rows of F
  30. /// @param[out] CC 3*#F+1 list of cumulative sizes so that CC(i*3+j+1) - CC(i*3+j) is
  31. /// the number of faces considered smoothly incident on corner at F(i,j)
  32. void smooth_corner_adjacency(
  33. const Eigen::MatrixXi & FV,
  34. const Eigen::MatrixXi & FN,
  35. Eigen::VectorXi & CI,
  36. Eigen::VectorXi & CC);
  37. }
  38. #ifndef IGL_STATIC_LIBRARY
  39. # include "smooth_corner_adjacency.cpp"
  40. #endif
  41. #endif