1 /// @ref gtx_transform 2 /// @file glm/gtx/transform.hpp 3 /// 4 /// @see core (dependence) 5 /// @see gtc_matrix_transform (dependence) 6 /// @see gtx_transform 7 /// @see gtx_transform2 8 /// 9 /// @defgroup gtx_transform GLM_GTX_transform 10 /// @ingroup gtx 11 /// 12 /// @brief Add transformation matrices 13 /// 14 /// <glm/gtx/transform.hpp> need to be included to use these functionalities. 15 16 #pragma once 17 18 // Dependency: 19 #include "../glm.hpp" 20 #include "../gtc/matrix_transform.hpp" 21 22 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 # pragma message("GLM: GLM_GTX_transform extension included") 24 #endif 25 26 namespace glm 27 { 28 /// @addtogroup gtx_transform 29 /// @{ 30 31 /// Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. 32 /// @see gtc_matrix_transform 33 /// @see gtx_transform 34 template <typename T, precision P> 35 GLM_FUNC_DECL tmat4x4<T, P> translate( 36 tvec3<T, P> const & v); 37 38 /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians. 39 /// @see gtc_matrix_transform 40 /// @see gtx_transform 41 template <typename T, precision P> 42 GLM_FUNC_DECL tmat4x4<T, P> rotate( 43 T angle, 44 tvec3<T, P> const & v); 45 46 /// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. 47 /// @see gtc_matrix_transform 48 /// @see gtx_transform 49 template <typename T, precision P> 50 GLM_FUNC_DECL tmat4x4<T, P> scale( 51 tvec3<T, P> const & v); 52 53 /// @} 54 }// namespace glm 55 56 #include "transform.inl" 57