compute_frame_field_bisectors.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Daniele Panozzo <[email protected]>, Olga Diamanti <[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_COMPUTE_FRAME_FIELD_BISECTORS_H
  9. #define IGL_COMPUTE_FRAME_FIELD_BISECTORS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. /// Compute bisectors of a frame field defined on mesh faces
  15. ///
  16. /// @param[in] V #V by 3 eigen Matrix of mesh vertex 3D positions
  17. /// @param[in] F #F by 3 eigen Matrix of face (triangle) indices
  18. /// @param[in] B1 #F by 3 eigen Matrix of face (triangle) base vector 1
  19. /// @param[in] B2 #F by 3 eigen Matrix of face (triangle) base vector 2
  20. /// @param[in] PD1 #F by 3 eigen Matrix of the first per face frame field vector
  21. /// @param[in] PD2 #F by 3 eigen Matrix of the second per face frame field vector
  22. /// @param[out] BIS1 #F by 3 eigen Matrix of the first per face frame field bisector
  23. /// @param[out] BIS2 #F by 3 eigen Matrix of the second per face frame field bisector
  24. ///
  25. template <typename DerivedV, typename DerivedF>
  26. IGL_INLINE void compute_frame_field_bisectors(
  27. const Eigen::MatrixBase<DerivedV>& V,
  28. const Eigen::MatrixBase<DerivedF>& F,
  29. const Eigen::MatrixBase<DerivedV>& B1,
  30. const Eigen::MatrixBase<DerivedV>& B2,
  31. const Eigen::MatrixBase<DerivedV>& PD1,
  32. const Eigen::MatrixBase<DerivedV>& PD2,
  33. Eigen::PlainObjectBase<DerivedV>& BIS1,
  34. Eigen::PlainObjectBase<DerivedV>& BIS2);
  35. /// \overload
  36. template <typename DerivedV, typename DerivedF>
  37. IGL_INLINE void compute_frame_field_bisectors(
  38. const Eigen::MatrixBase<DerivedV>& V,
  39. const Eigen::MatrixBase<DerivedF>& F,
  40. const Eigen::MatrixBase<DerivedV>& PD1,
  41. const Eigen::MatrixBase<DerivedV>& PD2,
  42. Eigen::PlainObjectBase<DerivedV>& BIS1,
  43. Eigen::PlainObjectBase<DerivedV>& BIS2);
  44. }
  45. #ifndef IGL_STATIC_LIBRARY
  46. # include "compute_frame_field_bisectors.cpp"
  47. #endif
  48. #endif