matrix_query.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #pragma once
  14. // Dependency:
  15. #include "../glm.hpp"
  16. #include "../gtx/vector_query.hpp"
  17. #include <limits>
  18. #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
  19. # pragma message("GLM: GLM_GTX_matrix_query extension included")
  20. #endif
  21. namespace glm
  22. {
  23. /// @addtogroup gtx_matrix_query
  24. /// @{
  25. /// Return whether a matrix a null matrix.
  26. /// From GLM_GTX_matrix_query extension.
  27. template<typename T, precision P>
  28. GLM_FUNC_DECL bool isNull(tmat2x2<T, P> const & m, T const & epsilon);
  29. /// Return whether a matrix a null matrix.
  30. /// From GLM_GTX_matrix_query extension.
  31. template<typename T, precision P>
  32. GLM_FUNC_DECL bool isNull(tmat3x3<T, P> const & m, T const & epsilon);
  33. /// Return whether a matrix is a null matrix.
  34. /// From GLM_GTX_matrix_query extension.
  35. template<typename T, precision P>
  36. GLM_FUNC_DECL bool isNull(tmat4x4<T, P> const & m, T const & epsilon);
  37. /// Return whether a matrix is an identity matrix.
  38. /// From GLM_GTX_matrix_query extension.
  39. template<typename T, precision P, template <typename, precision> class matType>
  40. GLM_FUNC_DECL bool isIdentity(matType<T, P> const & m, T const & epsilon);
  41. /// Return whether a matrix is a normalized matrix.
  42. /// From GLM_GTX_matrix_query extension.
  43. template<typename T, precision P>
  44. GLM_FUNC_DECL bool isNormalized(tmat2x2<T, P> const & m, T const & epsilon);
  45. /// Return whether a matrix is a normalized matrix.
  46. /// From GLM_GTX_matrix_query extension.
  47. template<typename T, precision P>
  48. GLM_FUNC_DECL bool isNormalized(tmat3x3<T, P> const & m, T const & epsilon);
  49. /// Return whether a matrix is a normalized matrix.
  50. /// From GLM_GTX_matrix_query extension.
  51. template<typename T, precision P>
  52. GLM_FUNC_DECL bool isNormalized(tmat4x4<T, P> const & m, T const & epsilon);
  53. /// Return whether a matrix is an orthonormalized matrix.
  54. /// From GLM_GTX_matrix_query extension.
  55. template<typename T, precision P, template <typename, precision> class matType>
  56. GLM_FUNC_DECL bool isOrthogonal(matType<T, P> const & m, T const & epsilon);
  57. /// @}
  58. }//namespace glm
  59. #include "matrix_query.inl"