signed_angle.h 698 B

123456789101112131415161718192021222324252627
  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. // Inputs:
  10. // A 2D position of corner
  11. // B 2D position of corner
  12. // P 2D position of query point
  13. // returns signed angle
  14. template <
  15. typename DerivedA,
  16. typename DerivedB,
  17. typename DerivedP>
  18. IGL_INLINE typename DerivedA::Scalar signed_angle(
  19. const Eigen::MatrixBase<DerivedA> & A,
  20. const Eigen::MatrixBase<DerivedB> & B,
  21. const Eigen::MatrixBase<DerivedP> & P);
  22. }
  23. #ifndef IGL_STATIC_LIBRARY
  24. # include "signed_angle.cpp"
  25. #endif
  26. #endif