master
ブランチ master
ShaderPlayground / deps / glm / glm / gtx / matrix_query.hpp
2.7 KB、77行 生 Blame 履歴
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/// Include <glm/gtx/matrix_query.hpp> to use the features of this extension.
11///
12/// Query to evaluate matrix properties
13
14#pragma once
15
16// Dependency:
17#include "../glm.hpp"
18#include "../gtx/vector_query.hpp"
19#include <limits>
20
21#ifndef GLM_ENABLE_EXPERIMENTAL
22# error "GLM: GLM_GTX_matrix_query 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."
23#endif
24
25#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26# pragma message("GLM: GLM_GTX_matrix_query extension included")
27#endif
28
29namespace glm
30{
31 /// @addtogroup gtx_matrix_query
32 /// @{
33
34 /// Return whether a matrix a null matrix.
35 /// From GLM_GTX_matrix_query extension.
36 template<typename T, qualifier Q>
37 GLM_FUNC_DECL bool isNull(mat<2, 2, T, Q> const& m, T const& epsilon);
38
39 /// Return whether a matrix a null matrix.
40 /// From GLM_GTX_matrix_query extension.
41 template<typename T, qualifier Q>
42 GLM_FUNC_DECL bool isNull(mat<3, 3, T, Q> const& m, T const& epsilon);
43
44 /// Return whether a matrix is a null matrix.
45 /// From GLM_GTX_matrix_query extension.
46 template<typename T, qualifier Q>
47 GLM_FUNC_DECL bool isNull(mat<4, 4, T, Q> const& m, T const& epsilon);
48
49 /// Return whether a matrix is an identity matrix.
50 /// From GLM_GTX_matrix_query extension.
51 template<length_t C, length_t R, typename T, qualifier Q, template<length_t, length_t, typename, qualifier> class matType>
52 GLM_FUNC_DECL bool isIdentity(matType<C, R, T, Q> const& m, T const& epsilon);
53
54 /// Return whether a matrix is a normalized matrix.
55 /// From GLM_GTX_matrix_query extension.
56 template<typename T, qualifier Q>
57 GLM_FUNC_DECL bool isNormalized(mat<2, 2, T, Q> const& m, T const& epsilon);
58
59 /// Return whether a matrix is a normalized matrix.
60 /// From GLM_GTX_matrix_query extension.
61 template<typename T, qualifier Q>
62 GLM_FUNC_DECL bool isNormalized(mat<3, 3, T, Q> const& m, T const& epsilon);
63
64 /// Return whether a matrix is a normalized matrix.
65 /// From GLM_GTX_matrix_query extension.
66 template<typename T, qualifier Q>
67 GLM_FUNC_DECL bool isNormalized(mat<4, 4, T, Q> const& m, T const& epsilon);
68
69 /// Return whether a matrix is an orthonormalized matrix.
70 /// From GLM_GTX_matrix_query extension.
71 template<length_t C, length_t R, typename T, qualifier Q, template<length_t, length_t, typename, qualifier> class matType>
72 GLM_FUNC_DECL bool isOrthogonal(matType<C, R, T, Q> const& m, T const& epsilon);
73
74 /// @}
75}//namespace glm
76
77#include "matrix_query.inl"