src/basics.h

changeset 21
0133e565e072
parent 18
918b6c0f8b5b
child 24
1a0faaaceb84
equal deleted inserted replaced
20:cef43609a374 21:0133e565e072
34 34
35 using GLRotationMatrix = QMatrix4x4; 35 using GLRotationMatrix = QMatrix4x4;
36 36
37 enum Axis 37 enum Axis
38 { 38 {
39 X, 39 X = 0,
40 Y, 40 Y = 1,
41 Z 41 Z = 2
42 }; 42 };
43 43
44 enum Winding 44 enum Winding
45 { 45 {
46 NoWinding, 46 NoWinding,
63 inline Winding& operator^=(Winding& one, Winding other) 63 inline Winding& operator^=(Winding& one, Winding other)
64 { 64 {
65 one = one ^ other; 65 one = one ^ other;
66 return one; 66 return one;
67 } 67 }
68
69 template<typename T, int N>
70 constexpr int countof(T(&)[N])
71 {
72 return N;
73 }

mercurial