Removed glm::uninitialize

This commit is contained in:
Christophe Riccio 2017-07-25 22:50:31 +02:00
parent c933f6e591
commit aa026cc0da
54 changed files with 284 additions and 368 deletions

View File

@ -132,7 +132,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vecType<L, T, P> call(vecType<L, T, P> const & x, vecType<L, T, P> const & y, vecType<L, bool, P> const & a)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = a[i] ? y[i] : x[i];
return Result;

View File

@ -15,7 +15,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = glm_vec4_abs(v.data);
return result;
}
@ -26,7 +26,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const & v)
{
vec<4, int, P> result(uninitialize);
vec<4, int, P> result;
result.data = glm_ivec4_abs(v.data);
return result;
}
@ -37,7 +37,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = glm_vec4_floor(v.data);
return result;
}
@ -48,7 +48,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = glm_vec4_ceil(v.data);
return result;
}
@ -59,7 +59,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = glm_vec4_fract(v.data);
return result;
}
@ -70,7 +70,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = glm_vec4_round(v.data);
return result;
}
@ -81,7 +81,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = glm_vec4_mod(x.data, y.data);
return result;
}
@ -92,7 +92,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = _mm_min_ps(v1.data, v2.data);
return result;
}
@ -103,7 +103,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
{
vec<4, int32, P> result(uninitialize);
vec<4, int32, P> result;
result.data = _mm_min_epi32(v1.data, v2.data);
return result;
}
@ -114,7 +114,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2)
{
vec<4, uint32, P> result(uninitialize);
vec<4, uint32, P> result;
result.data = _mm_min_epu32(v1.data, v2.data);
return result;
}
@ -125,7 +125,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = _mm_max_ps(v1.data, v2.data);
return result;
}
@ -136,7 +136,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
{
vec<4, int32, P> result(uninitialize);
vec<4, int32, P> result;
result.data = _mm_max_epi32(v1.data, v2.data);
return result;
}
@ -147,7 +147,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2)
{
vec<4, uint32, P> result(uninitialize);
vec<4, uint32, P> result;
result.data = _mm_max_epu32(v1.data, v2.data);
return result;
}
@ -158,7 +158,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & minVal, vec<4, float, P> const & maxVal)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> result;
result.data = _mm_min_ps(_mm_max_ps(x.data, minVal.data), maxVal.data);
return result;
}
@ -169,7 +169,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & x, vec<4, int32, P> const & minVal, vec<4, int32, P> const & maxVal)
{
vec<4, int32, P> result(uninitialize);
vec<4, int32, P> result;
result.data = _mm_min_epi32(_mm_max_epi32(x.data, minVal.data), maxVal.data);
return result;
}
@ -180,7 +180,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & x, vec<4, uint32, P> const & minVal, vec<4, uint32, P> const & maxVal)
{
vec<4, uint32, P> result(uninitialize);
vec<4, uint32, P> result;
result.data = _mm_min_epu32(_mm_max_epu32(x.data, minVal.data), maxVal.data);
return result;
}
@ -194,7 +194,7 @@ namespace detail
__m128i const Load = _mm_set_epi32(-static_cast<int>(a.w), -static_cast<int>(a.z), -static_cast<int>(a.y), -static_cast<int>(a.x));
__m128 const Mask = _mm_castsi128_ps(Load);
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
# if 0 && GLM_ARCH & GLM_ARCH_AVX
Result.data = _mm_blendv_ps(x.data, y.data, Mask);
# else
@ -209,7 +209,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge, vec<4, float, P> const& x)
{
vec<4, float, P> result(uninitialize);
vec<4, float, P> Result;
result.data = glm_vec4_step(edge.data, x.data);
return result;
}
@ -220,9 +220,9 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge0, vec<4, float, P> const& edge1, vec<4, float, P> const& x)
{
vec<4, float, P> result(uninitialize);
result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data);
return result;
vec<4, float, P> Result;
Result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data);
return Result;
}
};
}//namespace detail

View File

@ -13,9 +13,9 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
{
vec<4, float, P> result(uninitialize);
result.data = _mm_sqrt_ps(v.data);
return result;
vec<4, float, P> Result;
Result.data = _mm_sqrt_ps(v.data);
return Result;
}
};
@ -24,9 +24,9 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & v)
{
vec<4, float, aligned_lowp> result(uninitialize);
result.data = glm_vec4_sqrt_lowp(v.data);
return result;
vec<4, float, aligned_lowp> Result;
Result.data = glm_vec4_sqrt_lowp(v.data);
return Result;
}
};
}//namespace detail

View File

@ -44,9 +44,9 @@ namespace detail
__m128 const set1 = _mm_set_ps(0.0f, b.z, b.y, b.x);
__m128 const xpd0 = glm_vec4_cross(set0, set1);
vec<4, float, P> result(uninitialize);
result.data = xpd0;
return vec<3, float, P>(result);
vec<4, float, P> Result;
Result.data = xpd0;
return vec<3, float, P>(Result);
}
};
@ -55,9 +55,9 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
{
vec<4, float, P> result(uninitialize);
result.data = glm_vec4_normalize(v.data);
return result;
vec<4, float, P> Result;
Result.data = glm_vec4_normalize(v.data);
return Result;
}
};
@ -66,9 +66,9 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& N, vec<4, float, P> const& I, vec<4, float, P> const& Nref)
{
vec<4, float, P> result(uninitialize);
result.data = glm_vec4_faceforward(N.data, I.data, Nref.data);
return result;
vec<4, float, P> Result;
Result.data = glm_vec4_faceforward(N.data, I.data, Nref.data);
return Result;
}
};
@ -77,9 +77,9 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N)
{
vec<4, float, P> result(uninitialize);
result.data = glm_vec4_reflect(I.data, N.data);
return result;
vec<4, float, P> Result;
Result.data = glm_vec4_reflect(I.data, N.data);
return Result;
}
};
@ -88,9 +88,9 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N, float eta)
{
vec<4, float, P> result(uninitialize);
result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta));
return result;
vec<4, float, P> Result;
Result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta));
return Result;
}
};
}//namespace detail

