quat_mult.h 574 B

1234567891011121314151617181920212223242526
  1. #ifndef IGL_QUAT_MULT_H
  2. #define IGL_QUAT_MULT_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Computes out = q1 * q2 with quaternion multiplication
  7. // A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w),
  8. // such that q = x*i + y*j + z*k + w
  9. // Inputs:
  10. // q1 left quaternion
  11. // q2 right quaternion
  12. // Outputs:
  13. // out result of multiplication
  14. template <typename Q_type>
  15. IGL_INLINE void quat_mult(
  16. const Q_type *q1,
  17. const Q_type *q2,
  18. Q_type *out);
  19. };
  20. #ifdef IGL_HEADER_ONLY
  21. # include "quat_mult.cpp"
  22. #endif
  23. #endif