glsl_layout/
mat.rs

1use crate::vec::{
2    bvec2, bvec3, bvec4, dvec2, dvec3, dvec4, ivec2, ivec3, ivec4, uvec2, uvec3, uvec4, vec2, vec3,
3    vec4,
4};
5
6use crate::array::{Array, Element};
7
8/// Matrix of 2 x 2 boolean values.
9pub type bmat2x2 = Array<bvec2, [Element<bvec2>; 2]>;
10
11/// Matrix of 2 x 3 boolean values.
12pub type bmat2x3 = Array<bvec3, [Element<bvec3>; 2]>;
13
14/// Matrix of 2 x 4 boolean values.
15pub type bmat2x4 = Array<bvec4, [Element<bvec4>; 2]>;
16
17/// Matrix of 3 x 2 boolean values.
18pub type bmat3x2 = Array<bvec2, [Element<bvec2>; 3]>;
19
20/// Matrix of 3 x 3 boolean values.
21pub type bmat3x3 = Array<bvec3, [Element<bvec3>; 3]>;
22
23/// Matrix of 3 x 4 boolean values.
24pub type bmat3x4 = Array<bvec4, [Element<bvec4>; 3]>;
25
26/// Matrix of 4 x 2 boolean values.
27pub type bmat4x2 = Array<bvec2, [Element<bvec2>; 4]>;
28
29/// Matrix of 4 x 3 boolean values.
30pub type bmat4x3 = Array<bvec3, [Element<bvec3>; 4]>;
31
32/// Matrix of 4 x 4 boolean values.
33pub type bmat4x4 = Array<bvec4, [Element<bvec4>; 4]>;
34
35/// Matrix of 2 x 2 boolean values.
36pub type bmat2 = bmat2x2;
37
38/// Matrix of 3 x 3 boolean values.
39pub type bmat3 = bmat3x3;
40
41/// Matrix of 4 x 4 boolean values.
42pub type bmat4 = bmat4x4;
43
44/// Matrix of 2 x 2 signed integer values.
45pub type imat2x2 = Array<ivec2, [Element<ivec2>; 2]>;
46
47/// Matrix of 2 x 3 signed integer values.
48pub type imat2x3 = Array<ivec3, [Element<ivec3>; 2]>;
49
50/// Matrix of 2 x 4 signed integer values.
51pub type imat2x4 = Array<ivec4, [Element<ivec4>; 2]>;
52
53/// Matrix of 3 x 2 signed integer values.
54pub type imat3x2 = Array<ivec2, [Element<ivec2>; 3]>;
55
56/// Matrix of 3 x 3 signed integer values.
57pub type imat3x3 = Array<ivec3, [Element<ivec3>; 3]>;
58
59/// Matrix of 3 x 4 signed integer values.
60pub type imat3x4 = Array<ivec4, [Element<ivec4>; 3]>;
61
62/// Matrix of 4 x 2 signed integer values.
63pub type imat4x2 = Array<ivec2, [Element<ivec2>; 4]>;
64
65/// Matrix of 4 x 3 signed integer values.
66pub type imat4x3 = Array<ivec3, [Element<ivec3>; 4]>;
67
68/// Matrix of 4 x 4 signed integer values.
69pub type imat4x4 = Array<ivec4, [Element<ivec4>; 4]>;
70
71/// Matrix of 2 x 2 signed integer values.
72pub type imat2 = imat2x2;
73
74/// Matrix of 3 x 3 signed integer values.
75pub type imat3 = imat3x3;
76
77/// Matrix of 4 x 4 signed integer values.
78pub type imat4 = imat4x4;
79
80/// Matrix of 2 x 2 unsiged integer values.
81pub type umat2x2 = Array<uvec2, [Element<uvec2>; 2]>;
82
83/// Matrix of 2 x 3 unsiged integer values.
84pub type umat2x3 = Array<uvec3, [Element<uvec3>; 2]>;
85
86/// Matrix of 2 x 4 unsiged integer values.
87pub type umat2x4 = Array<uvec4, [Element<uvec4>; 2]>;
88
89/// Matrix of 3 x 2 unsiged integer values.
90pub type umat3x2 = Array<uvec2, [Element<uvec2>; 3]>;
91
92/// Matrix of 3 x 3 unsiged integer values.
93pub type umat3x3 = Array<uvec3, [Element<uvec3>; 3]>;
94
95/// Matrix of 3 x 4 unsiged integer values.
96pub type umat3x4 = Array<uvec4, [Element<uvec4>; 3]>;
97
98/// Matrix of 4 x 2 unsiged integer values.
99pub type umat4x2 = Array<uvec2, [Element<uvec2>; 4]>;
100
101/// Matrix of 4 x 3 unsiged integer values.
102pub type umat4x3 = Array<uvec3, [Element<uvec3>; 4]>;
103
104/// Matrix of 4 x 4 unsiged integer values.
105pub type umat4x4 = Array<uvec4, [Element<uvec4>; 4]>;
106
107/// Matrix of 2 x 2 unsiged integer values.
108pub type umat2 = umat2x2;
109
110/// Matrix of 3 x 3 unsiged integer values.
111pub type umat3 = umat3x3;
112
113/// Matrix of 4 x 4 unsiged integer values.
114pub type umat4 = umat4x4;
115
116/// Matrix of 2 x 2 floating-point values.
117pub type mat2x2 = Array<vec2, [Element<vec2>; 2]>;
118
119/// Matrix of 2 x 3 floating-point values.
120pub type mat2x3 = Array<vec3, [Element<vec3>; 2]>;
121
122/// Matrix of 2 x 4 floating-point values.
123pub type mat2x4 = Array<vec4, [Element<vec4>; 2]>;
124
125/// Matrix of 3 x 2 floating-point values.
126pub type mat3x2 = Array<vec2, [Element<vec2>; 3]>;
127
128/// Matrix of 3 x 3 floating-point values.
129pub type mat3x3 = Array<vec3, [Element<vec3>; 3]>;
130
131/// Matrix of 3 x 4 floating-point values.
132pub type mat3x4 = Array<vec4, [Element<vec4>; 3]>;
133
134/// Matrix of 4 x 2 floating-point values.
135pub type mat4x2 = Array<vec2, [Element<vec2>; 4]>;
136
137/// Matrix of 4 x 3 floating-point values.
138pub type mat4x3 = Array<vec3, [Element<vec3>; 4]>;
139
140/// Matrix of 4 x 4 floating-point values.
141pub type mat4x4 = Array<vec4, [Element<vec4>; 4]>;
142
143/// Matrix of 2 x 2 floating-point values.
144pub type mat2 = mat2x2;
145
146/// Matrix of 3 x 3 floating-point values.
147pub type mat3 = mat3x3;
148
149/// Matrix of 4 x 4 floating-point values.
150pub type mat4 = mat4x4;
151
152/// Matrix of 2 x 2 double-precision floating-point values.
153pub type dmat2x2 = Array<dvec2, [Element<dvec2>; 2]>;
154
155/// Matrix of 2 x 3 double-precision floating-point values.
156pub type dmat2x3 = Array<dvec3, [Element<dvec3>; 2]>;
157
158/// Matrix of 2 x 4 double-precision floating-point values.
159pub type dmat2x4 = Array<dvec4, [Element<dvec4>; 2]>;
160
161/// Matrix of 3 x 2 double-precision floating-point values.
162pub type dmat3x2 = Array<dvec2, [Element<dvec2>; 3]>;
163
164/// Matrix of 3 x 3 double-precision floating-point values.
165pub type dmat3x3 = Array<dvec3, [Element<dvec3>; 3]>;
166
167/// Matrix of 3 x 4 double-precision floating-point values.
168pub type dmat3x4 = Array<dvec4, [Element<dvec4>; 3]>;
169
170/// Matrix of 4 x 2 double-precision floating-point values.
171pub type dmat4x2 = Array<dvec2, [Element<dvec2>; 4]>;
172
173/// Matrix of 4 x 3 double-precision floating-point values.
174pub type dmat4x3 = Array<dvec3, [Element<dvec3>; 4]>;
175
176/// Matrix of 4 x 4 double-precision floating-point values.
177pub type dmat4x4 = Array<dvec4, [Element<dvec4>; 4]>;
178
179/// Matrix of 2 x 2 double-precision floating-point values.
180pub type dmat2 = dmat2x2;
181
182/// Matrix of 3 x 3 double-precision floating-point values.
183pub type dmat3 = dmat3x3;
184
185/// Matrix of 4 x 4 double-precision floating-point values.
186pub type dmat4 = dmat4x4;