View File

@ -12,10 +12,10 @@ namespace detail
{
GLM_FUNC_QUALIFIER static matType<C, R, T, P> call(matType<C, R, T, P> const& x, matType<C, R, T, P> const& y)
{
matType<C, R, T, P> result(uninitialize);
for(length_t i = 0; i < result.length(); ++i)
result[i] = x[i] * y[i];
return result;
matType<C, R, T, P> Result;
for(length_t i = 0; i < Result.length(); ++i)
Result[i] = x[i] * y[i];
return Result;
}
};
@ -27,12 +27,12 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m)
{
mat<2, 2, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
return result;
mat<2, 2, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
return Result;
}
};
@ -41,14 +41,14 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<3, 2, T, P> call(mat<2, 3, T, P> const& m)
{
mat<3,2, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[2][0] = m[0][2];
result[2][1] = m[1][2];
return result;
mat<3,2, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[2][0] = m[0][2];
Result[2][1] = m[1][2];
return Result;
}
};
@ -57,16 +57,16 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<4, 2, T, P> call(mat<2, 4, T, P> const& m)
{
mat<4, 2, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[2][0] = m[0][2];
result[2][1] = m[1][2];
result[3][0] = m[0][3];
result[3][1] = m[1][3];
return result;
mat<4, 2, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[2][0] = m[0][2];
Result[2][1] = m[1][2];
Result[3][0] = m[0][3];
Result[3][1] = m[1][3];
return Result;
}
};
@ -75,14 +75,14 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<2, 3, T, P> call(mat<3, 2, T, P> const& m)
{
mat<2, 3, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[0][2] = m[2][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[1][2] = m[2][1];
return result;
mat<2, 3, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[0][2] = m[2][0];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[1][2] = m[2][1];
return Result;
}
};
@ -91,19 +91,19 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m)
{
mat<3, 3, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[0][2] = m[2][0];
mat<3, 3, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[0][2] = m[2][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[1][2] = m[2][1];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[1][2] = m[2][1];
result[2][0] = m[0][2];
result[2][1] = m[1][2];
result[2][2] = m[2][2];
return result;
Result[2][0] = m[0][2];
Result[2][1] = m[1][2];
Result[2][2] = m[2][2];
return Result;
}
};
@ -112,20 +112,20 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<4, 3, T, P> call(mat<3, 4, T, P> const& m)
{
mat<4, 3, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[0][2] = m[2][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[1][2] = m[2][1];
result[2][0] = m[0][2];
result[2][1] = m[1][2];
result[2][2] = m[2][2];
result[3][0] = m[0][3];
result[3][1] = m[1][3];
result[3][2] = m[2][3];
return result;
mat<4, 3, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[0][2] = m[2][0];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[1][2] = m[2][1];
Result[2][0] = m[0][2];
Result[2][1] = m[1][2];
Result[2][2] = m[2][2];
Result[3][0] = m[0][3];
Result[3][1] = m[1][3];
Result[3][2] = m[2][3];
return Result;
}
};
@ -134,16 +134,16 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<2, 4, T, P> call(mat<4, 2, T, P> const& m)
{
mat<2, 4, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[0][2] = m[2][0];
result[0][3] = m[3][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[1][2] = m[2][1];
result[1][3] = m[3][1];
return result;
mat<2, 4, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[0][2] = m[2][0];
Result[0][3] = m[3][0];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[1][2] = m[2][1];
Result[1][3] = m[3][1];
return Result;
}
};
@ -152,20 +152,20 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<3, 4, T, P> call(mat<4, 3, T, P> const& m)
{
mat<3, 4, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[0][2] = m[2][0];
result[0][3] = m[3][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[1][2] = m[2][1];
result[1][3] = m[3][1];
result[2][0] = m[0][2];
result[2][1] = m[1][2];
result[2][2] = m[2][2];
result[2][3] = m[3][2];
return result;
mat<3, 4, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[0][2] = m[2][0];
Result[0][3] = m[3][0];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[1][2] = m[2][1];
Result[1][3] = m[3][1];
Result[2][0] = m[0][2];
Result[2][1] = m[1][2];
Result[2][2] = m[2][2];
Result[2][3] = m[3][2];
return Result;
}
};
@ -174,27 +174,27 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m)
{
mat<4, 4, T, P> result(uninitialize);
result[0][0] = m[0][0];
result[0][1] = m[1][0];
result[0][2] = m[2][0];
result[0][3] = m[3][0];
mat<4, 4, T, P> Result;
Result[0][0] = m[0][0];
Result[0][1] = m[1][0];
Result[0][2] = m[2][0];
Result[0][3] = m[3][0];
result[1][0] = m[0][1];
result[1][1] = m[1][1];
result[1][2] = m[2][1];
result[1][3] = m[3][1];
Result[1][0] = m[0][1];
Result[1][1] = m[1][1];
Result[1][2] = m[2][1];
Result[1][3] = m[3][1];
result[2][0] = m[0][2];
result[2][1] = m[1][2];
result[2][2] = m[2][2];
result[2][3] = m[3][2];
Result[2][0] = m[0][2];
Result[2][1] = m[1][2];
Result[2][2] = m[2][2];
Result[2][3] = m[3][2];
result[3][0] = m[0][3];
result[3][1] = m[1][3];
result[3][2] = m[2][3];
result[3][3] = m[3][3];
return result;
Result[3][0] = m[0][3];
Result[3][1] = m[1][3];
Result[3][2] = m[2][3];
Result[3][3] = m[3][3];
return Result;
}
};
@ -278,7 +278,7 @@ namespace detail
- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])
+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]));
mat<3, 3, T, P> Inverse(uninitialize);
mat<3, 3, T, P> Inverse;
Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant;
Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant;
Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant;
@ -367,7 +367,7 @@ namespace detail
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs");
typename detail::outerProduct_trait<DA, DB, T, P, vecTypeA, vecTypeB>::type m(uninitialize);
typename detail::outerProduct_trait<DA, DB, T, P, vecTypeA, vecTypeB>::type m;
for(length_t i = 0; i < m.length(); ++i)
m[i] = c * r[i];
return m;

