signed_angle.h 716 B

1234567891011121314151617181920212223242526
  1. #ifndef IGL_SIGNED_ANGLE_H
  2. #define IGL_SIGNED_ANGLE_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. namespace igl
  6. {
  7. /// Compute the signed angle subtended by the oriented 3d triangle (A,B,C) at some point P
  8. ///
  9. /// @param[in] A 2D position of corner
  10. /// @param[in] B 2D position of corner
  11. /// @param[in] P 2D position of query point
  12. /// @return signed angle
  13. template <
  14. typename DerivedA,
  15. typename DerivedB,
  16. typename DerivedP>
  17. IGL_INLINE typename DerivedA::Scalar signed_angle(
  18. const Eigen::MatrixBase<DerivedA> & A,
  19. const Eigen::MatrixBase<DerivedB> & B,
  20. const Eigen::MatrixBase<DerivedP> & P);
  21. }
  22. #ifndef IGL_STATIC_LIBRARY
  23. # include "signed_angle.cpp"
  24. #endif
  25. #endif