frame_to_cross_field.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Daniele Panozzo <daniele.panozzo@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_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. // Inputs:
  16. // V #V by 3 coordinates of the vertices
  17. // F #F by 3 list of mesh faces (must be triangles)
  18. // FF1 #F by 3 the first representative vector of the frame field (up to permutation and sign)
  19. // FF2 #F by 3 the second representative vector of the frame field (up to permutation and sign)
  20. //
  21. // Outputs:
  22. // X #F by 3 representative vector of the closest cross field
  23. //
  24. IGL_INLINE void frame_to_cross_field(
  25. const Eigen::MatrixXd& V,
  26. const Eigen::MatrixXi& F,
  27. const Eigen::MatrixXd& FF1,
  28. const Eigen::MatrixXd& FF2,
  29. Eigen::MatrixXd& X);
  30. }
  31. #ifndef IGL_STATIC_LIBRARY
  32. # include "frame_to_cross_field.cpp"
  33. #endif
  34. #endif