compute_frame_field_bisectors.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. /// \bug `V` and `F` are not used. If this function is actually being used we
  26. /// should remove `V` and `F` here.
  27. template <typename DerivedV, typename DerivedF>
  28. IGL_INLINE void compute_frame_field_bisectors(
  29. const Eigen::MatrixBase<DerivedV>& V,
  30. const Eigen::MatrixBase<DerivedF>& F,
  31. const Eigen::MatrixBase<DerivedV>& B1,
  32. const Eigen::MatrixBase<DerivedV>& B2,
  33. const Eigen::MatrixBase<DerivedV>& PD1,
  34. const Eigen::MatrixBase<DerivedV>& PD2,
  35. Eigen::PlainObjectBase<DerivedV>& BIS1,
  36. Eigen::PlainObjectBase<DerivedV>& BIS2);
  37. /// \overload
  38. template <typename DerivedV, typename DerivedF>
  39. IGL_INLINE void compute_frame_field_bisectors(
  40. const Eigen::MatrixBase<DerivedV>& V,
  41. const Eigen::MatrixBase<DerivedF>& F,
  42. const Eigen::MatrixBase<DerivedV>& PD1,
  43. const Eigen::MatrixBase<DerivedV>& PD2,
  44. Eigen::PlainObjectBase<DerivedV>& BIS1,
  45. Eigen::PlainObjectBase<DerivedV>& BIS2);
  46. }
  47. #ifndef IGL_STATIC_LIBRARY
  48. # include "compute_frame_field_bisectors.cpp"
  49. #endif
  50. #endif