mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 08:54:35 +00:00
- Added GLM_FORCE_NO_CTOR_INIT
This commit is contained in:
parent
0813facc58
commit
bcd07b50f3
BIN
doc/glm.docx
BIN
doc/glm.docx
Binary file not shown.
@ -81,7 +81,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<bool, P> const & a)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = a[i] ? y[i] : x[i];
|
||||
return Result;
|
||||
|
@ -45,7 +45,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec2, tvec2>::type call(tvec2<T, P> const & c, tvec2<T, P> const & r)
|
||||
{
|
||||
tmat2x2<T, P> m(tmat2x2<T, P>::_null);
|
||||
tmat2x2<T, P> m(uninitialize);
|
||||
m[0][0] = c[0] * r[0];
|
||||
m[0][1] = c[1] * r[0];
|
||||
m[1][0] = c[0] * r[1];
|
||||
@ -59,7 +59,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec3, tvec3>::type call(tvec3<T, P> const & c, tvec3<T, P> const & r)
|
||||
{
|
||||
tmat3x3<T, P> m(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> m(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
|
||||
m[i] = c * r[i];
|
||||
return m;
|
||||
@ -71,7 +71,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec4, tvec4>::type call(tvec4<T, P> const & c, tvec4<T, P> const & r)
|
||||
{
|
||||
tmat4x4<T, P> m(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> m(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(m); ++i)
|
||||
m[i] = c * r[i];
|
||||
return m;
|
||||
@ -83,7 +83,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec3, tvec2>::type call(tvec3<T, P> const & c, tvec2<T, P> const & r)
|
||||
{
|
||||
tmat2x3<T, P> m(tmat2x3<T, P>::_null);
|
||||
tmat2x3<T, P> m(uninitialize);
|
||||
m[0][0] = c.x * r.x;
|
||||
m[0][1] = c.y * r.x;
|
||||
m[0][2] = c.z * r.x;
|
||||
@ -99,7 +99,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec2, tvec3>::type call(tvec2<T, P> const & c, tvec3<T, P> const & r)
|
||||
{
|
||||
tmat3x2<T, P> m(tmat3x2<T, P>::_null);
|
||||
tmat3x2<T, P> m(uninitialize);
|
||||
m[0][0] = c.x * r.x;
|
||||
m[0][1] = c.y * r.x;
|
||||
m[1][0] = c.x * r.y;
|
||||
@ -115,7 +115,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec4, tvec2>::type call(tvec4<T, P> const & c, tvec2<T, P> const & r)
|
||||
{
|
||||
tmat2x4<T, P> m(tmat2x4<T, P>::_null);
|
||||
tmat2x4<T, P> m(uninitialize);
|
||||
m[0][0] = c.x * r.x;
|
||||
m[0][1] = c.y * r.x;
|
||||
m[0][2] = c.z * r.x;
|
||||
@ -133,7 +133,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec2, tvec4>::type call(tvec2<T, P> const & c, tvec4<T, P> const & r)
|
||||
{
|
||||
tmat4x2<T, P> m(tmat4x2<T, P>::_null);
|
||||
tmat4x2<T, P> m(uninitialize);
|
||||
m[0][0] = c.x * r.x;
|
||||
m[0][1] = c.y * r.x;
|
||||
m[1][0] = c.x * r.y;
|
||||
@ -151,7 +151,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec4, tvec3>::type call(tvec4<T, P> const & c, tvec3<T, P> const & r)
|
||||
{
|
||||
tmat3x4<T, P> m(tmat3x4<T, P>::_null);
|
||||
tmat3x4<T, P> m(uninitialize);
|
||||
m[0][0] = c.x * r.x;
|
||||
m[0][1] = c.y * r.x;
|
||||
m[0][2] = c.z * r.x;
|
||||
@ -173,7 +173,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, tvec3, tvec4>::type call(tvec3<T, P> const & c, tvec4<T, P> const & r)
|
||||
{
|
||||
tmat4x3<T, P> m(tmat4x3<T, P>::_null);
|
||||
tmat4x3<T, P> m(uninitialize);
|
||||
m[0][0] = c.x * r.x;
|
||||
m[0][1] = c.y * r.x;
|
||||
m[0][2] = c.z * r.x;
|
||||
@ -198,7 +198,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat2x2<T, P> call(tmat2x2<T, P> const & m)
|
||||
{
|
||||
tmat2x2<T, P> result(tmat2x2<T, P>::_null);
|
||||
tmat2x2<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[1][0] = m[0][1];
|
||||
@ -212,7 +212,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat3x2<T, P> call(tmat2x3<T, P> const & m)
|
||||
{
|
||||
tmat3x2<T, P> result(tmat3x2<T, P>::_null);
|
||||
tmat3x2<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[1][0] = m[0][1];
|
||||
@ -228,7 +228,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat4x2<T, P> call(tmat2x4<T, P> const & m)
|
||||
{
|
||||
tmat4x2<T, P> result(tmat4x2<T, P>::_null);
|
||||
tmat4x2<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[1][0] = m[0][1];
|
||||
@ -246,7 +246,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat2x3<T, P> call(tmat3x2<T, P> const & m)
|
||||
{
|
||||
tmat2x3<T, P> result(tmat2x3<T, P>::_null);
|
||||
tmat2x3<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -262,7 +262,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat3x3<T, P> call(tmat3x3<T, P> const & m)
|
||||
{
|
||||
tmat3x3<T, P> result(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -283,7 +283,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat4x3<T, P> call(tmat3x4<T, P> const & m)
|
||||
{
|
||||
tmat4x3<T, P> result(tmat4x3<T, P>::_null);
|
||||
tmat4x3<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -305,7 +305,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat2x4<T, P> call(tmat4x2<T, P> const & m)
|
||||
{
|
||||
tmat2x4<T, P> result(tmat2x4<T, P>::_null);
|
||||
tmat2x4<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -323,7 +323,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat3x4<T, P> call(tmat4x3<T, P> const & m)
|
||||
{
|
||||
tmat3x4<T, P> result(tmat3x4<T, P>::_null);
|
||||
tmat3x4<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -345,7 +345,7 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static tmat4x4<T, P> call(tmat4x4<T, P> const & m)
|
||||
{
|
||||
tmat4x4<T, P> result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> result(uninitialize);
|
||||
result[0][0] = m[0][0];
|
||||
result[0][1] = m[1][0];
|
||||
result[0][2] = m[2][0];
|
||||
@ -423,7 +423,7 @@ namespace detail
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'matrixCompMult' only accept floating-point inputs");
|
||||
|
||||
matType<T, P> result(matType<T, P>::_null);
|
||||
matType<T, P> result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(result); ++i)
|
||||
result[i] = x[i] * y[i];
|
||||
return result;
|
||||
|
@ -41,7 +41,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(detail::component_count(x) == detail::component_count(y));
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
typename vecType<bool, P>::bool_type Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
|
||||
@ -59,7 +59,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(detail::component_count(x) == detail::component_count(y));
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
typename vecType<bool, P>::bool_type Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
return Result;
|
||||
@ -76,7 +76,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(detail::component_count(x) == detail::component_count(y));
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
typename vecType<bool, P>::bool_type Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
return Result;
|
||||
@ -93,7 +93,7 @@ namespace glm
|
||||
"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors");
|
||||
assert(detail::component_count(x) == detail::component_count(y));
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
typename vecType<bool, P>::bool_type Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
return Result;
|
||||
@ -108,7 +108,7 @@ namespace glm
|
||||
{
|
||||
assert(detail::component_count(x) == detail::component_count(y));
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
typename vecType<bool, P>::bool_type Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] == y[i];
|
||||
return Result;
|
||||
@ -123,7 +123,7 @@ namespace glm
|
||||
{
|
||||
assert(detail::component_count(x) == detail::component_count(y));
|
||||
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
typename vecType<bool, P>::bool_type Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] != y[i];
|
||||
return Result;
|
||||
@ -150,7 +150,7 @@ namespace glm
|
||||
template <precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v)
|
||||
{
|
||||
typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
typename vecType<bool, P>::bool_type Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
|
||||
Result[i] = !v[i];
|
||||
return Result;
|
||||
|
@ -1049,7 +1049,7 @@ GLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float con
|
||||
Result[2] = TmpC4;
|
||||
Result[3] = _mm_set_ps(1, 0, 0, 0);
|
||||
|
||||
//tmat4x4<valType> Result(tmat4x4<valType>::_null);
|
||||
//tmat4x4<valType> Result(uninitialize);
|
||||
//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];
|
||||
|
@ -39,7 +39,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat2x2
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec2<T, P> col_type;
|
||||
|
@ -83,8 +83,10 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()
|
||||
{
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
|
@ -40,7 +40,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat2x3
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec3<T, P> col_type;
|
||||
|
@ -73,8 +73,10 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()
|
||||
{
|
||||
this->value[0] = col_type(T(1), T(0), T(0));
|
||||
this->value[1] = col_type(T(0), T(1), T(0));
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -498,7 +500,7 @@ namespace glm
|
||||
T SrcB20 = m2[2][0];
|
||||
T SrcB21 = m2[2][1];
|
||||
|
||||
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> Result(uninitialize);
|
||||
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
|
||||
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
|
||||
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
|
||||
|
@ -40,7 +40,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat2x4
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec4<T, P> col_type;
|
||||
|
@ -73,10 +73,10 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()
|
||||
{
|
||||
value_type const Zero(0);
|
||||
value_type const One(1);
|
||||
this->value[0] = col_type(One, Zero, Zero, Zero);
|
||||
this->value[1] = col_type(Zero, One, Zero, Zero);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -492,7 +492,7 @@ namespace glm
|
||||
T SrcB30 = m2[3][0];
|
||||
T SrcB31 = m2[3][1];
|
||||
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
|
||||
Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
|
||||
Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
|
||||
|
@ -40,7 +40,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat3x2
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec2<T, P> col_type;
|
||||
|
@ -73,9 +73,11 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()
|
||||
{
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
this->value[2] = col_type(0, 0);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
this->value[2] = col_type(0, 0);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -520,7 +522,7 @@ namespace glm
|
||||
const T SrcB11 = m2[1][1];
|
||||
const T SrcB12 = m2[1][2];
|
||||
|
||||
tmat2x2<T, P> Result(tmat2x2<T, P>::_null);
|
||||
tmat2x2<T, P> Result(uninitialize);
|
||||
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;
|
||||
|
@ -39,7 +39,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat3x3
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec3<T, P> col_type;
|
||||
|
@ -37,7 +37,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]));
|
||||
|
||||
tmat3x3<T, P> Inverse(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> Inverse(uninitialize);
|
||||
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;
|
||||
@ -97,11 +97,11 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()
|
||||
{
|
||||
value_type const Zero(0);
|
||||
value_type const One(1);
|
||||
this->value[0] = col_type(One, Zero, Zero);
|
||||
this->value[1] = col_type(Zero, One, Zero);
|
||||
this->value[2] = col_type(Zero, Zero, One);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
this->value[2] = col_type(0, 0, 1);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -596,7 +596,7 @@ namespace detail
|
||||
T const SrcB21 = m2[2][1];
|
||||
T const SrcB22 = m2[2][2];
|
||||
|
||||
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> Result(uninitialize);
|
||||
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;
|
||||
|
@ -40,7 +40,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat3x4
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef size_t size_type;
|
||||
typedef tvec4<T, P> col_type;
|
||||
|
@ -73,9 +73,11 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()
|
||||
{
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
this->value[2] = col_type(0, 0, 1, 0);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
this->value[2] = col_type(0, 0, 1, 0);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -535,7 +537,7 @@ namespace glm
|
||||
const T SrcB31 = m2[3][1];
|
||||
const T SrcB32 = m2[3][2];
|
||||
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
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;
|
||||
|
@ -40,7 +40,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat4x2
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec2<T, P> col_type;
|
||||
|
@ -73,12 +73,12 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()
|
||||
{
|
||||
value_type const Zero(0);
|
||||
value_type const One(1);
|
||||
this->value[0] = col_type(One, Zero);
|
||||
this->value[1] = col_type(Zero, One);
|
||||
this->value[2] = col_type(Zero, Zero);
|
||||
this->value[3] = col_type(Zero, Zero);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0);
|
||||
this->value[1] = col_type(0, 1);
|
||||
this->value[2] = col_type(0, 0);
|
||||
this->value[3] = col_type(0, 0);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -569,7 +569,7 @@ namespace glm
|
||||
T const SrcB12 = m2[1][2];
|
||||
T const SrcB13 = m2[1][3];
|
||||
|
||||
tmat2x2<T, P> Result(tmat2x2<T, P>::_null);
|
||||
tmat2x2<T, P> Result(uninitialize);
|
||||
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;
|
||||
|
@ -40,7 +40,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat4x3
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec3<T, P> col_type;
|
||||
|
@ -73,12 +73,12 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()
|
||||
{
|
||||
value_type const Zero(0);
|
||||
value_type const One(1);
|
||||
this->value[0] = col_type(One, Zero, Zero);
|
||||
this->value[1] = col_type(Zero, One, Zero);
|
||||
this->value[2] = col_type(Zero, Zero, One);
|
||||
this->value[3] = col_type(Zero, Zero, Zero);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0);
|
||||
this->value[2] = col_type(0, 0, 1);
|
||||
this->value[3] = col_type(0, 0, 0);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -563,7 +563,7 @@ namespace glm
|
||||
T const SrcB22 = m2[2][2];
|
||||
T const SrcB23 = m2[2][3];
|
||||
|
||||
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> Result(uninitialize);
|
||||
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;
|
||||
|
@ -39,7 +39,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tmat4x4
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef tvec4<T, P> col_type;
|
||||
|
@ -133,12 +133,12 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()
|
||||
{
|
||||
T Zero(0);
|
||||
T One(1);
|
||||
this->value[0] = col_type(One, Zero, Zero, Zero);
|
||||
this->value[1] = col_type(Zero, One, Zero, Zero);
|
||||
this->value[2] = col_type(Zero, Zero, One, Zero);
|
||||
this->value[3] = col_type(Zero, Zero, Zero, One);
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->value[0] = col_type(1, 0, 0, 0);
|
||||
this->value[1] = col_type(0, 1, 0, 0);
|
||||
this->value[2] = col_type(0, 0, 1, 0);
|
||||
this->value[3] = col_type(0, 0, 0, 1);
|
||||
# endif
|
||||
}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -772,7 +772,7 @@ namespace detail
|
||||
typename tmat4x4<T, P>::col_type const SrcB2 = m2[2];
|
||||
typename tmat4x4<T, P>::col_type const SrcB3 = m2[3];
|
||||
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
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];
|
||||
|
@ -33,6 +33,8 @@
|
||||
|
||||
namespace glm
|
||||
{
|
||||
enum ctor{uninitialize};
|
||||
|
||||
template <typename T, precision P> struct tvec1;
|
||||
template <typename T, precision P> struct tvec2;
|
||||
template <typename T, precision P> struct tvec3;
|
||||
|
@ -47,8 +47,6 @@ namespace glm
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
|
||||
enum ctor{_null};
|
||||
|
||||
typedef tvec1<T, P> type;
|
||||
typedef tvec1<bool, P> bool_type;
|
||||
typedef T value_type;
|
||||
|
@ -63,8 +63,10 @@ namespace glm
|
||||
// Implicit basic constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1() :
|
||||
x(static_cast<T>(0))
|
||||
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0)
|
||||
# endif
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
|
@ -47,8 +47,6 @@ namespace glm
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
|
||||
enum ctor{_null};
|
||||
|
||||
typedef tvec2<T, P> type;
|
||||
typedef tvec2<bool, P> bool_type;
|
||||
typedef T value_type;
|
||||
|
@ -63,22 +63,21 @@ namespace glm
|
||||
// Implicit basic constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2() :
|
||||
x(0),
|
||||
y(0)
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0), y(0)
|
||||
# endif
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, P> const & v) :
|
||||
x(v.x),
|
||||
y(v.y)
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, P> const & v)
|
||||
: x(v.x), y(v.y)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v) :
|
||||
x(v.x),
|
||||
y(v.y)
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v)
|
||||
: x(v.x), y(v.y)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -90,14 +89,12 @@ namespace glm
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s) :
|
||||
x(s),
|
||||
y(s)
|
||||
x(s), y(s)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s1, T const & s2) :
|
||||
x(s1),
|
||||
y(s2)
|
||||
x(s1), y(s2)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
|
@ -47,8 +47,6 @@ namespace glm
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
|
||||
enum ctor{_null};
|
||||
|
||||
typedef tvec3<T, P> type;
|
||||
typedef tvec3<bool, P> bool_type;
|
||||
typedef T value_type;
|
||||
|
@ -63,25 +63,21 @@ namespace glm
|
||||
// Implicit basic constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3() :
|
||||
x(0),
|
||||
y(0),
|
||||
z(0)
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0), y(0), z(0)
|
||||
# endif
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, P> const & v) :
|
||||
x(v.x),
|
||||
y(v.y),
|
||||
z(v.z)
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, P> const & v)
|
||||
: x(v.x), y(v.y), z(v.z)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v) :
|
||||
x(v.x),
|
||||
y(v.y),
|
||||
z(v.z)
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v)
|
||||
: x(v.x), y(v.y), z(v.z)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
@ -92,17 +88,13 @@ namespace glm
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & s) :
|
||||
x(s),
|
||||
y(s),
|
||||
z(s)
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & s)
|
||||
: x(s), y(s), z(s)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & a, T const & b, T const & c) :
|
||||
x(a),
|
||||
y(b),
|
||||
z(c)
|
||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & a, T const & b, T const & c)
|
||||
: x(a), y(b), z(c)
|
||||
{}
|
||||
|
||||
//////////////////////////////////////
|
||||
|
@ -70,8 +70,6 @@ namespace glm
|
||||
//////////////////////////////////////
|
||||
// Implementation detail
|
||||
|
||||
enum ctor{_null};
|
||||
|
||||
typedef tvec4<T, P> type;
|
||||
typedef tvec4<bool, P> bool_type;
|
||||
typedef T value_type;
|
||||
|
@ -63,42 +63,42 @@ namespace glm
|
||||
// Implicit basic constructors
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4() :
|
||||
x(0),
|
||||
y(0),
|
||||
z(0),
|
||||
w(0)
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0), y(0), z(0), w(0)
|
||||
# endif
|
||||
{}
|
||||
|
||||
#if (GLM_HAS_UNRESTRICTED_UNIONS || GLM_HAS_ANONYMOUS_UNION) && (GLM_ARCH & GLM_ARCH_SSE2)
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4() :
|
||||
data(_mm_setzero_ps())
|
||||
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: data(_mm_setzero_ps())
|
||||
# endif
|
||||
{}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4() :
|
||||
data(_mm_setzero_ps())
|
||||
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: data(_mm_setzero_ps())
|
||||
# endif
|
||||
{}
|
||||
#endif
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v) :
|
||||
x(v.x),
|
||||
y(v.y),
|
||||
z(v.z),
|
||||
w(v.w)
|
||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
|
||||
: x(v.x), y(v.y), z(v.z), w(v.w)
|
||||
{}
|
||||
|
||||
#if (GLM_HAS_UNRESTRICTED_UNIONS || GLM_HAS_ANONYMOUS_UNION) && (GLM_ARCH & GLM_ARCH_SSE2)
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(tvec4<float, lowp> const & v) :
|
||||
data(v.data)
|
||||
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(tvec4<float, lowp> const & v)
|
||||
: data(v.data)
|
||||
{}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(tvec4<float, mediump> const & v) :
|
||||
data(v.data)
|
||||
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(tvec4<float, mediump> const & v)
|
||||
: data(v.data)
|
||||
{}
|
||||
#endif
|
||||
|
||||
|
@ -59,7 +59,7 @@ namespace glm
|
||||
tvec3<T, P> axis(normalize(v));
|
||||
tvec3<T, P> temp((T(1) - c) * axis);
|
||||
|
||||
tmat4x4<T, P> Rotate(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Rotate(uninitialize);
|
||||
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];
|
||||
@ -72,7 +72,7 @@ namespace glm
|
||||
Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
|
||||
Rotate[2][2] = c + temp[2] * axis[2];
|
||||
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
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];
|
||||
@ -121,7 +121,7 @@ namespace glm
|
||||
tvec3<T, P> const & v
|
||||
)
|
||||
{
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
Result[0] = m[0] * v[0];
|
||||
Result[1] = m[1] * v[1];
|
||||
Result[2] = m[2] * v[2];
|
||||
|
@ -58,8 +58,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tquat
|
||||
{
|
||||
enum ctor{_null};
|
||||
|
||||
typedef T value_type;
|
||||
typedef tvec4<bool, P> bool_type;
|
||||
|
||||
|
@ -60,34 +60,21 @@ namespace detail
|
||||
#endif
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat() :
|
||||
x(0),
|
||||
y(0),
|
||||
z(0),
|
||||
w(1)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: x(0), y(0), z(0), w(1)
|
||||
# endif
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat
|
||||
(
|
||||
tquat<T, P> const & q
|
||||
) :
|
||||
x(q.x),
|
||||
y(q.y),
|
||||
z(q.z),
|
||||
w(q.w)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, P> const & q) :
|
||||
x(q.x), y(q.y), z(q.z), w(q.w)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat
|
||||
(
|
||||
tquat<T, Q> const & q
|
||||
) :
|
||||
x(q.x),
|
||||
y(q.y),
|
||||
z(q.z),
|
||||
w(q.w)
|
||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tquat<T, Q> const & q) :
|
||||
x(q.x), y(q.y), z(q.z), w(q.w)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
@ -746,7 +733,7 @@ namespace detail
|
||||
T biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);
|
||||
T mult = static_cast<T>(0.25) / biggestVal;
|
||||
|
||||
tquat<T, P> Result(tquat<T, P>::_null);
|
||||
tquat<T, P> Result(uninitialize);
|
||||
switch(biggestIndex)
|
||||
{
|
||||
case 0:
|
||||
@ -819,7 +806,7 @@ namespace detail
|
||||
tvec3<T, P> const & v
|
||||
)
|
||||
{
|
||||
tquat<T, P> Result(tquat<T, P>::_null);
|
||||
tquat<T, P> Result(uninitialize);
|
||||
|
||||
T const a(angle);
|
||||
T const s = glm::sin(a * static_cast<T>(0.5));
|
||||
@ -838,7 +825,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
return Result;
|
||||
@ -851,7 +838,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
return Result;
|
||||
@ -864,7 +851,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
return Result;
|
||||
@ -877,7 +864,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
return Result;
|
||||
@ -890,7 +877,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] == y[i];
|
||||
return Result;
|
||||
@ -903,7 +890,7 @@ namespace detail
|
||||
tquat<T, P> const & y
|
||||
)
|
||||
{
|
||||
tvec4<bool, P> Result(tvec4<bool, P>::_null);
|
||||
tvec4<bool, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(x); ++i)
|
||||
Result[i] = x[i] != y[i];
|
||||
return Result;
|
||||
|
@ -227,7 +227,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = next_float(x[i]);
|
||||
return Result;
|
||||
@ -262,7 +262,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = prev_float(x[i]);
|
||||
return Result;
|
||||
@ -280,7 +280,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = next_float(x[i], ulps[i]);
|
||||
return Result;
|
||||
@ -298,7 +298,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = prev_float(x[i], ulps[i]);
|
||||
return Result;
|
||||
@ -338,7 +338,7 @@ namespace glm
|
||||
template<typename T, precision P, template<typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<uint, P> float_distance(vecType<T, P> const & x, vecType<T, P> const & y)
|
||||
{
|
||||
vecType<uint, P> Result(vecType<T, P>::_null);
|
||||
vecType<uint, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = float_distance(x[i], y[i]);
|
||||
return Result;
|
||||
|
@ -23,7 +23,7 @@ GLM_FUNC_QUALIFIER tvec2<U, P> associatedMin
|
||||
vecType<T, P> const & y, vecType<U, P> const & b
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x[i] < y[i] ? a[i] : b[i];
|
||||
return Result;
|
||||
@ -36,7 +36,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
|
||||
T y, const vecType<U, P>& b
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x < y ? a[i] : b[i];
|
||||
return Result;
|
||||
@ -49,7 +49,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
|
||||
vecType<T, P> const & y, U b
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x[i] < y[i] ? a : b;
|
||||
return Result;
|
||||
@ -76,7 +76,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
|
||||
vecType<T, P> const & z, vecType<U, P> const & c
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++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;
|
||||
@ -110,7 +110,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
|
||||
vecType<T, P> const & w, vecType<U, P> const & d
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
{
|
||||
T Test1 = min(x[i], y[i]);
|
||||
@ -135,7 +135,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
|
||||
T Test1 = min(x, y);
|
||||
T Test2 = min(z, w);
|
||||
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
{
|
||||
U Result1 = x < y ? a[i] : b[i];
|
||||
@ -155,7 +155,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMin
|
||||
vecType<T, P> const & w, U d
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
{
|
||||
T Test1 = min(x[i], y[i]);
|
||||
@ -182,7 +182,7 @@ GLM_FUNC_QUALIFIER tvec2<U, P> associatedMax
|
||||
vecType<T, P> const & y, vecType<U, P> const & b
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x[i] > y[i] ? a[i] : b[i];
|
||||
return Result;
|
||||
@ -196,7 +196,7 @@ GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
|
||||
T y, vecType<U, P> const & b
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x > y ? a[i] : b[i];
|
||||
return Result;
|
||||
@ -210,7 +210,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
|
||||
vecType<T, P> const & y, U b
|
||||
)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x[i] > y[i] ? a : b;
|
||||
return Result;
|
||||
@ -238,7 +238,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
|
||||
vecType<T, P> const & z, vecType<U, P> const & c
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++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;
|
||||
@ -253,7 +253,7 @@ GLM_FUNC_QUALIFIER vecType<T, P> associatedMax
|
||||
T z, vecType<U, P> const & c
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);
|
||||
return Result;
|
||||
@ -268,7 +268,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
|
||||
vecType<T, P> const & z, U c
|
||||
)
|
||||
{
|
||||
vecType<T, P> Result(vecType<T, P>::_null);
|
||||
vecType<T, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);
|
||||
return Result;
|
||||
@ -302,7 +302,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
|
||||
vecType<T, P> const & w, vecType<U, P> const & d
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
{
|
||||
T Test1 = max(x[i], y[i]);
|
||||
@ -327,7 +327,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
|
||||
T Test1 = max(x, y);
|
||||
T Test2 = max(z, w);
|
||||
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
{
|
||||
U Result1 = x > y ? a[i] : b[i];
|
||||
@ -347,7 +347,7 @@ GLM_FUNC_QUALIFIER vecType<U, P> associatedMax
|
||||
vecType<T, P> const & w, U d
|
||||
)
|
||||
{
|
||||
vecType<U, P> Result(vecType<U, P>::_null);
|
||||
vecType<U, P> Result(uninitialize);
|
||||
for(detail::component_count_t i = 0; i < detail::component_count(Result); ++i)
|
||||
{
|
||||
T Test1 = max(x[i], y[i]);
|
||||
|
@ -57,7 +57,6 @@ namespace glm
|
||||
template <typename T, precision P>
|
||||
struct tdualquat
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef T value_type;
|
||||
typedef glm::tquat<T, P> part_type;
|
||||
|
||||
|
@ -46,26 +46,22 @@ namespace glm
|
||||
#endif
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat() :
|
||||
real(tquat<T, P>()),
|
||||
dual(tquat<T, P>(T(0), T(0), T(0), T(0)))
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat()
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
: real(tquat<T, P>())
|
||||
, dual(tquat<T, P>(0, 0, 0, 0))
|
||||
# endif
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat
|
||||
(
|
||||
tdualquat<T, P> const & d
|
||||
) :
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, P> const & d) :
|
||||
real(d.real),
|
||||
dual(d.dual)
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
template <precision Q>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat
|
||||
(
|
||||
tdualquat<T, Q> const & d
|
||||
) :
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tdualquat<T, Q> const & d) :
|
||||
real(d.real),
|
||||
dual(d.dual)
|
||||
{}
|
||||
@ -78,12 +74,9 @@ namespace glm
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat
|
||||
(
|
||||
tquat<T, P> const & r
|
||||
) :
|
||||
GLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat(tquat<T, P> const & r) :
|
||||
real(r),
|
||||
dual(tquat<T, P>(T(0), T(0), T(0), T(0)))
|
||||
dual(tquat<T, P>(0, 0, 0, 0))
|
||||
{}
|
||||
|
||||
template <typename T, precision P>
|
||||
|
@ -51,7 +51,7 @@ namespace glm
|
||||
T const c = cos(a);
|
||||
T const s = sin(a);
|
||||
|
||||
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> Result(uninitialize);
|
||||
Result[0] = m[0] * c + m[1] * s;
|
||||
Result[1] = m[0] * -s + m[1] * c;
|
||||
Result[2] = m[2];
|
||||
@ -63,7 +63,7 @@ namespace glm
|
||||
tmat3x3<T, P> const & m,
|
||||
tvec2<T, P> const & v)
|
||||
{
|
||||
tmat3x3<T, P> Result(tmat3x3<T, P>::_null);
|
||||
tmat3x3<T, P> Result(uninitialize);
|
||||
Result[0] = m[0] * v[0];
|
||||
Result[1] = m[1] * v[1];
|
||||
Result[2] = m[2];
|
||||
|
@ -44,7 +44,7 @@ namespace glm
|
||||
|
||||
tvec3<T, P> const temp((static_cast<T>(1) - c) * axis);
|
||||
|
||||
tmat4x4<T, P> Rotate(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Rotate(uninitialize);
|
||||
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];
|
||||
@ -57,7 +57,7 @@ namespace glm
|
||||
Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
|
||||
Rotate[2][2] = c + temp[2] * axis[2];
|
||||
|
||||
tmat4x4<T, P> Result(tmat4x4<T, P>::_null);
|
||||
tmat4x4<T, P> Result(uninitialize);
|
||||
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];
|
||||
|
@ -60,7 +60,6 @@ namespace detail
|
||||
/// \ingroup gtx_simd_mat4
|
||||
GLM_ALIGNED_STRUCT(16) fmat4x4SIMD
|
||||
{
|
||||
enum ctor{_null};
|
||||
typedef float value_type;
|
||||
typedef fvec4SIMD col_type;
|
||||
typedef fvec4SIMD row_type;
|
||||
|
@ -43,12 +43,12 @@ GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[]
|
||||
|
||||
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD()
|
||||
{
|
||||
#ifndef GLM_SIMD_ENABLE_DEFAULT_INIT
|
||||
this->Data[0] = fvec4SIMD(1.0f, 0, 0, 0);
|
||||
this->Data[1] = fvec4SIMD(0, 1.0f, 0, 0);
|
||||
this->Data[2] = fvec4SIMD(0, 0, 1.0f, 0);
|
||||
this->Data[3] = fvec4SIMD(0, 0, 0, 1.0f);
|
||||
#endif
|
||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||
this->Data[0] = fvec4SIMD(1, 0, 0, 0);
|
||||
this->Data[1] = fvec4SIMD(0, 1, 0, 0);
|
||||
this->Data[2] = fvec4SIMD(0, 0, 1, 0);
|
||||
this->Data[3] = fvec4SIMD(0, 0, 0, 1);
|
||||
# endif
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s)
|
||||
@ -554,7 +554,7 @@ GLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct
|
||||
__m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2));
|
||||
__m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3));
|
||||
|
||||
detail::fmat4x4SIMD result(detail::fmat4x4SIMD::_null);
|
||||
detail::fmat4x4SIMD result(uninitialize);
|
||||
result[0].Data = _mm_mul_ps(c.Data, Shu0);
|
||||
result[1].Data = _mm_mul_ps(c.Data, Shu1);
|
||||
result[2].Data = _mm_mul_ps(c.Data, Shu2);
|
||||
|
@ -69,7 +69,6 @@ namespace detail
|
||||
/// \ingroup gtx_simd_vec4
|
||||
GLM_ALIGNED_STRUCT(16) fquatSIMD
|
||||
{
|
||||
enum ctor{null};
|
||||
typedef __m128 value_type;
|
||||
typedef std::size_t size_type;
|
||||
static size_type value_size();
|
||||
|
@ -34,9 +34,9 @@ void print(const fvec4SIMD &v)
|
||||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD()
|
||||
#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT
|
||||
: Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f))
|
||||
#endif
|
||||
# ifdef GLM_FORCE_NO_CTOR_INIT
|
||||
: Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f))
|
||||
# endif
|
||||
{}
|
||||
|
||||
GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(__m128 const & Data) :
|
||||
|
@ -88,7 +88,6 @@ namespace detail
|
||||
/// \ingroup gtx_simd_vec4
|
||||
GLM_ALIGNED_STRUCT(16) fvec4SIMD
|
||||
{
|
||||
enum ctor{null};
|
||||
typedef __m128 value_type;
|
||||
typedef std::size_t size_type;
|
||||
static size_type value_size();
|
||||
|
@ -20,9 +20,9 @@ struct mask
|
||||
// Implicit basic constructors
|
||||
|
||||
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD()
|
||||
#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT
|
||||
: Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f))
|
||||
#endif
|
||||
# ifdef GLM_FORCE_NO_CTOR_INIT
|
||||
: Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f))
|
||||
# endif
|
||||
{}
|
||||
|
||||
GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) :
|
||||
|
@ -73,6 +73,8 @@ GLM 0.9.6.0: 2014-XX-XX
|
||||
- Undetected C++ compiler automatically compile with GLM_FORCE_CXX98 and
|
||||
GLM_FORCE_PURE
|
||||
- Separated Apple Clang and LLVM compiler detection
|
||||
- Added GLM_FORCE_NO_CTOR_INIT
|
||||
- Added 'uninitialize' to explicitly not initialize a GLM type
|
||||
|
||||
================================================================================
|
||||
GLM 0.9.5.4: 2014-06-21
|
||||
|
Loading…
Reference in New Issue
Block a user