14# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
18 aligned = aligned_highp,
26# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE && defined(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES)
27 defaultp = aligned_highp
35 template<length_t L,
typename T, qualifier Q = defaultp>
struct vec;
36 template<length_t C, length_t R,
typename T, qualifier Q = defaultp>
struct mat;
37 template<
typename T, qualifier Q = defaultp>
struct qua;
39# if GLM_HAS_TEMPLATE_ALIASES
40 template <
typename T, qualifier Q = defaultp>
using tvec1 =
vec<1, T, Q>;
41 template <
typename T, qualifier Q = defaultp>
using tvec2 =
vec<2, T, Q>;
42 template <
typename T, qualifier Q = defaultp>
using tvec3 =
vec<3, T, Q>;
43 template <
typename T, qualifier Q = defaultp>
using tvec4 =
vec<4, T, Q>;
44 template <
typename T, qualifier Q = defaultp>
using tmat2x2 =
mat<2, 2, T, Q>;
45 template <
typename T, qualifier Q = defaultp>
using tmat2x3 =
mat<2, 3, T, Q>;
46 template <
typename T, qualifier Q = defaultp>
using tmat2x4 =
mat<2, 4, T, Q>;
47 template <
typename T, qualifier Q = defaultp>
using tmat3x2 =
mat<3, 2, T, Q>;
48 template <
typename T, qualifier Q = defaultp>
using tmat3x3 =
mat<3, 3, T, Q>;
49 template <
typename T, qualifier Q = defaultp>
using tmat3x4 =
mat<3, 4, T, Q>;
50 template <
typename T, qualifier Q = defaultp>
using tmat4x2 =
mat<4, 2, T, Q>;
51 template <
typename T, qualifier Q = defaultp>
using tmat4x3 =
mat<4, 3, T, Q>;
52 template <
typename T, qualifier Q = defaultp>
using tmat4x4 =
mat<4, 4, T, Q>;
53 template <
typename T, qualifier Q = defaultp>
using tquat =
qua<T, Q>;
58 template<glm::qualifier P>
61 static const bool value =
false;
64# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
68 static const bool value =
true;
72 struct is_aligned<
glm::aligned_mediump>
74 static const bool value =
true;
78 struct is_aligned<
glm::aligned_highp>
80 static const bool value =
true;
84 template<length_t L,
typename T,
bool is_aligned>
93 template<length_t L,
typename T>
96 typedef struct alignas(L * sizeof(T))
type {
102 struct storage<3, T, true>
104 typedef struct alignas(4 * sizeof(T)) type {
110# if GLM_ARCH & GLM_ARCH_SSE2_BIT
112 struct storage<4, float, true>
114 typedef glm_f32vec4 type;
118 struct storage<4, int, true>
120 typedef glm_i32vec4 type;
124 struct storage<4, unsigned int, true>
126 typedef glm_u32vec4 type;
130 struct storage<2, double, true>
132 typedef glm_f64vec2 type;
136 struct storage<2,
detail::int64, true>
138 typedef glm_i64vec2 type;
142 struct storage<2,
detail::uint64, true>
144 typedef glm_u64vec2 type;
148# if (GLM_ARCH & GLM_ARCH_AVX_BIT)
150 struct storage<4, double, true>
152 typedef glm_f64vec4 type;
156# if (GLM_ARCH & GLM_ARCH_AVX2_BIT)
158 struct storage<4,
detail::int64, true>
160 typedef glm_i64vec4 type;
164 struct storage<4,
detail::uint64, true>
166 typedef glm_u64vec4 type;
170# if GLM_ARCH & GLM_ARCH_NEON_BIT
172 struct storage<4, float, true>
174 typedef glm_f32vec4 type;
178 struct storage<4, int, true>
180 typedef glm_i32vec4 type;
184 struct storage<4, unsigned int, true>
186 typedef glm_u32vec4 type;
197 template <
typename genType>
201 template <length_t C, length_t R,
typename T>
204 static const genTypeEnum GENTYPE = GENTYPE_MAT;
207 template<
typename genType, genTypeEnum type>
212 template<
typename genType>
215 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static genType
identity()
217 return genType(1, 0, 0, 0);
221 template<
typename genType>
224 GLM_FUNC_QUALIFIER GLM_CONSTEXPR
static genType
identity()
detail namespace with internal helper functions
Definition json.h:249
Core features
Definition common.hpp:21
qualifier
Qualify GLM types in term of alignment (packed, aligned) and precision in term of ULPs (lowp,...
Definition qualifier.hpp:9
@ mediump
By default mediump qualifier is also packed.
Definition qualifier.hpp:22
@ packed_highp
Typed data is tightly packed in memory and operations are executed with high precision in term of ULP...
Definition qualifier.hpp:10
@ packed_mediump
Typed data is tightly packed in memory and operations are executed with medium precision in term of U...
Definition qualifier.hpp:11
@ packed
By default packed qualifier is also high precision.
Definition qualifier.hpp:24
@ packed_lowp
Typed data is tightly packed in memory and operations are executed with low precision in term of ULPs...
Definition qualifier.hpp:12
@ highp
By default highp qualifier is also packed.
Definition qualifier.hpp:21
@ lowp
By default lowp qualifier is also packed.
Definition qualifier.hpp:23
Definition qualifier.hpp:199
Definition qualifier.hpp:209
Definition qualifier.hpp:60
Definition qualifier.hpp:87
Definition qualifier.hpp:86
Definition qualifier.hpp:36
Definition type_quat.hpp:20
Definition type_trait.hpp:35
Definition qualifier.hpp:35