Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
2.0KB

  1. /// @ref gtx_matrix_interpolation
  2. /// @file glm/gtx/matrix_interpolation.hpp
  3. /// @author Ghenadii Ursachi (the.asteroth@gmail.com)
  4. ///
  5. /// @see core (dependence)
  6. ///
  7. /// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation
  8. /// @ingroup gtx
  9. ///
  10. /// Include <glm/gtx/matrix_interpolation.hpp> to use the features of this extension.
  11. ///
  12. /// Allows to directly interpolate two matrices.
  13. #pragma once
  14. // Dependency:
  15. #include "../glm.hpp"
  16. #ifndef GLM_ENABLE_EXPERIMENTAL
  17. # error "GLM: GLM_GTX_matrix_interpolation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
  18. #endif
  19. #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
  20. # pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
  21. #endif
  22. namespace glm
  23. {
  24. /// @addtogroup gtx_matrix_interpolation
  25. /// @{
  26. /// Get the axis and angle of the rotation from a matrix.
  27. /// From GLM_GTX_matrix_interpolation extension.
  28. template<typename T, qualifier Q>
  29. GLM_FUNC_DECL void axisAngle(
  30. mat<4, 4, T, Q> const& mat,
  31. vec<3, T, Q> & axis,
  32. T & angle);
  33. /// Build a matrix from axis and angle.
  34. /// From GLM_GTX_matrix_interpolation extension.
  35. template<typename T, qualifier Q>
  36. GLM_FUNC_DECL mat<4, 4, T, Q> axisAngleMatrix(
  37. vec<3, T, Q> const& axis,
  38. T const angle);
  39. /// Extracts the rotation part of a matrix.
  40. /// From GLM_GTX_matrix_interpolation extension.
  41. template<typename T, qualifier Q>
  42. GLM_FUNC_DECL mat<4, 4, T, Q> extractMatrixRotation(
  43. mat<4, 4, T, Q> const& mat);
  44. /// Build a interpolation of 4 * 4 matrixes.
  45. /// From GLM_GTX_matrix_interpolation extension.
  46. /// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
  47. template<typename T, qualifier Q>
  48. GLM_FUNC_DECL mat<4, 4, T, Q> interpolate(
  49. mat<4, 4, T, Q> const& m1,
  50. mat<4, 4, T, Q> const& m2,
  51. T const delta);
  52. /// @}
  53. }//namespace glm
  54. #include "matrix_interpolation.inl"