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 /// @brief Allows to directly interpolate two exiciting matrices. 11 /// 12 /// <glm/gtx/matrix_interpolation.hpp> need to be included to use these functionalities. 13 14 #pragma once 15 16 // Dependency: 17 #include "../glm.hpp" 18 19 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 20 # pragma message("GLM: GLM_GTX_matrix_interpolation extension included") 21 #endif 22 23 namespace glm 24 { 25 /// @addtogroup gtx_matrix_interpolation 26 /// @{ 27 28 /// Get the axis and angle of the rotation from a matrix. 29 /// From GLM_GTX_matrix_interpolation extension. 30 template <typename T, precision P> 31 GLM_FUNC_DECL void axisAngle( 32 tmat4x4<T, P> const & mat, 33 tvec3<T, P> & axis, 34 T & angle); 35 36 /// Build a matrix from axis and angle. 37 /// From GLM_GTX_matrix_interpolation extension. 38 template <typename T, precision P> 39 GLM_FUNC_DECL tmat4x4<T, P> axisAngleMatrix( 40 tvec3<T, P> const & axis, 41 T const angle); 42 43 /// Extracts the rotation part of a matrix. 44 /// From GLM_GTX_matrix_interpolation extension. 45 template <typename T, precision P> 46 GLM_FUNC_DECL tmat4x4<T, P> extractMatrixRotation( 47 tmat4x4<T, P> const & mat); 48 49 /// Build a interpolation of 4 * 4 matrixes. 50 /// From GLM_GTX_matrix_interpolation extension. 51 /// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. 52 template <typename T, precision P> 53 GLM_FUNC_DECL tmat4x4<T, P> interpolate( 54 tmat4x4<T, P> const & m1, 55 tmat4x4<T, P> const & m2, 56 T const delta); 57 58 /// @} 59 }//namespace glm 60 61 #include "matrix_interpolation.inl" 62