master
ブランチ master
VulkanExample / dep / include / glm / gtx / matrix_operation.hpp
3.1 KB、101行 生 Blame 履歴
1/// @ref gtx_matrix_operation
2/// @file glm/gtx/matrix_operation.hpp
3///
4/// @see core (dependence)
5///
6/// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation
7/// @ingroup gtx
8///
9/// Include <glm/gtx/matrix_operation.hpp> to use the features of this extension.
10///
11/// Build diagonal matrices from vectors.
12
13#pragma once
14
15// Dependency:
16#include "../glm.hpp"
17
18#ifndef GLM_ENABLE_EXPERIMENTAL
19# error "GLM: GLM_GTX_matrix_operation 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."
20#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21# pragma message("GLM: GLM_GTX_matrix_operation extension included")
22#endif
23
24namespace glm
25{
26 /// @addtogroup gtx_matrix_operation
27 /// @{
28
29 //! Build a diagonal matrix.
30 //! From GLM_GTX_matrix_operation extension.
31 template<typename T, qualifier Q>
32 GLM_FUNC_DECL mat<2, 2, T, Q> diagonal2x2(
33 vec<2, T, Q> const& v);
34
35 //! Build a diagonal matrix.
36 //! From GLM_GTX_matrix_operation extension.
37 template<typename T, qualifier Q>
38 GLM_FUNC_DECL mat<2, 3, T, Q> diagonal2x3(
39 vec<2, T, Q> const& v);
40
41 //! Build a diagonal matrix.
42 //! From GLM_GTX_matrix_operation extension.
43 template<typename T, qualifier Q>
44 GLM_FUNC_DECL mat<2, 4, T, Q> diagonal2x4(
45 vec<2, T, Q> const& v);
46
47 //! Build a diagonal matrix.
48 //! From GLM_GTX_matrix_operation extension.
49 template<typename T, qualifier Q>
50 GLM_FUNC_DECL mat<3, 2, T, Q> diagonal3x2(
51 vec<2, T, Q> const& v);
52
53 //! Build a diagonal matrix.
54 //! From GLM_GTX_matrix_operation extension.
55 template<typename T, qualifier Q>
56 GLM_FUNC_DECL mat<3, 3, T, Q> diagonal3x3(
57 vec<3, T, Q> const& v);
58
59 //! Build a diagonal matrix.
60 //! From GLM_GTX_matrix_operation extension.
61 template<typename T, qualifier Q>
62 GLM_FUNC_DECL mat<3, 4, T, Q> diagonal3x4(
63 vec<3, T, Q> const& v);
64
65 //! Build a diagonal matrix.
66 //! From GLM_GTX_matrix_operation extension.
67 template<typename T, qualifier Q>
68 GLM_FUNC_DECL mat<4, 2, T, Q> diagonal4x2(
69 vec<2, T, Q> const& v);
70
71 //! Build a diagonal matrix.
72 //! From GLM_GTX_matrix_operation extension.
73 template<typename T, qualifier Q>
74 GLM_FUNC_DECL mat<4, 3, T, Q> diagonal4x3(
75 vec<3, T, Q> const& v);
76
77 //! Build a diagonal matrix.
78 //! From GLM_GTX_matrix_operation extension.
79 template<typename T, qualifier Q>
80 GLM_FUNC_DECL mat<4, 4, T, Q> diagonal4x4(
81 vec<4, T, Q> const& v);
82
83 /// Build an adjugate matrix.
84 /// From GLM_GTX_matrix_operation extension.
85 template<typename T, qualifier Q>
86 GLM_FUNC_DECL mat<2, 2, T, Q> adjugate(mat<2, 2, T, Q> const& m);
87
88 /// Build an adjugate matrix.
89 /// From GLM_GTX_matrix_operation extension.
90 template<typename T, qualifier Q>
91 GLM_FUNC_DECL mat<3, 3, T, Q> adjugate(mat<3, 3, T, Q> const& m);
92
93 /// Build an adjugate matrix.
94 /// From GLM_GTX_matrix_operation extension.
95 template<typename T, qualifier Q>
96 GLM_FUNC_DECL mat<4, 4, T, Q> adjugate(mat<4, 4, T, Q> const& m);
97
98 /// @}
99}//namespace glm
100
101#include "matrix_operation.inl"