View File

@ -17,12 +17,12 @@ namespace detail
GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & x, mat<4, 4, float, P> const & y)
{
mat<4, 4, float, P> result(uninitialize);
mat<4, 4, float, P> Result;
glm_mat4_matrixCompMult(
*static_cast<glm_vec4 const (*)[4]>(&x[0].data),
*static_cast<glm_vec4 const (*)[4]>(&y[0].data),
*static_cast<glm_vec4(*)[4]>(&result[0].data));
return result;
*static_cast<glm_vec4(*)[4]>(&Result[0].data));
return Result;
}
};
@ -31,11 +31,11 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & m)
{
mat<4, 4, float, P> result(uninitialize);
mat<4, 4, float, P> Result;
glm_mat4_transpose(
*static_cast<glm_vec4 const (*)[4]>(&m[0].data),
*static_cast<glm_vec4(*)[4]>(&result[0].data));
return result;
*static_cast<glm_vec4(*)[4]>(&Result[0].data));
return Result;
}
};
@ -53,7 +53,7 @@ namespace detail
{
GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const& m)
{
mat<4, 4, float, P> Result(uninitialize);
mat<4, 4, float, P> Result;
glm_mat4_inverse(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data), *reinterpret_cast<__m128(*)[4]>(&Result[0].data));
return Result;
}
@ -63,25 +63,25 @@ namespace detail
template<>
GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_lowp> outerProduct<4, 4, float, aligned_lowp, vec, vec>(vec<4, float, aligned_lowp> const & c, vec<4, float, aligned_lowp> const & r)
{
mat<4, 4, float, aligned_lowp> m(uninitialize);
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
return m;
mat<4, 4, float, aligned_lowp> Result;
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&Result[0].data));
return Result;
}
template<>
GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_mediump> outerProduct<4, 4, float, aligned_mediump, vec, vec>(vec<4, float, aligned_mediump> const & c, vec<4, float, aligned_mediump> const & r)
{
mat<4, 4, float, aligned_mediump> m(uninitialize);
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
return m;
mat<4, 4, float, aligned_mediump> Result;
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&Result[0].data));
return Result;
}
template<>
GLM_FUNC_QUALIFIER mat<4, 4, float, aligned_highp> outerProduct<4, 4, float, aligned_highp, vec, vec>(vec<4, float, aligned_highp> const & c, vec<4, float, aligned_highp> const & r)
{
mat<4, 4, float, aligned_highp> m(uninitialize);
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
return m;
mat<4, 4, float, aligned_highp> Result;
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&Result[0].data));
return Result;
}
}//namespace glm

View File

