1 /// @ref gtx_matrix_query 2 /// @file glm/gtx/matrix_query.hpp 3 /// 4 /// @see core (dependence) 5 /// @see gtx_vector_query (dependence) 6 /// 7 /// @defgroup gtx_matrix_query GLM_GTX_matrix_query 8 /// @ingroup gtx 9 /// 10 /// @brief Query to evaluate matrix properties 11 /// 12 /// <glm/gtx/matrix_query.hpp> need to be included to use these functionalities. 13 14 #pragma once 15 16 // Dependency: 17 #include "../glm.hpp" 18 #include "../gtx/vector_query.hpp" 19 #include <limits> 20 21 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 22 # pragma message("GLM: GLM_GTX_matrix_query extension included") 23 #endif 24 25 namespace glm 26 { 27 /// @addtogroup gtx_matrix_query 28 /// @{ 29 30 /// Return whether a matrix a null matrix. 31 /// From GLM_GTX_matrix_query extension. 32 template<typename T, precision P> 33 GLM_FUNC_DECL bool isNull(tmat2x2<T, P> const & m, T const & epsilon); 34 35 /// Return whether a matrix a null matrix. 36 /// From GLM_GTX_matrix_query extension. 37 template<typename T, precision P> 38 GLM_FUNC_DECL bool isNull(tmat3x3<T, P> const & m, T const & epsilon); 39 40 /// Return whether a matrix is a null matrix. 41 /// From GLM_GTX_matrix_query extension. 42 template<typename T, precision P> 43 GLM_FUNC_DECL bool isNull(tmat4x4<T, P> const & m, T const & epsilon); 44 45 /// Return whether a matrix is an identity matrix. 46 /// From GLM_GTX_matrix_query extension. 47 template<typename T, precision P, template <typename, precision> class matType> 48 GLM_FUNC_DECL bool isIdentity(matType<T, P> const & m, T const & epsilon); 49 50 /// Return whether a matrix is a normalized matrix. 51 /// From GLM_GTX_matrix_query extension. 52 template<typename T, precision P> 53 GLM_FUNC_DECL bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon); 54 55 /// Return whether a matrix is a normalized matrix. 56 /// From GLM_GTX_matrix_query extension. 57 template<typename T, precision P> 58 GLM_FUNC_DECL bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon); 59 60 /// Return whether a matrix is a normalized matrix. 61 /// From GLM_GTX_matrix_query extension. 62 template<typename T, precision P> 63 GLM_FUNC_DECL bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon); 64 65 /// Return whether a matrix is an orthonormalized matrix. 66 /// From GLM_GTX_matrix_query extension. 67 template<typename T, precision P, template <typename, precision> class matType> 68 GLM_FUNC_DECL bool isOrthogonal(matType<T, P> const & m, T const & epsilon); 69 70 /// @} 71 }//namespace glm 72 73 #include "matrix_query.inl" 74