compute_frame_field_bisectors.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef IGL_COMPUTE_FRAME_FIELD_BISECTORS_H
  2. #define IGL_COMPUTE_FRAME_FIELD_BISECTORS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // Compute face normals via vertex position list, face list
  8. // Inputs:
  9. // V #V by 3 eigen Matrix of mesh vertex 3D positions
  10. // F #F by 3 eigen Matrix of face (triangle) indices
  11. // B1 #F by 3 eigen Matrix of face (triangle) base vector 1
  12. // B2 #F by 3 eigen Matrix of face (triangle) base vector 2
  13. // PD1 #F by 3 eigen Matrix of the first per face frame field vector
  14. // PD2 #F by 3 eigen Matrix of the second per face frame field vector
  15. // Output:
  16. // BIS1 #F by 3 eigen Matrix of the first per face frame field bisector
  17. // BIS2 #F by 3 eigen Matrix of the second per face frame field bisector
  18. //
  19. template <typename DerivedV, typename DerivedF>
  20. IGL_INLINE void compute_frame_field_bisectors(
  21. const Eigen::PlainObjectBase<DerivedV>& V,
  22. const Eigen::PlainObjectBase<DerivedF>& F,
  23. const Eigen::PlainObjectBase<DerivedV>& B1,
  24. const Eigen::PlainObjectBase<DerivedV>& B2,
  25. const Eigen::PlainObjectBase<DerivedV>& PD1,
  26. const Eigen::PlainObjectBase<DerivedV>& PD2,
  27. Eigen::PlainObjectBase<DerivedV>& BIS1,
  28. Eigen::PlainObjectBase<DerivedV>& BIS2);
  29. // Wrapper without given basis vectors.
  30. template <typename DerivedV, typename DerivedF>
  31. IGL_INLINE void compute_frame_field_bisectors(
  32. const Eigen::PlainObjectBase<DerivedV>& V,
  33. const Eigen::PlainObjectBase<DerivedF>& F,
  34. const Eigen::PlainObjectBase<DerivedV>& PD1,
  35. const Eigen::PlainObjectBase<DerivedV>& PD2,
  36. Eigen::PlainObjectBase<DerivedV>& BIS1,
  37. Eigen::PlainObjectBase<DerivedV>& BIS2);
  38. }
  39. #ifdef IGL_HEADER_ONLY
  40. # include "compute_frame_field_bisectors.cpp"
  41. #endif
  42. #endif