@ -10,7 +10,7 @@ namespace glm
{
assert(x.length() == y.length());
vecType<L, bool, P> Result(uninitialize);
vecType<L, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] < y[i];
@ -22,7 +22,7 @@ namespace glm
{
assert(x.length() == y.length());
vecType<L, bool, P> Result(uninitialize);
vecType<L, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] <= y[i];
return Result;
@ -33,7 +33,7 @@ namespace glm
{
assert(x.length() == y.length());
vecType<L, bool, P> Result(uninitialize);
vecType<L, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] > y[i];
return Result;
@ -44,7 +44,7 @@ namespace glm
{
assert(x.length() == y.length());
vecType<L, bool, P> Result(uninitialize);
vecType<L, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] >= y[i];
return Result;
@ -55,7 +55,7 @@ namespace glm
{
assert(x.length() == y.length());
vecType<L, bool, P> Result(uninitialize);
vecType<L, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] == y[i];
return Result;
@ -66,7 +66,7 @@ namespace glm
{
assert(x.length() == y.length());
vecType<L, bool, P> Result(uninitialize);
vecType<L, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] != y[i];
return Result;
@ -93,7 +93,7 @@ namespace glm
template<length_t L, precision P, template<length_t, typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<L, bool, P> not_(vecType<L, bool, P> const & v)
{
vecType<L, bool, P> Result(uninitialize);
vecType<L, bool, P> Result;
for(length_t i = 0; i < v.length(); ++i)
Result[i] = !v[i];
return Result;

View File

@ -775,14 +775,6 @@ namespace glm
# define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])
#endif
///////////////////////////////////////////////////////////////////////////////////
// Uninitialize constructors
namespace glm
{
enum ctor{uninitialize};
}//namespace glm
///////////////////////////////////////////////////////////////////////////////////
// Check inclusions of different versions of GLM

View File

@ -39,7 +39,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<2, 2, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T scalar);
GLM_FUNC_DECL mat(
T const & x1, T const & y1,

View File

@ -30,10 +30,6 @@ namespace glm
this->value[1] = m.value[1];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 2, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(T scalar)
{

View File

@ -40,7 +40,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<2, 3, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T scalar);
GLM_FUNC_DECL mat(
T x0, T y0, T z0,

View File

@ -28,10 +28,6 @@ namespace glm
this->value[1] = m.value[1];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 3, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(T scalar)
{
@ -390,7 +386,7 @@ namespace glm
T SrcB20 = m2[2][0];
T SrcB21 = m2[2][1];
mat<3, 3, T, P> Result(uninitialize);
mat<3, 3, T, P> Result;
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;

View File

@ -40,7 +40,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<2, 4, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T scalar);
GLM_FUNC_DECL mat(
T x0, T y0, T z0, T w0,

View File

@ -28,10 +28,6 @@ namespace glm
this->value[1] = m.value[1];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<2, 4, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(T scalar)
{
@ -378,7 +374,7 @@ namespace glm
T SrcB30 = m2[3][0];
T SrcB31 = m2[3][1];
mat<4, 4, T, P> Result(uninitialize);
mat<4, 4, T, P> Result;
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;

View File

@ -40,7 +40,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<3, 2, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T scalar);
GLM_FUNC_DECL mat(
T x0, T y0,

View File

@ -30,10 +30,6 @@ namespace glm
this->value[2] = m.value[2];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 2, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(T scalar)
{
@ -418,7 +414,7 @@ namespace glm
const T SrcB11 = m2[1][1];
const T SrcB12 = m2[1][2];
mat<2, 2, T, P> Result(uninitialize);
mat<2, 2, T, P> Result;
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;

View File

@ -39,7 +39,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<3, 3, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T scalar);
GLM_FUNC_DECL mat(
T x0, T y0, T z0,

View File

@ -32,10 +32,6 @@ namespace glm
this->value[2] = m.value[2];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 3, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(T scalar)
{
@ -459,7 +455,7 @@ namespace glm
T const SrcB21 = m2[2][1];
T const SrcB22 = m2[2][2];
mat<3, 3, T, P> Result(uninitialize);
mat<3, 3, T, P> Result;
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;

View File

@ -40,7 +40,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<3, 4, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T scalar);
GLM_FUNC_DECL mat(
T x0, T y0, T z0, T w0,

View File

@ -30,10 +30,6 @@ namespace glm
this->value[2] = m.value[2];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<3, 4, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(T scalar)
{
@ -440,7 +436,7 @@ namespace glm
const T SrcB31 = m2[3][1];
const T SrcB32 = m2[3][2];
mat<4, 4, T, P> Result(uninitialize);
mat<4, 4, T, P> Result;
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;

View File

@ -40,7 +40,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<4, 2, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T scalar);
GLM_FUNC_DECL mat(
T x0, T y0,

View File

@ -32,10 +32,6 @@ namespace glm
this->value[3] = m.value[3];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<4, 2, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(T scalar)
{
@ -461,7 +457,7 @@ namespace glm
T const SrcB12 = m2[1][2];
T const SrcB13 = m2[1][3];
mat<2, 2, T, P> Result(uninitialize);
mat<2, 2, T, P> Result;
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;

View File

@ -40,7 +40,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<4, 3, T, Q> const & m);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T const & x);
GLM_FUNC_DECL mat(
T const & x0, T const & y0, T const & z0,

View File

@ -32,10 +32,6 @@ namespace glm
this->value[3] = m.value[3];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR mat<4, 3, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(T const & s)
{
@ -488,7 +484,7 @@ namespace glm
T const SrcB22 = m2[2][2];
T const SrcB23 = m2[2][3];
mat<3, 3, T, P> Result(uninitialize);
mat<3, 3, T, P> Result;
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03;

View File

@ -39,7 +39,6 @@ namespace glm
template<precision Q>
GLM_FUNC_DECL mat(mat<4, 4, T, Q> const& m);
GLM_FUNC_DECL explicit mat(ctor);
GLM_FUNC_DECL explicit mat(T const & x);
GLM_FUNC_DECL mat(
T const & x0, T const & y0, T const & z0, T const & w0,

View File

@ -34,10 +34,6 @@ namespace glm
this->value[3] = m[3];
}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(T const & s)
{
@ -597,7 +593,7 @@ namespace glm
typename mat<4, 4, T, P>::col_type const SrcB2 = m2[2];
typename mat<4, 4, T, P>::col_type const SrcB3 = m2[3];
mat<4, 4, T, P> Result(uninitialize);
mat<4, 4, T, P> Result;
Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3];
Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3];
Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3];

View File

@ -92,7 +92,6 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar);
// -- Conversion vector constructors --

View File

@ -26,10 +26,6 @@ namespace glm
// -- Explicit basic constructors --
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(T scalar)
: x(scalar)

View File

@ -93,7 +93,6 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(T x, T y);

View File

@ -26,10 +26,6 @@ namespace glm
// -- Explicit basic constructors --
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(T scalar)
: x(scalar), y(scalar)

View File

@ -93,7 +93,6 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(T a, T b, T c);

View File

@ -26,10 +26,6 @@ namespace glm
// -- Explicit basic constructors --
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(T scalar)
: x(scalar), y(scalar), z(scalar)

View File

@ -96,7 +96,6 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(T x, T y, T z, T w);

View File

@ -175,10 +175,6 @@ namespace detail
// -- Explicit basic constructors --
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T scalar)
: x(scalar), y(scalar), z(scalar), w(scalar)

View File

@ -14,7 +14,7 @@ namespace detail
{
__m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer);
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
# if GLM_ARCH & GLM_ARCH_AVX_BIT
Result.data = _mm_permute_ps(data, _MM_SHUFFLE(E3, E2, E1, E0));
# else
@ -31,7 +31,7 @@ namespace detail
{
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);
vec<4, int32, P> Result(uninitialize);
vec<4, int32, P> Result;
Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0));
return Result;
}
@ -44,7 +44,7 @@ namespace detail
{
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);
vec<4, uint32, P> Result(uninitialize);
vec<4, uint32, P> Result;
Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0));
return Result;
}
@ -56,7 +56,7 @@ namespace detail
{
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
{
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_add_ps(a.data, b.data);
return Result;
}
@ -68,7 +68,7 @@ namespace detail
{
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
{
vec<4, double, P> Result(uninitialize);
vec<4, double, P> Result;
Result.data = _mm256_add_pd(a.data, b.data);
return Result;
}
@ -80,7 +80,7 @@ namespace detail
{
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
{
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_sub_ps(a.data, b.data);
return Result;
}
@ -92,7 +92,7 @@ namespace detail
{
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
{
vec<4, double, P> Result(uninitialize);
vec<4, double, P> Result;
Result.data = _mm256_sub_pd(a.data, b.data);
return Result;
}
@ -104,7 +104,7 @@ namespace detail
{
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
{
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_mul_ps(a.data, b.data);
return Result;
}
@ -116,7 +116,7 @@ namespace detail
{
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
{
vec<4, double, P> Result(uninitialize);
vec<4, double, P> Result;
Result.data = _mm256_mul_pd(a.data, b.data);
return Result;
}
@ -128,7 +128,7 @@ namespace detail
{
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
{
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_div_ps(a.data, b.data);
return Result;
}
@ -140,7 +140,7 @@ namespace detail
{
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
{
vec<4, double, P> Result(uninitialize);
vec<4, double, P> Result;
Result.data = _mm256_div_pd(a.data, b.data);
return Result;
}
@ -152,7 +152,7 @@ namespace detail
{
static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & a, vec<4, float, aligned_lowp> const & b)
{
vec<4, float, aligned_lowp> Result(uninitialize);
vec<4, float, aligned_lowp> Result;
Result.data = _mm_mul_ps(a.data, _mm_rcp_ps(b.data));
return Result;
}
@ -163,7 +163,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm_and_si128(a.data, b.data);
return Result;
}
@ -175,7 +175,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm256_and_si256(a.data, b.data);
return Result;
}
@ -187,7 +187,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm_or_si128(a.data, b.data);
return Result;
}
@ -199,7 +199,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm256_or_si256(a.data, b.data);
return Result;
}
@ -211,7 +211,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm_xor_si128(a.data, b.data);
return Result;
}
@ -223,7 +223,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm256_xor_si256(a.data, b.data);
return Result;
}
@ -235,7 +235,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm_sll_epi32(a.data, b.data);
return Result;
}
@ -247,7 +247,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm256_sll_epi64(a.data, b.data);
return Result;
}
@ -259,7 +259,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm_srl_epi32(a.data, b.data);
return Result;
}
@ -271,7 +271,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm256_srl_epi64(a.data, b.data);
return Result;
}
@ -283,7 +283,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const & v)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm_xor_si128(v.data, _mm_set1_epi32(-1));
return Result;
}
@ -295,7 +295,7 @@ namespace detail
{
static vec<4, T, P> call(vec<4, T, P> const & v)
{
vec<4, T, P> Result(uninitialize);
vec<4, T, P> Result;
Result.data = _mm256_xor_si256(v.data, _mm_set1_epi32(-1));
return Result;
}

View File

@ -21,13 +21,11 @@ namespace detail
{
GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const& v)
{
vec<4, int, P> Result(glm::uninitialize);
vec<4, int, P> Result;
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.x), v.x);
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.y), v.y);
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.z), v.z);
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.w), v.w);
return Result;
}
};

