mat_to_quat.h 468 B

12345678910111213141516171819202122
  1. #ifndef IGL_MAT_TO_QUAT_H
  2. #define IGL_MAT_TO_QUAT_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // Convert a OpenGL (rotation) matrix to a quaternion
  7. //
  8. // Input:
  9. // m 16-element opengl rotation matrix
  10. // Output:
  11. // q 4-element quaternion (not normalized)
  12. template <typename Q_type>
  13. IGL_INLINE void mat4_to_quat(const Q_type * m, Q_type * q);
  14. // TODO: implement for mat3 etc.
  15. }
  16. #ifdef IGL_HEADER_ONLY
  17. # include "mat_to_quat.cpp"
  18. #endif
  19. #endif