frame_to_cross_field.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Daniele Panozzo <[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_FRAME_TO_CROSS_FIELD_H
  9. #define IGL_FRAME_TO_CROSS_FIELD_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. /// Convert a frame field into its closest cross field
  15. ///
  16. /// @param[in] V #V by 3 coordinates of the vertices
  17. /// @param[in] F #F by 3 list of mesh faces (must be triangles)
  18. /// @param[in] FF1 #F by 3 the first representative vector of the frame field (up to permutation and sign)
  19. /// @param[in] FF2 #F by 3 the second representative vector of the frame field (up to permutation and sign)
  20. /// @param[out] X #F by 3 representative vector of the closest cross field
  21. ///
  22. IGL_INLINE void frame_to_cross_field(
  23. const Eigen::MatrixXd& V,
  24. const Eigen::MatrixXi& F,
  25. const Eigen::MatrixXd& FF1,
  26. const Eigen::MatrixXd& FF2,
  27. Eigen::MatrixXd& X);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "frame_to_cross_field.cpp"
  31. #endif
  32. #endif