quat_to_mat.h 601 B

1234567891011121314151617181920212223
  1. #ifndef IGL_QUAT_TO_MAT_H
  2. #define IGL_QUAT_TO_MAT_H
  3. #include "igl_inline.h"
  4. // Name history:
  5. // quat2mat until 16 Sept 2011
  6. namespace igl
  7. {
  8. // Convert a quaternion to a 4x4 matrix
  9. // A Quaternion, q, is defined here as an arrays of four scalars (x,y,z,w),
  10. // such that q = x*i + y*j + z*k + w
  11. // Input:
  12. // quat pointer to four elements of quaternion (x,y,z,w)
  13. // Output:
  14. // mat pointer to 16 elements of matrix
  15. template <typename Q_type>
  16. IGL_INLINE void quat_to_mat(const Q_type * quat, Q_type * mat);
  17. }
  18. #ifdef IGL_HEADER_ONLY
  19. # include "quat_to_mat.cpp"
  20. #endif
  21. #endif