View File

@ -48,7 +48,7 @@ namespace glm
- m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])
+ m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);
mat<3, 3, T, P> Inverse(uninitialize);
mat<3, 3, T, P> Inverse;
Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);
Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);
Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);
@ -86,7 +86,7 @@ namespace glm
T SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];
T SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
mat<4, 4, T, P> Inverse(uninitialize);
mat<4, 4, T, P> Inverse;
Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02);
Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04);
Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05);

View File

@ -25,7 +25,7 @@ namespace glm
vec<3, T, P> axis(normalize(v));
vec<3, T, P> temp((T(1) - c) * axis);
mat<4, 4, T, P> Rotate(uninitialize);
mat<4, 4, T, P> Rotate;
Rotate[0][0] = c + temp[0] * axis[0];
Rotate[0][1] = temp[0] * axis[1] + s * axis[2];
Rotate[0][2] = temp[0] * axis[2] - s * axis[1];
@ -38,7 +38,7 @@ namespace glm
Rotate[2][1] = temp[2] * axis[1] - s * axis[0];
Rotate[2][2] = c + temp[2] * axis[2];
mat<4, 4, T, P> Result(uninitialize);
mat<4, 4, T, P> Result;
Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
@ -78,7 +78,7 @@ namespace glm
template<typename T, precision P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(mat<4, 4, T, P> const & m, vec<3, T, P> const & v)
{
mat<4, 4, T, P> Result(uninitialize);
mat<4, 4, T, P> Result;
Result[0] = m[0] * v[0];
Result[1] = m[1] * v[1];
Result[2] = m[2] * v[2];

View File

@ -280,14 +280,14 @@ namespace detail
GLM_FUNC_QUALIFIER static vec<1, uint16, P> pack(vec<1, float, P> const & v)
{
int16 const Unpack(detail::toFloat16(v.x));
u16vec1 Packed(uninitialize);
u16vec1 Packed;
memcpy(&Packed, &Unpack, sizeof(Packed));
return Packed;
}
GLM_FUNC_QUALIFIER static vec<1, float, P> unpack(vec<1, uint16, P> const & v)
{
i16vec1 Unpack(uninitialize);
i16vec1 Unpack;
memcpy(&Unpack, &v, sizeof(Unpack));
return vec<1, float, P>(detail::toFloat32(v.x));
}
@ -299,14 +299,14 @@ namespace detail
GLM_FUNC_QUALIFIER static vec<2, uint16, P> pack(vec<2, float, P> const & v)
{
vec<2, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y));
u16vec2 Packed(uninitialize);
u16vec2 Packed;
memcpy(&Packed, &Unpack, sizeof(Packed));
return Packed;
}
GLM_FUNC_QUALIFIER static vec<2, float, P> unpack(vec<2, uint16, P> const & v)
{
i16vec2 Unpack(uninitialize);
i16vec2 Unpack;
memcpy(&Unpack, &v, sizeof(Unpack));
return vec<2, float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y));
}
@ -318,14 +318,14 @@ namespace detail
GLM_FUNC_QUALIFIER static vec<3, uint16, P> pack(vec<3, float, P> const & v)
{
vec<3, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z));
u16vec3 Packed(uninitialize);
u16vec3 Packed;
memcpy(&Packed, &Unpack, sizeof(Packed));
return Packed;
}
GLM_FUNC_QUALIFIER static vec<3, float, P> unpack(vec<3, uint16, P> const & v)
{
i16vec3 Unpack(uninitialize);
i16vec3 Unpack;
memcpy(&Unpack, &v, sizeof(Unpack));
return vec<3, float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y), detail::toFloat32(v.z));
}
@ -337,14 +337,14 @@ namespace detail
GLM_FUNC_QUALIFIER static vec<4, uint16, P> pack(vec<4, float, P> const & v)
{
vec<4, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z), detail::toFloat16(v.w));
u16vec4 Packed(uninitialize);
u16vec4 Packed;
memcpy(&Packed, &Unpack, sizeof(Packed));
return Packed;
}
GLM_FUNC_QUALIFIER static vec<4, float, P> unpack(vec<4, uint16, P> const & v)
{
i16vec4 Unpack(uninitialize);
i16vec4 Unpack;
memcpy(&Unpack, &v, sizeof(Unpack));
return vec<4, float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y), detail::toFloat32(v.z), detail::toFloat32(v.w));
}
@ -373,7 +373,7 @@ namespace detail
GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p)
{
u8vec2 Unpack(uninitialize);
u8vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return vec2(Unpack) * float(0.0039215686274509803921568627451); // 1 / 255
}
@ -405,7 +405,7 @@ namespace detail
GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p)
{
i8vec2 Unpack(uninitialize);
i8vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return clamp(
vec2(Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f
@ -433,7 +433,7 @@ namespace detail
GLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 p)
{
u16vec4 Unpack(uninitialize);
u16vec4 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return vec4(Unpack) * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0
}
@ -465,7 +465,7 @@ namespace detail
GLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 p)
{
i16vec4 Unpack(uninitialize);
i16vec4 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return clamp(
vec4(Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,
@ -501,7 +501,7 @@ namespace detail
GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 v)
{
i16vec4 Unpack(uninitialize);
i16vec4 Unpack;
memcpy(&Unpack, &v, sizeof(Unpack));
return vec4(
detail::toFloat32(Unpack.x),
@ -803,7 +803,7 @@ namespace detail
GLM_FUNC_QUALIFIER i8vec2 unpackInt2x8(int16 p)
{
i8vec2 Unpack(uninitialize);
i8vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -817,7 +817,7 @@ namespace detail
GLM_FUNC_QUALIFIER u8vec2 unpackUint2x8(uint16 p)
{
u8vec2 Unpack(uninitialize);
u8vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -831,7 +831,7 @@ namespace detail
GLM_FUNC_QUALIFIER i8vec4 unpackInt4x8(int32 p)
{
i8vec4 Unpack(uninitialize);
i8vec4 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -845,7 +845,7 @@ namespace detail
GLM_FUNC_QUALIFIER u8vec4 unpackUint4x8(uint32 p)
{
u8vec4 Unpack(uninitialize);
u8vec4 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -859,7 +859,7 @@ namespace detail
GLM_FUNC_QUALIFIER i16vec2 unpackInt2x16(int p)
{
i16vec2 Unpack(uninitialize);
i16vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -873,7 +873,7 @@ namespace detail
GLM_FUNC_QUALIFIER i16vec4 unpackInt4x16(int64 p)
{
i16vec4 Unpack(uninitialize);
i16vec4 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -887,7 +887,7 @@ namespace detail
GLM_FUNC_QUALIFIER u16vec2 unpackUint2x16(uint p)
{
u16vec2 Unpack(uninitialize);
u16vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -901,7 +901,7 @@ namespace detail
GLM_FUNC_QUALIFIER u16vec4 unpackUint4x16(uint64 p)
{
u16vec4 Unpack(uninitialize);
u16vec4 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -915,7 +915,7 @@ namespace detail
GLM_FUNC_QUALIFIER i32vec2 unpackInt2x32(int64 p)
{
i32vec2 Unpack(uninitialize);
i32vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}
@ -929,7 +929,7 @@ namespace detail
GLM_FUNC_QUALIFIER u32vec2 unpackUint2x32(uint64 p)
{
u32vec2 Unpack(uninitialize);
u32vec2 Unpack;
memcpy(&Unpack, &p, sizeof(Unpack));
return Unpack;
}

View File

@ -84,7 +84,6 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T s, vec<3, T, P> const& v);
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T w, T x, T y, T z);

View File

@ -104,10 +104,6 @@ namespace detail
// -- Explicit basic constructors --
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tquat<T, P>::tquat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T s, vec<3, T, P> const& v)
: x(v.x), y(v.y), z(v.z), w(s)
@ -649,7 +645,7 @@ namespace detail
T biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);
T mult = static_cast<T>(0.25) / biggestVal;
tquat<T, P> Result(uninitialize);
tquat<T, P> Result;
switch(biggestIndex)
{
case 0:
@ -709,7 +705,7 @@ namespace detail
template<typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> angleAxis(T const & angle, vec<3, T, P> const & v)
{
tquat<T, P> Result(uninitialize);
tquat<T, P> Result;
T const a(angle);
T const s = glm::sin(a * static_cast<T>(0.5));
@ -724,7 +720,7 @@ namespace detail
template<typename T, precision P>
GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y)
{
vec<4, bool, P> Result(uninitialize);
vec<4, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] < y[i];
return Result;
@ -733,7 +729,7 @@ namespace detail
template<typename T, precision P>
GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{
vec<4, bool, P> Result(uninitialize);
vec<4, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] <= y[i];
return Result;
@ -742,7 +738,7 @@ namespace detail
template<typename T, precision P>
GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y)
{
vec<4, bool, P> Result(uninitialize);
vec<4, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] > y[i];
return Result;
@ -751,7 +747,7 @@ namespace detail
template<typename T, precision P>
GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{
vec<4, bool, P> Result(uninitialize);
vec<4, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] >= y[i];
return Result;
@ -760,7 +756,7 @@ namespace detail
template<typename T, precision P>
GLM_FUNC_QUALIFIER vec<4, bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y)
{
vec<4, bool, P> Result(uninitialize);
vec<4, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] == y[i];
return Result;
@ -769,7 +765,7 @@ namespace detail
template<typename T, precision P>
GLM_FUNC_QUALIFIER vec<4, bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{
vec<4, bool, P> Result(uninitialize);
vec<4, bool, P> Result;
for(length_t i = 0; i < x.length(); ++i)
Result[i] = x[i] != y[i];
return Result;

View File

@ -51,7 +51,7 @@ namespace detail
//
//return _mm_shuffle_ps(xxyy, zzww, _MM_SHUFFLE(2, 0, 2, 0));
tquat<float, P> Result(uninitialize);
tquat<float, P> Result;
_mm_store_ss(&Result.x, add4);
_mm_store_ss(&Result.y, add5);
_mm_store_ss(&Result.z, add6);
@ -75,7 +75,7 @@ namespace detail
{
static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p)
{
tquat<float, P> Result(uninitialize);
tquat<float, P> Result;
Result.data = _mm_add_ps(q.data, p.data);
return Result;
}
@ -87,7 +87,7 @@ namespace detail
{
static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b)
{
tquat<double, P> Result(uninitialize);
tquat<double, P> Result;
Result.data = _mm256_add_pd(a.data, b.data);
return Result;
}
@ -99,7 +99,7 @@ namespace detail
{
static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p)
{
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_sub_ps(q.data, p.data);
return Result;
}
@ -111,7 +111,7 @@ namespace detail
{
static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b)
{
tquat<double, P> Result(uninitialize);
tquat<double, P> Result;
Result.data = _mm256_sub_pd(a.data, b.data);
return Result;
}
@ -123,7 +123,7 @@ namespace detail
{
static tquat<float, P> call(tquat<float, P> const& q, float s)
{
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_mul_ps(q.data, _mm_set_ps1(s));
return Result;
}
@ -135,7 +135,7 @@ namespace detail
{
static tquat<double, P> call(tquat<double, P> const& q, double s)
{
tquat<double, P> Result(uninitialize);
tquat<double, P> Result;
Result.data = _mm256_mul_pd(q.data, _mm_set_ps1(s));
return Result;
}
@ -147,7 +147,7 @@ namespace detail
{
static tquat<float, P> call(tquat<float, P> const& q, float s)
{
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_div_ps(q.data, _mm_set_ps1(s));
return Result;
}
@ -159,7 +159,7 @@ namespace detail
{
static tquat<double, P> call(tquat<double, P> const& q, double s)
{
tquat<double, P> Result(uninitialize);
tquat<double, P> Result;
Result.data = _mm256_div_pd(q.data, _mm_set_ps1(s));
return Result;
}
@ -186,7 +186,7 @@ namespace detail
uv = _mm_mul_ps(uv, _mm_mul_ps(q_wwww, two));
uuv = _mm_mul_ps(uuv, two);
vec<4, float, P> Result(uninitialize);
vec<4, float, P> Result;
Result.data = _mm_add_ps(v.Data, _mm_add_ps(uv, uuv));
return Result;
}

View File

@ -202,7 +202,7 @@ namespace glm
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<L, T, P> next_float(vecType<L, T, P> const & x)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = next_float(x[i]);
return Result;
@ -237,7 +237,7 @@ namespace glm
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<L, T, P> prev_float(vecType<L, T, P> const & x)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = prev_float(x[i]);
return Result;
@ -255,7 +255,7 @@ namespace glm
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<L, T, P> next_float(vecType<L, T, P> const & x, vecType<L, uint, P> const & ulps)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = next_float(x[i], ulps[i]);
return Result;
@ -273,7 +273,7 @@ namespace glm
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<L, T, P> prev_float(vecType<L, T, P> const & x, vecType<L, uint, P> const & ulps)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = prev_float(x[i], ulps[i]);
return Result;
@ -313,7 +313,7 @@ namespace glm
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<L, uint, P> float_distance(vecType<L, T, P> const & x, vecType<L, T, P> const & y)
{
vecType<L, uint, P> Result(uninitialize);
vecType<L, uint, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = float_distance(x[i], y[i]);
return Result;

View File

@ -17,7 +17,7 @@ GLM_FUNC_QUALIFIER vec<2, U, P> associatedMin
vecType<L, T, P> const& y, vecType<L, U, P> const & b
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? a[i] : b[i];
return Result;
@ -30,7 +30,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
T y, const vecType<L, U, P>& b
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x < y ? a[i] : b[i];
return Result;
@ -43,7 +43,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
vecType<L, T, P> const& y, U b
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? a : b;
return Result;
@ -70,7 +70,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
vecType<L, T, P> const& z, vecType<L, U, P> const & c
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);
return Result;
@ -104,7 +104,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
vecType<L, T, P> const& w, vecType<L, U, P> const & d
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = min(x[i], y[i]);
@ -129,7 +129,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
T Test1 = min(x, y);
T Test2 = min(z, w);
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
U Result1 = x < y ? a[i] : b[i];
@ -149,7 +149,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
vecType<L, T, P> const& w, U d
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = min(x[i], y[i]);
@ -176,7 +176,7 @@ GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax
vecType<L, T, P> const& y, vecType<L, U, P> const & b
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? a[i] : b[i];
return Result;
@ -190,7 +190,7 @@ GLM_FUNC_QUALIFIER vecType<L, T, P> associatedMax
T y, vecType<L, U, P> const & b
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x > y ? a[i] : b[i];
return Result;
@ -204,7 +204,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
vecType<L, T, P> const& y, U b
)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? a : b;
return Result;
@ -232,7 +232,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
vecType<L, T, P> const& z, vecType<L, U, P> const & c
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);
return Result;
@ -247,7 +247,7 @@ GLM_FUNC_QUALIFIER vecType<L, T, P> associatedMax
T z, vecType<L, U, P> const & c
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);
return Result;
@ -262,7 +262,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
vecType<L, T, P> const& z, U c
)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);
return Result;
@ -296,7 +296,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
vecType<L, T, P> const& w, vecType<L, U, P> const & d
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = max(x[i], y[i]);
@ -321,7 +321,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
T Test1 = max(x, y);
T Test2 = max(z, w);
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
U Result1 = x > y ? a[i] : b[i];
@ -341,7 +341,7 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
vecType<L, T, P> const& w, U d
)
{
vecType<L, U, P> Result(uninitialize);
vecType<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i)
{
T Test1 = max(x[i], y[i]);

View File

@ -63,7 +63,6 @@ namespace glm
// -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tdualquat(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & real);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & orientation, vec<3, T, P> const & translation);
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & real, tquat<T, P> const & dual);

View File

@ -47,10 +47,6 @@ namespace glm
// -- Explicit basic constructors --
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tdualquat<T, P>::tdualquat(ctor)
{}
template<typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat(tquat<T, P> const & r)
: real(r), dual(tquat<T, P>(0, 0, 0, 0))
@ -305,7 +301,7 @@ namespace glm
template<typename T, precision P>
GLM_FUNC_QUALIFIER tdualquat<T, P> dualquat_cast(mat<3, 4, T, P> const & x)
{
tquat<T, P> real(uninitialize);
tquat<T, P> real;
T const trace = x[0].x + x[1].y + x[2].z;
if(trace > static_cast<T>(0))
@ -345,7 +341,7 @@ namespace glm
real.w = (x[1].x - x[0].y) * invr;
}
tquat<T, P> dual(uninitialize);
tquat<T, P> dual;
dual.x = static_cast<T>(0.5) * ( x[0].w * real.w + x[1].w * real.z - x[2].w * real.y);
dual.y = static_cast<T>(0.5) * (-x[0].w * real.z + x[1].w * real.w + x[2].w * real.x);
dual.z = static_cast<T>(0.5) * ( x[0].w * real.y - x[1].w * real.x + x[2].w * real.w);

View File

@ -28,7 +28,7 @@ namespace glm
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType>
GLM_FUNC_QUALIFIER vecType<L, T, P> fastPow(vecType<L, T, P> const & x, vecType<L, int, P> const & y)
{
vecType<L, T, P> Result(uninitialize);
vecType<L, T, P> Result;
for(length_t i = 0, n = x.length(); i < n; ++i)
Result[i] = fastPow(x[i], y[i]);
return Result;

View File

@ -16,7 +16,7 @@ namespace glm
template <length_t C, length_t R, typename T, precision P, template<length_t, length_t, typename, precision> class matType>
GLM_FUNC_QUALIFIER matType<C, R, T, P> fliplr(matType<C, R, T, P> const& in)
{
matType<C, R, T, P> out(uninitialize);
matType<C, R, T, P> out;
for (length_t i = 0; i < C; i++)
{
out[i] = in[(C - i) - 1];

View File

@ -27,7 +27,7 @@ namespace glm
T const c = cos(a);
T const s = sin(a);
mat<3, 3, T, P> Result(uninitialize);
mat<3, 3, T, P> Result;
Result[0] = m[0] * c + m[1] * s;
Result[1] = m[0] * -s + m[1] * c;
Result[2] = m[2];
@ -39,7 +39,7 @@ namespace glm
mat<3, 3, T, P> const& m,
vec<2, T, P> const & v)
{
mat<3, 3, T, P> Result(uninitialize);
mat<3, 3, T, P> Result;
Result[0] = m[0] * v[0];
Result[1] = m[1] * v[1];
Result[2] = m[2];

View File

@ -228,7 +228,7 @@ namespace glm
template<typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtRH(tvec3<T, P> const& direction, tvec3<T, P> const& up)
{
tmat3x3<T, P> Result(uninitialize);
tmat3x3<T, P> Result;
Result[2] = -normalize(direction);
Result[0] = normalize(cross(up, Result[2]));
@ -240,7 +240,7 @@ namespace glm
template<typename T, precision P>
GLM_FUNC_QUALIFIER tquat<T, P> quatLookAtLH(tvec3<T, P> const& direction, tvec3<T, P> const& up)
{
tmat3x3<T, P> Result(uninitialize);
tmat3x3<T, P> Result;
Result[2] = normalize(direction);
Result[0] = normalize(cross(up, Result[2]));

View File

@ -19,7 +19,7 @@ namespace glm
vec<3, T, P> const temp((static_cast<T>(1) - c) * axis);
mat<4, 4, T, P> Rotate(uninitialize);
mat<4, 4, T, P> Rotate;
Rotate[0][0] = c + temp[0] * axis[0];
Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
@ -32,7 +32,7 @@ namespace glm
Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
Rotate[2][2] = c + temp[2] * axis[2];
mat<4, 4, T, P> Result(uninitialize);
mat<4, 4, T, P> Result;
Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];

View File

@ -1008,7 +1008,7 @@ GLM_FUNC_QUALIFIER void glm_mat4_rotate(__m128 const in[4], float Angle, float c
Result[2] = TmpC4;
Result[3] = _mm_set_ps(1, 0, 0, 0);
//mat<4, 4, valType> Result(uninitialize);
//mat<4, 4, valType> Result;
//Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
//Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
//Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];

View File

@ -102,6 +102,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
- Removed GLM_DEPTH_ZERO_TO_ONE, use GLM_FORCE_DEPTH_ZERO_TO_ONE instead
- Removed GLM_LEFT_HANDED, use GLM_FORCE_LEFT_HANDED instead
- Removed GLM_FORCE_NO_CTOR_INIT
- Removed glm::uninitialize
---
### [GLM 0.9.8.5](https://github.com/g-truc/glm/tree/0.9.8) - 2017-0X-XX

View File

@ -94,7 +94,7 @@ namespace log2_
for(std::size_t i = 0; i < Count; ++i)
{
glm::vec<4, unsigned long, glm::defaultp> Tmp(glm::uninitialize);
glm::vec<4, unsigned long, glm::defaultp> Tmp;
_BitScanReverse(&Tmp.x, i);
_BitScanReverse(&Tmp.y, i);
_BitScanReverse(&Tmp.z, i);