mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 19:34:36 +00:00
remove template alias for more compiler support and simplified swizzle expression implementation #584
This commit is contained in:
parent
4dd748f380
commit
947b07cbc4
@ -24,19 +24,19 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> permute(tvec2<T, P> const & x)
|
GLM_FUNC_QUALIFIER vec<2, T, P> permute(vec<2, T, P> const & x)
|
||||||
{
|
{
|
||||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> permute(tvec3<T, P> const & x)
|
GLM_FUNC_QUALIFIER vec<3, T, P> permute(vec<3, T, P> const & x)
|
||||||
{
|
{
|
||||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> permute(tvec4<T, P> const & x)
|
GLM_FUNC_QUALIFIER vec<4, T, P> permute(vec<4, T, P> const & x)
|
||||||
{
|
{
|
||||||
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
|
||||||
}
|
}
|
||||||
@ -54,19 +54,19 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> taylorInvSqrt(tvec2<T, P> const & r)
|
GLM_FUNC_QUALIFIER vec<2, T, P> taylorInvSqrt(vec<2, T, P> const & r)
|
||||||
{
|
{
|
||||||
return T(1.79284291400159) - T(0.85373472095314) * r;
|
return T(1.79284291400159) - T(0.85373472095314) * r;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> taylorInvSqrt(tvec3<T, P> const & r)
|
GLM_FUNC_QUALIFIER vec<3, T, P> taylorInvSqrt(vec<3, T, P> const & r)
|
||||||
{
|
{
|
||||||
return T(1.79284291400159) - T(0.85373472095314) * r;
|
return T(1.79284291400159) - T(0.85373472095314) * r;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> taylorInvSqrt(tvec4<T, P> const & r)
|
GLM_FUNC_QUALIFIER vec<4, T, P> taylorInvSqrt(vec<4, T, P> const & r)
|
||||||
{
|
{
|
||||||
return T(1.79284291400159) - T(0.85373472095314) * r;
|
return T(1.79284291400159) - T(0.85373472095314) * r;
|
||||||
}
|
}
|
||||||
@ -79,19 +79,19 @@ namespace detail
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> fade(tvec2<T, P> const & t)
|
GLM_FUNC_QUALIFIER vec<2, T, P> fade(vec<2, T, P> const & t)
|
||||||
{
|
{
|
||||||
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> fade(tvec3<T, P> const & t)
|
GLM_FUNC_QUALIFIER vec<3, T, P> fade(vec<3, T, P> const & t)
|
||||||
{
|
{
|
||||||
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> fade(tvec4<T, P> const & t)
|
GLM_FUNC_QUALIFIER vec<4, T, P> fade(vec<4, T, P> const & t)
|
||||||
{
|
{
|
||||||
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ namespace detail
|
|||||||
Template parameters:
|
Template parameters:
|
||||||
|
|
||||||
ValueType = type of scalar values (e.g. float, double)
|
ValueType = type of scalar values (e.g. float, double)
|
||||||
VecType = class the swizzle is applies to (e.g. tvec3<float>)
|
VecType = class the swizzle is applies to (e.g. vec<3, float>)
|
||||||
N = number of components in the vector (e.g. 3)
|
N = number of components in the vector (e.g. 3)
|
||||||
E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec
|
E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -17,36 +17,36 @@ namespace detail
|
|||||||
template <typename R, typename T, precision P>
|
template <typename R, typename T, precision P>
|
||||||
struct functor1<1, R, T, P>
|
struct functor1<1, R, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec1<R, P> call(R (*Func) (T x), tvec1<T, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<1, R, P> call(R (*Func) (T x), vec<1, T, P> const & v)
|
||||||
{
|
{
|
||||||
return tvec1<R, P>(Func(v.x));
|
return vec<1, R, P>(Func(v.x));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename R, typename T, precision P>
|
template <typename R, typename T, precision P>
|
||||||
struct functor1<2, R, T, P>
|
struct functor1<2, R, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec2<R, P> call(R (*Func) (T x), tvec2<T, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<2, R, P> call(R (*Func) (T x), vec<2, T, P> const & v)
|
||||||
{
|
{
|
||||||
return tvec2<R, P>(Func(v.x), Func(v.y));
|
return vec<2, R, P>(Func(v.x), Func(v.y));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename R, typename T, precision P>
|
template <typename R, typename T, precision P>
|
||||||
struct functor1<3, R, T, P>
|
struct functor1<3, R, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec3<R, P> call(R (*Func) (T x), tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<3, R, P> call(R (*Func) (T x), vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
return tvec3<R, P>(Func(v.x), Func(v.y), Func(v.z));
|
return vec<3, R, P>(Func(v.x), Func(v.y), Func(v.z));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename R, typename T, precision P>
|
template <typename R, typename T, precision P>
|
||||||
struct functor1<4, R, T, P>
|
struct functor1<4, R, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<R, P> call(R (*Func) (T x), tvec4<T, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, R, P> call(R (*Func) (T x), vec<4, T, P> const & v)
|
||||||
{
|
{
|
||||||
return tvec4<R, P>(Func(v.x), Func(v.y), Func(v.z), Func(v.w));
|
return vec<4, R, P>(Func(v.x), Func(v.y), Func(v.z), Func(v.w));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -56,36 +56,36 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2<1, T, P>
|
struct functor2<1, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec1<T, P> call(T (*Func) (T x, T y), tvec1<T, P> const & a, tvec1<T, P> const & b)
|
GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, vec<1, T, P> const & b)
|
||||||
{
|
{
|
||||||
return tvec1<T, P>(Func(a.x, b.x));
|
return vec<1, T, P>(Func(a.x, b.x));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2<2, T, P>
|
struct functor2<2, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec2<T, P> call(T (*Func) (T x, T y), tvec2<T, P> const & a, tvec2<T, P> const & b)
|
GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, vec<2, T, P> const & b)
|
||||||
{
|
{
|
||||||
return tvec2<T, P>(Func(a.x, b.x), Func(a.y, b.y));
|
return vec<2, T, P>(Func(a.x, b.x), Func(a.y, b.y));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2<3, T, P>
|
struct functor2<3, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec3<T, P> call(T (*Func) (T x, T y), tvec3<T, P> const & a, tvec3<T, P> const & b)
|
GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, vec<3, T, P> const & b)
|
||||||
{
|
{
|
||||||
return tvec3<T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
|
return vec<3, T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2<4, T, P>
|
struct functor2<4, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<T, P> call(T (*Func) (T x, T y), tvec4<T, P> const & a, tvec4<T, P> const & b)
|
GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, vec<4, T, P> const & b)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
|
return vec<4, T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -95,36 +95,36 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2_vec_sca<1, T, P>
|
struct functor2_vec_sca<1, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec1<T, P> call(T (*Func) (T x, T y), tvec1<T, P> const & a, T b)
|
GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, T b)
|
||||||
{
|
{
|
||||||
return tvec1<T, P>(Func(a.x, b));
|
return vec<1, T, P>(Func(a.x, b));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2_vec_sca<2, T, P>
|
struct functor2_vec_sca<2, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec2<T, P> call(T (*Func) (T x, T y), tvec2<T, P> const & a, T b)
|
GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, T b)
|
||||||
{
|
{
|
||||||
return tvec2<T, P>(Func(a.x, b), Func(a.y, b));
|
return vec<2, T, P>(Func(a.x, b), Func(a.y, b));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2_vec_sca<3, T, P>
|
struct functor2_vec_sca<3, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec3<T, P> call(T (*Func) (T x, T y), tvec3<T, P> const & a, T b)
|
GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, T b)
|
||||||
{
|
{
|
||||||
return tvec3<T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
|
return vec<3, T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct functor2_vec_sca<4, T, P>
|
struct functor2_vec_sca<4, T, P>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<T, P> call(T (*Func) (T x, T y), tvec4<T, P> const & a, T b)
|
GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, T b)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));
|
return vec<4, T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
@ -326,7 +326,7 @@ namespace detail
|
|||||||
std::numeric_limits<genFIType>::is_iec559 || (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer),
|
std::numeric_limits<genFIType>::is_iec559 || (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer),
|
||||||
"'sign' only accept signed inputs");
|
"'sign' only accept signed inputs");
|
||||||
|
|
||||||
return detail::compute_sign<1, genFIType, defaultp, vec, std::numeric_limits<genFIType>::is_iec559, highp>::call(tvec1<genFIType>(x)).x;
|
return detail::compute_sign<1, genFIType, defaultp, vec, std::numeric_limits<genFIType>::is_iec559, highp>::call(vec<1, genFIType>(x)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
@ -425,7 +425,7 @@ namespace detail
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType fract(genType x)
|
GLM_FUNC_QUALIFIER genType fract(genType x)
|
||||||
{
|
{
|
||||||
return fract(tvec1<genType>(x)).x;
|
return fract(vec<1, genType>(x)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
@ -441,10 +441,10 @@ namespace detail
|
|||||||
{
|
{
|
||||||
# if GLM_COMPILER & GLM_COMPILER_CUDA
|
# if GLM_COMPILER & GLM_COMPILER_CUDA
|
||||||
// Another Cuda compiler bug https://github.com/g-truc/glm/issues/530
|
// Another Cuda compiler bug https://github.com/g-truc/glm/issues/530
|
||||||
tvec1<genType, defaultp> Result(mod(tvec1<genType, defaultp>(x), y));
|
vec<1, genType, defaultp> Result(mod(vec<1, genType, defaultp>(x), y));
|
||||||
return Result.x;
|
return Result.x;
|
||||||
# else
|
# else
|
||||||
return mod(tvec1<genType, defaultp>(x), y).x;
|
return mod(vec<1, genType, defaultp>(x), y).x;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,33 +469,33 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec1<T, P> modf(tvec1<T, P> const & x, tvec1<T, P> & i)
|
GLM_FUNC_QUALIFIER vec<1, T, P> modf(vec<1, T, P> const & x, vec<1, T, P> & i)
|
||||||
{
|
{
|
||||||
return tvec1<T, P>(
|
return vec<1, T, P>(
|
||||||
modf(x.x, i.x));
|
modf(x.x, i.x));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> modf(tvec2<T, P> const & x, tvec2<T, P> & i)
|
GLM_FUNC_QUALIFIER vec<2, T, P> modf(vec<2, T, P> const & x, vec<2, T, P> & i)
|
||||||
{
|
{
|
||||||
return tvec2<T, P>(
|
return vec<2, T, P>(
|
||||||
modf(x.x, i.x),
|
modf(x.x, i.x),
|
||||||
modf(x.y, i.y));
|
modf(x.y, i.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> modf(tvec3<T, P> const & x, tvec3<T, P> & i)
|
GLM_FUNC_QUALIFIER vec<3, T, P> modf(vec<3, T, P> const & x, vec<3, T, P> & i)
|
||||||
{
|
{
|
||||||
return tvec3<T, P>(
|
return vec<3, T, P>(
|
||||||
modf(x.x, i.x),
|
modf(x.x, i.x),
|
||||||
modf(x.y, i.y),
|
modf(x.y, i.y),
|
||||||
modf(x.z, i.z));
|
modf(x.z, i.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> modf(tvec4<T, P> const & x, tvec4<T, P> & i)
|
GLM_FUNC_QUALIFIER vec<4, T, P> modf(vec<4, T, P> const & x, vec<4, T, P> & i)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(
|
return vec<4, T, P>(
|
||||||
modf(x.x, i.x),
|
modf(x.x, i.x),
|
||||||
modf(x.y, i.y),
|
modf(x.y, i.y),
|
||||||
modf(x.z, i.z),
|
modf(x.z, i.z),
|
||||||
@ -753,40 +753,40 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec1<T, P> frexp(tvec1<T, P> const & x, tvec1<int, P> & exp)
|
GLM_FUNC_QUALIFIER vec<1, T, P> frexp(vec<1, T, P> const & x, vec<1, int, P> & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec1<T, P>(std::frexp(x.x, &exp.x));
|
return vec<1, T, P>(std::frexp(x.x, &exp.x));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> frexp(tvec2<T, P> const & x, tvec2<int, P> & exp)
|
GLM_FUNC_QUALIFIER vec<2, T, P> frexp(vec<2, T, P> const & x, vec<2, int, P> & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec2<T, P>(
|
return vec<2, T, P>(
|
||||||
frexp(x.x, exp.x),
|
frexp(x.x, exp.x),
|
||||||
frexp(x.y, exp.y));
|
frexp(x.y, exp.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> frexp(tvec3<T, P> const & x, tvec3<int, P> & exp)
|
GLM_FUNC_QUALIFIER vec<3, T, P> frexp(vec<3, T, P> const & x, vec<3, int, P> & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec3<T, P>(
|
return vec<3, T, P>(
|
||||||
frexp(x.x, exp.x),
|
frexp(x.x, exp.x),
|
||||||
frexp(x.y, exp.y),
|
frexp(x.y, exp.y),
|
||||||
frexp(x.z, exp.z));
|
frexp(x.z, exp.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> frexp(tvec4<T, P> const & x, tvec4<int, P> & exp)
|
GLM_FUNC_QUALIFIER vec<4, T, P> frexp(vec<4, T, P> const & x, vec<4, int, P> & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec4<T, P>(
|
return vec<4, T, P>(
|
||||||
frexp(x.x, exp.x),
|
frexp(x.x, exp.x),
|
||||||
frexp(x.y, exp.y),
|
frexp(x.y, exp.y),
|
||||||
frexp(x.z, exp.z),
|
frexp(x.z, exp.z),
|
||||||
@ -802,41 +802,41 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec1<T, P> ldexp(tvec1<T, P> const & x, tvec1<int, P> const & exp)
|
GLM_FUNC_QUALIFIER vec<1, T, P> ldexp(vec<1, T, P> const & x, vec<1, int, P> const & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec1<T, P>(
|
return vec<1, T, P>(
|
||||||
ldexp(x.x, exp.x));
|
ldexp(x.x, exp.x));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> ldexp(tvec2<T, P> const & x, tvec2<int, P> const & exp)
|
GLM_FUNC_QUALIFIER vec<2, T, P> ldexp(vec<2, T, P> const & x, vec<2, int, P> const & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec2<T, P>(
|
return vec<2, T, P>(
|
||||||
ldexp(x.x, exp.x),
|
ldexp(x.x, exp.x),
|
||||||
ldexp(x.y, exp.y));
|
ldexp(x.y, exp.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> ldexp(tvec3<T, P> const & x, tvec3<int, P> const & exp)
|
GLM_FUNC_QUALIFIER vec<3, T, P> ldexp(vec<3, T, P> const & x, vec<3, int, P> const & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec3<T, P>(
|
return vec<3, T, P>(
|
||||||
ldexp(x.x, exp.x),
|
ldexp(x.x, exp.x),
|
||||||
ldexp(x.y, exp.y),
|
ldexp(x.y, exp.y),
|
||||||
ldexp(x.z, exp.z));
|
ldexp(x.z, exp.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> ldexp(tvec4<T, P> const & x, tvec4<int, P> const & exp)
|
GLM_FUNC_QUALIFIER vec<4, T, P> ldexp(vec<4, T, P> const & x, vec<4, int, P> const & exp)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec4<T, P>(
|
return vec<4, T, P>(
|
||||||
ldexp(x.x, exp.x),
|
ldexp(x.x, exp.x),
|
||||||
ldexp(x.y, exp.y),
|
ldexp(x.y, exp.y),
|
||||||
ldexp(x.z, exp.z),
|
ldexp(x.z, exp.z),
|
||||||
|
@ -13,9 +13,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_abs_vector<4, float, P, vec, true>
|
struct compute_abs_vector<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_abs(v.data);
|
result.data = glm_vec4_abs(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -24,9 +24,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_abs_vector<4, int, P, vec, true>
|
struct compute_abs_vector<4, int, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<int, P> call(tvec4<int, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<int, P> result(uninitialize);
|
vec<4, int, P> result(uninitialize);
|
||||||
result.data = glm_ivec4_abs(v.data);
|
result.data = glm_ivec4_abs(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -35,9 +35,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_floor<4, float, P, vec, true>
|
struct compute_floor<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_floor(v.data);
|
result.data = glm_vec4_floor(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -46,9 +46,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_ceil<4, float, P, vec, true>
|
struct compute_ceil<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_ceil(v.data);
|
result.data = glm_vec4_ceil(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -57,9 +57,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_fract<4, float, P, vec, true>
|
struct compute_fract<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_fract(v.data);
|
result.data = glm_vec4_fract(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -68,9 +68,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_round<4, float, P, vec, true>
|
struct compute_round<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_round(v.data);
|
result.data = glm_vec4_round(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -79,9 +79,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_mod<4, float, P, vec, true>
|
struct compute_mod<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & x, tvec4<float, P> const & y)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_mod(x.data, y.data);
|
result.data = glm_vec4_mod(x.data, y.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -90,9 +90,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_min_vector<4, float, P, vec, true>
|
struct compute_min_vector<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v1, tvec4<float, P> const & v2)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = _mm_min_ps(v1.data, v2.data);
|
result.data = _mm_min_ps(v1.data, v2.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -101,9 +101,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_min_vector<4, int32, P, vec, true>
|
struct compute_min_vector<4, int32, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2)
|
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
|
||||||
{
|
{
|
||||||
tvec4<int32, P> result(uninitialize);
|
vec<4, int32, P> result(uninitialize);
|
||||||
result.data = _mm_min_epi32(v1.data, v2.data);
|
result.data = _mm_min_epi32(v1.data, v2.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -112,9 +112,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_min_vector<4, uint32, P, vec, true>
|
struct compute_min_vector<4, uint32, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<uint32, P> const & v1, tvec4<uint32, P> const & v2)
|
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2)
|
||||||
{
|
{
|
||||||
tvec4<uint32, P> result(uninitialize);
|
vec<4, uint32, P> result(uninitialize);
|
||||||
result.data = _mm_min_epu32(v1.data, v2.data);
|
result.data = _mm_min_epu32(v1.data, v2.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -123,9 +123,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_max_vector<4, float, P, vec, true>
|
struct compute_max_vector<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v1, tvec4<float, P> const & v2)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = _mm_max_ps(v1.data, v2.data);
|
result.data = _mm_max_ps(v1.data, v2.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -134,9 +134,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_max_vector<4, int32, P, vec, true>
|
struct compute_max_vector<4, int32, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2)
|
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
|
||||||
{
|
{
|
||||||
tvec4<int32, P> result(uninitialize);
|
vec<4, int32, P> result(uninitialize);
|
||||||
result.data = _mm_max_epi32(v1.data, v2.data);
|
result.data = _mm_max_epi32(v1.data, v2.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -145,9 +145,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_max_vector<4, uint32, P, vec, true>
|
struct compute_max_vector<4, uint32, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & v1, tvec4<uint32, P> const & v2)
|
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2)
|
||||||
{
|
{
|
||||||
tvec4<uint32, P> result(uninitialize);
|
vec<4, uint32, P> result(uninitialize);
|
||||||
result.data = _mm_max_epu32(v1.data, v2.data);
|
result.data = _mm_max_epu32(v1.data, v2.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -156,9 +156,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_clamp_vector<4, float, P, vec, true>
|
struct compute_clamp_vector<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & x, tvec4<float, P> const & minVal, tvec4<float, P> const & maxVal)
|
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)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = _mm_min_ps(_mm_max_ps(x.data, minVal.data), maxVal.data);
|
result.data = _mm_min_ps(_mm_max_ps(x.data, minVal.data), maxVal.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -167,9 +167,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_clamp_vector<4, int32, P, vec, true>
|
struct compute_clamp_vector<4, int32, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<int32, P> const & x, tvec4<int32, P> const & minVal, tvec4<int32, P> const & maxVal)
|
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)
|
||||||
{
|
{
|
||||||
tvec4<int32, P> result(uninitialize);
|
vec<4, int32, P> result(uninitialize);
|
||||||
result.data = _mm_min_epi32(_mm_max_epi32(x.data, minVal.data), maxVal.data);
|
result.data = _mm_min_epi32(_mm_max_epi32(x.data, minVal.data), maxVal.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -178,9 +178,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_clamp_vector<4, uint32, P, vec, true>
|
struct compute_clamp_vector<4, uint32, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & x, tvec4<uint32, P> const & minVal, tvec4<uint32, P> const & maxVal)
|
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)
|
||||||
{
|
{
|
||||||
tvec4<uint32, P> result(uninitialize);
|
vec<4, uint32, P> result(uninitialize);
|
||||||
result.data = _mm_min_epu32(_mm_max_epu32(x.data, minVal.data), maxVal.data);
|
result.data = _mm_min_epu32(_mm_max_epu32(x.data, minVal.data), maxVal.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -189,12 +189,12 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_mix_vector<4, float, bool, P, vec, true>
|
struct compute_mix_vector<4, float, bool, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & x, tvec4<float, P> const & y, tvec4<bool, P> const & a)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y, vec<4, bool, P> const & a)
|
||||||
{
|
{
|
||||||
__m128i const Load = _mm_set_epi32(-(int)a.w, -(int)a.z, -(int)a.y, -(int)a.x);
|
__m128i const Load = _mm_set_epi32(-(int)a.w, -(int)a.z, -(int)a.y, -(int)a.x);
|
||||||
__m128 const Mask = _mm_castsi128_ps(Load);
|
__m128 const Mask = _mm_castsi128_ps(Load);
|
||||||
|
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
# if 0 && GLM_ARCH & GLM_ARCH_AVX
|
# if 0 && GLM_ARCH & GLM_ARCH_AVX
|
||||||
Result.data = _mm_blendv_ps(x.data, y.data, Mask);
|
Result.data = _mm_blendv_ps(x.data, y.data, Mask);
|
||||||
# else
|
# else
|
||||||
@ -207,9 +207,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_step_vector<float, P, tvec4>
|
struct compute_step_vector<float, P, tvec4>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& edge, tvec4<float, P> const& x)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge, vec<4, float, P> const& x)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_step(edge.data, x.data);
|
result.data = glm_vec4_step(edge.data, x.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -218,9 +218,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_smoothstep_vector<4, float, P, vec, true>
|
struct compute_smoothstep_vector<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& edge0, tvec4<float, P> const& edge1, tvec4<float, P> const& x)
|
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)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data);
|
result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ namespace detail
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType log2(genType x)
|
GLM_FUNC_QUALIFIER genType log2(genType x)
|
||||||
{
|
{
|
||||||
return log2(tvec1<genType>(x)).x;
|
return log2(vec<1, genType>(x)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
|
@ -11,9 +11,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_sqrt<4, float, P, true>
|
struct compute_sqrt<4, float, P, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = _mm_sqrt_ps(v.data);
|
result.data = _mm_sqrt_ps(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -22,9 +22,9 @@ namespace detail
|
|||||||
template <>
|
template <>
|
||||||
struct compute_sqrt<4, float, aligned_lowp, true>
|
struct compute_sqrt<4, float, aligned_lowp, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, aligned_lowp> call(tvec4<float, aligned_lowp> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, aligned_lowp> result(uninitialize);
|
vec<4, float, aligned_lowp> result(uninitialize);
|
||||||
result.data = glm_vec4_sqrt_lowp(v.data);
|
result.data = glm_vec4_sqrt_lowp(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -56,9 +56,9 @@ namespace glm
|
|||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> cross(
|
GLM_FUNC_DECL vec<3, T, P> cross(
|
||||||
tvec3<T, P> const & x,
|
vec<3, T, P> const & x,
|
||||||
tvec3<T, P> const & y);
|
vec<3, T, P> const & y);
|
||||||
|
|
||||||
/// Returns a vector in the same direction as x but with length of 1.
|
/// Returns a vector in the same direction as x but with length of 1.
|
||||||
/// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error.
|
/// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error.
|
||||||
|
@ -55,7 +55,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static T call(vec<3, T, P> const & a, vec<3, T, P> const & b)
|
GLM_FUNC_QUALIFIER static T call(vec<3, T, P> const & a, vec<3, T, P> const & b)
|
||||||
{
|
{
|
||||||
tvec3<T, P> tmp(a * b);
|
vec<3, T, P> tmp(a * b);
|
||||||
return tmp.x + tmp.y + tmp.z;
|
return tmp.x + tmp.y + tmp.z;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -73,11 +73,11 @@ namespace detail
|
|||||||
template <typename T, precision P, bool Aligned>
|
template <typename T, precision P, bool Aligned>
|
||||||
struct compute_cross
|
struct compute_cross
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec3<T, P> call(tvec3<T, P> const & x, tvec3<T, P> const & y)
|
GLM_FUNC_QUALIFIER static vec<3, T, P> call(vec<3, T, P> const & x, vec<3, T, P> const & y)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cross' accepts only floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cross' accepts only floating-point inputs");
|
||||||
|
|
||||||
return tvec3<T, P>(
|
return vec<3, T, P>(
|
||||||
x.y * y.z - y.y * x.z,
|
x.y * y.z - y.y * x.z,
|
||||||
x.z * y.x - y.z * x.x,
|
x.z * y.x - y.z * x.x,
|
||||||
x.x * y.y - y.x * x.y);
|
x.x * y.y - y.x * x.y);
|
||||||
@ -183,7 +183,7 @@ namespace detail
|
|||||||
|
|
||||||
// cross
|
// cross
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> cross(tvec3<T, P> const & x, tvec3<T, P> const & y)
|
GLM_FUNC_QUALIFIER vec<3, T, P> cross(vec<3, T, P> const & x, vec<3, T, P> const & y)
|
||||||
{
|
{
|
||||||
return detail::compute_cross<T, P, detail::is_aligned<P>::value>::call(x, y);
|
return detail::compute_cross<T, P, detail::is_aligned<P>::value>::call(x, y);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_distance<vec, 4, float, P, true>
|
struct compute_distance<vec, 4, float, P, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static float call(tvec4<float, P> const & p0, tvec4<float, P> const & p1)
|
GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const & p0, vec<4, float, P> const & p1)
|
||||||
{
|
{
|
||||||
return _mm_cvtss_f32(glm_vec4_distance(p0.data, p1.data));
|
return _mm_cvtss_f32(glm_vec4_distance(p0.data, p1.data));
|
||||||
}
|
}
|
||||||
@ -38,24 +38,24 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_cross<float, P, true>
|
struct compute_cross<float, P, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec3<float, P> call(tvec3<float, P> const & a, tvec3<float, P> const & b)
|
GLM_FUNC_QUALIFIER static vec<3, float, P> call(vec<3, float, P> const & a, vec<3, float, P> const & b)
|
||||||
{
|
{
|
||||||
__m128 const set0 = _mm_set_ps(0.0f, a.z, a.y, a.x);
|
__m128 const set0 = _mm_set_ps(0.0f, a.z, a.y, a.x);
|
||||||
__m128 const set1 = _mm_set_ps(0.0f, b.z, b.y, b.x);
|
__m128 const set1 = _mm_set_ps(0.0f, b.z, b.y, b.x);
|
||||||
__m128 const xpd0 = glm_vec4_cross(set0, set1);
|
__m128 const xpd0 = glm_vec4_cross(set0, set1);
|
||||||
|
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = xpd0;
|
result.data = xpd0;
|
||||||
return tvec3<float, P>(result);
|
return vec<3, float, P>(result);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_normalize<4, float, P, vec, true>
|
struct compute_normalize<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_normalize(v.data);
|
result.data = glm_vec4_normalize(v.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -64,9 +64,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_faceforward<4, float, P, vec, true>
|
struct compute_faceforward<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& N, tvec4<float, P> const& I, tvec4<float, P> const& Nref)
|
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)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_faceforward(N.data, I.data, Nref.data);
|
result.data = glm_vec4_faceforward(N.data, I.data, Nref.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -75,9 +75,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_reflect<4, float, P, vec, true>
|
struct compute_reflect<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& I, tvec4<float, P> const& N)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_reflect(I.data, N.data);
|
result.data = glm_vec4_reflect(I.data, N.data);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -86,9 +86,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_refract<4, float, P, vec, true>
|
struct compute_refract<4, float, P, vec, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& I, tvec4<float, P> const& N, float eta)
|
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N, float eta)
|
||||||
{
|
{
|
||||||
tvec4<float, P> result(uninitialize);
|
vec<4, float, P> result(uninitialize);
|
||||||
result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta));
|
result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ namespace detail
|
|||||||
template <typename genIUType>
|
template <typename genIUType>
|
||||||
GLM_FUNC_QUALIFIER genIUType bitfieldExtract(genIUType Value, int Offset, int Bits)
|
GLM_FUNC_QUALIFIER genIUType bitfieldExtract(genIUType Value, int Offset, int Bits)
|
||||||
{
|
{
|
||||||
return bitfieldExtract(tvec1<genIUType>(Value), Offset, Bits).x;
|
return bitfieldExtract(vec<1, genIUType>(Value), Offset, Bits).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
@ -275,7 +275,7 @@ namespace detail
|
|||||||
template <typename genIUType>
|
template <typename genIUType>
|
||||||
GLM_FUNC_QUALIFIER genIUType bitfieldInsert(genIUType const & Base, genIUType const & Insert, int Offset, int Bits)
|
GLM_FUNC_QUALIFIER genIUType bitfieldInsert(genIUType const & Base, genIUType const & Insert, int Offset, int Bits)
|
||||||
{
|
{
|
||||||
return bitfieldInsert(tvec1<genIUType>(Base), tvec1<genIUType>(Insert), Offset, Bits).x;
|
return bitfieldInsert(vec<1, genIUType>(Base), vec<1, genIUType>(Insert), Offset, Bits).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
@ -291,7 +291,7 @@ namespace detail
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType bitfieldReverse(genType x)
|
GLM_FUNC_QUALIFIER genType bitfieldReverse(genType x)
|
||||||
{
|
{
|
||||||
return bitfieldReverse(glm::tvec1<genType, glm::defaultp>(x)).x;
|
return bitfieldReverse(glm::vec<1, genType, glm::defaultp>(x)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, glm::precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, glm::precision P, template <int, typename, precision> class vecType>
|
||||||
@ -311,7 +311,7 @@ namespace detail
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER int bitCount(genType x)
|
GLM_FUNC_QUALIFIER int bitCount(genType x)
|
||||||
{
|
{
|
||||||
return bitCount(glm::tvec1<genType, glm::defaultp>(x)).x;
|
return bitCount(glm::vec<1, genType, glm::defaultp>(x)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
template <int D, typename T, glm::precision P, template <int, typename, glm::precision> class vecType>
|
||||||
@ -357,7 +357,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findMSB' only accept integer values");
|
||||||
|
|
||||||
return findMSB(tvec1<genIUType>(x)).x;
|
return findMSB(vec<1, genIUType>(x)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
|
@ -11,7 +11,7 @@ namespace detail
|
|||||||
template <glm::precision P>
|
template <glm::precision P>
|
||||||
struct compute_bitfieldReverseStep<4, uint32, P, vec, true, true>
|
struct compute_bitfieldReverseStep<4, uint32, P, vec, true, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & v, uint32 Mask, uint32 Shift)
|
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v, uint32 Mask, uint32 Shift)
|
||||||
{
|
{
|
||||||
__m128i const set0 = v.data;
|
__m128i const set0 = v.data;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ namespace detail
|
|||||||
template <glm::precision P>
|
template <glm::precision P>
|
||||||
struct compute_bitfieldBitCountStep<4, uint32, P, vec, true, true>
|
struct compute_bitfieldBitCountStep<4, uint32, P, vec, true, true>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & v, uint32 Mask, uint32 Shift)
|
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v, uint32 Mask, uint32 Shift)
|
||||||
{
|
{
|
||||||
__m128i const set0 = v.data;
|
__m128i const set0 = v.data;
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ namespace detail
|
|||||||
T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
|
T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];
|
||||||
T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
|
T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];
|
||||||
|
|
||||||
tvec4<T, P> DetCof(
|
vec<4, T, P> DetCof(
|
||||||
+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),
|
+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),
|
||||||
- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),
|
- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),
|
||||||
+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),
|
+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),
|
||||||
@ -322,30 +322,30 @@ namespace detail
|
|||||||
T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];
|
T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];
|
||||||
T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
|
T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];
|
||||||
|
|
||||||
tvec4<T, P> Fac0(Coef00, Coef00, Coef02, Coef03);
|
vec<4, T, P> Fac0(Coef00, Coef00, Coef02, Coef03);
|
||||||
tvec4<T, P> Fac1(Coef04, Coef04, Coef06, Coef07);
|
vec<4, T, P> Fac1(Coef04, Coef04, Coef06, Coef07);
|
||||||
tvec4<T, P> Fac2(Coef08, Coef08, Coef10, Coef11);
|
vec<4, T, P> Fac2(Coef08, Coef08, Coef10, Coef11);
|
||||||
tvec4<T, P> Fac3(Coef12, Coef12, Coef14, Coef15);
|
vec<4, T, P> Fac3(Coef12, Coef12, Coef14, Coef15);
|
||||||
tvec4<T, P> Fac4(Coef16, Coef16, Coef18, Coef19);
|
vec<4, T, P> Fac4(Coef16, Coef16, Coef18, Coef19);
|
||||||
tvec4<T, P> Fac5(Coef20, Coef20, Coef22, Coef23);
|
vec<4, T, P> Fac5(Coef20, Coef20, Coef22, Coef23);
|
||||||
|
|
||||||
tvec4<T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]);
|
vec<4, T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]);
|
||||||
tvec4<T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]);
|
vec<4, T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]);
|
||||||
tvec4<T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]);
|
vec<4, T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]);
|
||||||
tvec4<T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]);
|
vec<4, T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]);
|
||||||
|
|
||||||
tvec4<T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);
|
vec<4, T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);
|
||||||
tvec4<T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);
|
vec<4, T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);
|
||||||
tvec4<T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);
|
vec<4, T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);
|
||||||
tvec4<T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);
|
vec<4, T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);
|
||||||
|
|
||||||
tvec4<T, P> SignA(+1, -1, +1, -1);
|
vec<4, T, P> SignA(+1, -1, +1, -1);
|
||||||
tvec4<T, P> SignB(-1, +1, -1, +1);
|
vec<4, T, P> SignB(-1, +1, -1, +1);
|
||||||
tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB);
|
tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB);
|
||||||
|
|
||||||
tvec4<T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);
|
vec<4, T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);
|
||||||
|
|
||||||
tvec4<T, P> Dot0(m[0] * Row0);
|
vec<4, T, P> Dot0(m[0] * Row0);
|
||||||
T Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w);
|
T Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w);
|
||||||
|
|
||||||
T OneOverDeterminant = static_cast<T>(1) / Dot1;
|
T OneOverDeterminant = static_cast<T>(1) / Dot1;
|
||||||
|
@ -61,7 +61,7 @@ namespace detail
|
|||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<float, aligned_lowp> outerProduct<4, 4, float, aligned_lowp, vec, vec>(tvec4<float, aligned_lowp> const & c, tvec4<float, aligned_lowp> const & r)
|
GLM_FUNC_QUALIFIER tmat4x4<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)
|
||||||
{
|
{
|
||||||
tmat4x4<float, aligned_lowp> m(uninitialize);
|
tmat4x4<float, aligned_lowp> m(uninitialize);
|
||||||
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
|
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
|
||||||
@ -69,7 +69,7 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<float, aligned_mediump> outerProduct<4, 4, float, aligned_mediump, vec, vec>(tvec4<float, aligned_mediump> const & c, tvec4<float, aligned_mediump> const & r)
|
GLM_FUNC_QUALIFIER tmat4x4<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)
|
||||||
{
|
{
|
||||||
tmat4x4<float, aligned_mediump> m(uninitialize);
|
tmat4x4<float, aligned_mediump> m(uninitialize);
|
||||||
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
|
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
|
||||||
@ -77,7 +77,7 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<float, aligned_highp> outerProduct<4, 4, float, aligned_highp, vec, vec>(tvec4<float, aligned_highp> const & c, tvec4<float, aligned_highp> const & r)
|
GLM_FUNC_QUALIFIER tmat4x4<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)
|
||||||
{
|
{
|
||||||
tmat4x4<float, aligned_highp> m(uninitialize);
|
tmat4x4<float, aligned_highp> m(uninitialize);
|
||||||
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
|
glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data));
|
||||||
|
@ -14,8 +14,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat2x2
|
struct tmat2x2
|
||||||
{
|
{
|
||||||
typedef tvec2<T, P> col_type;
|
typedef vec<2, T, P> col_type;
|
||||||
typedef tvec2<T, P> row_type;
|
typedef vec<2, T, P> row_type;
|
||||||
typedef tmat2x2<T, P> type;
|
typedef tmat2x2<T, P> type;
|
||||||
typedef tmat2x2<T, P> transpose_type;
|
typedef tmat2x2<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -49,8 +49,8 @@ namespace glm
|
|||||||
|
|
||||||
template <typename U, typename V>
|
template <typename U, typename V>
|
||||||
GLM_FUNC_DECL tmat2x2(
|
GLM_FUNC_DECL tmat2x2(
|
||||||
tvec2<U, P> const & v1,
|
vec<2, U, P> const & v1,
|
||||||
tvec2<V, P> const & v2);
|
vec<2, V, P> const & v2);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename V1, typename V2>
|
template <typename V1, typename V2>
|
||||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tvec2<V1, P> const & v1, tvec2<V2, P> const & v2)
|
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(vec<2, V1, P> const & v1, vec<2, V2, P> const & v2)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
this->value[1] = col_type(v2);
|
this->value[1] = col_type(v2);
|
||||||
@ -380,7 +380,7 @@ namespace glm
|
|||||||
typename tmat2x2<T, P>::row_type const & v
|
typename tmat2x2<T, P>::row_type const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return tvec2<T, P>(
|
return vec<2, T, P>(
|
||||||
m[0][0] * v.x + m[1][0] * v.y,
|
m[0][0] * v.x + m[1][0] * v.y,
|
||||||
m[0][1] * v.x + m[1][1] * v.y);
|
m[0][1] * v.x + m[1][1] * v.y);
|
||||||
}
|
}
|
||||||
@ -392,7 +392,7 @@ namespace glm
|
|||||||
tmat2x2<T, P> const & m
|
tmat2x2<T, P> const & m
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return tvec2<T, P>(
|
return vec<2, T, P>(
|
||||||
v.x * m[0][0] + v.y * m[0][1],
|
v.x * m[0][0] + v.y * m[0][1],
|
||||||
v.x * m[1][0] + v.y * m[1][1]);
|
v.x * m[1][0] + v.y * m[1][1]);
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat2x3
|
struct tmat2x3
|
||||||
{
|
{
|
||||||
typedef tvec3<T, P> col_type;
|
typedef vec<3, T, P> col_type;
|
||||||
typedef tvec2<T, P> row_type;
|
typedef vec<2, T, P> row_type;
|
||||||
typedef tmat2x3<T, P> type;
|
typedef tmat2x3<T, P> type;
|
||||||
typedef tmat3x2<T, P> transpose_type;
|
typedef tmat3x2<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -50,8 +50,8 @@ namespace glm
|
|||||||
|
|
||||||
template <typename U, typename V>
|
template <typename U, typename V>
|
||||||
GLM_FUNC_DECL tmat2x3(
|
GLM_FUNC_DECL tmat2x3(
|
||||||
tvec3<U, P> const & v1,
|
vec<3, U, P> const & v1,
|
||||||
tvec3<V, P> const & v2);
|
vec<3, V, P> const & v2);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename V1, typename V2>
|
template <typename V1, typename V2>
|
||||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tvec3<V1, P> const & v1, tvec3<V2, P> const & v2)
|
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(vec<3, V1, P> const & v1, vec<3, V2, P> const & v2)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
this->value[1] = col_type(v2);
|
this->value[1] = col_type(v2);
|
||||||
|
@ -15,8 +15,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat2x4
|
struct tmat2x4
|
||||||
{
|
{
|
||||||
typedef tvec4<T, P> col_type;
|
typedef vec<4, T, P> col_type;
|
||||||
typedef tvec2<T, P> row_type;
|
typedef vec<2, T, P> row_type;
|
||||||
typedef tmat2x4<T, P> type;
|
typedef tmat2x4<T, P> type;
|
||||||
typedef tmat4x2<T, P> transpose_type;
|
typedef tmat4x2<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -52,8 +52,8 @@ namespace glm
|
|||||||
|
|
||||||
template <typename U, typename V>
|
template <typename U, typename V>
|
||||||
GLM_FUNC_DECL tmat2x4(
|
GLM_FUNC_DECL tmat2x4(
|
||||||
tvec4<U, P> const & v1,
|
vec<4, U, P> const & v1,
|
||||||
tvec4<V, P> const & v2);
|
vec<4, V, P> const & v2);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename V1, typename V2>
|
template <typename V1, typename V2>
|
||||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tvec4<V1, P> const & v1, tvec4<V2, P> const & v2)
|
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(vec<4, V1, P> const & v1, vec<4, V2, P> const & v2)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
this->value[1] = col_type(v2);
|
this->value[1] = col_type(v2);
|
||||||
|
@ -15,8 +15,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat3x2
|
struct tmat3x2
|
||||||
{
|
{
|
||||||
typedef tvec2<T, P> col_type;
|
typedef vec<2, T, P> col_type;
|
||||||
typedef tvec3<T, P> row_type;
|
typedef vec<3, T, P> row_type;
|
||||||
typedef tmat3x2<T, P> type;
|
typedef tmat3x2<T, P> type;
|
||||||
typedef tmat2x3<T, P> transpose_type;
|
typedef tmat2x3<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -56,9 +56,9 @@ namespace glm
|
|||||||
|
|
||||||
template <typename V1, typename V2, typename V3>
|
template <typename V1, typename V2, typename V3>
|
||||||
GLM_FUNC_DECL tmat3x2(
|
GLM_FUNC_DECL tmat3x2(
|
||||||
tvec2<V1, P> const & v1,
|
vec<2, V1, P> const & v1,
|
||||||
tvec2<V2, P> const & v2,
|
vec<2, V2, P> const & v2,
|
||||||
tvec2<V3, P> const & v3);
|
vec<2, V3, P> const & v3);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -97,9 +97,9 @@ namespace glm
|
|||||||
template <typename V1, typename V2, typename V3>
|
template <typename V1, typename V2, typename V3>
|
||||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
|
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2
|
||||||
(
|
(
|
||||||
tvec2<V1, P> const & v1,
|
vec<2, V1, P> const & v1,
|
||||||
tvec2<V2, P> const & v2,
|
vec<2, V2, P> const & v2,
|
||||||
tvec2<V3, P> const & v3
|
vec<2, V3, P> const & v3
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
|
@ -14,8 +14,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat3x3
|
struct tmat3x3
|
||||||
{
|
{
|
||||||
typedef tvec3<T, P> col_type;
|
typedef vec<3, T, P> col_type;
|
||||||
typedef tvec3<T, P> row_type;
|
typedef vec<3, T, P> row_type;
|
||||||
typedef tmat3x3<T, P> type;
|
typedef tmat3x3<T, P> type;
|
||||||
typedef tmat3x3<T, P> transpose_type;
|
typedef tmat3x3<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -55,9 +55,9 @@ namespace glm
|
|||||||
|
|
||||||
template <typename V1, typename V2, typename V3>
|
template <typename V1, typename V2, typename V3>
|
||||||
GLM_FUNC_DECL tmat3x3(
|
GLM_FUNC_DECL tmat3x3(
|
||||||
tvec3<V1, P> const & v1,
|
vec<3, V1, P> const & v1,
|
||||||
tvec3<V2, P> const & v2,
|
vec<3, V2, P> const & v2,
|
||||||
tvec3<V3, P> const & v3);
|
vec<3, V3, P> const & v3);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -99,9 +99,9 @@ namespace glm
|
|||||||
template <typename V1, typename V2, typename V3>
|
template <typename V1, typename V2, typename V3>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
|
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3
|
||||||
(
|
(
|
||||||
tvec3<V1, P> const & v1,
|
vec<3, V1, P> const& v1,
|
||||||
tvec3<V2, P> const & v2,
|
vec<3, V2, P> const& v2,
|
||||||
tvec3<V3, P> const & v3
|
vec<3, V3, P> const& v3
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
|
@ -15,8 +15,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat3x4
|
struct tmat3x4
|
||||||
{
|
{
|
||||||
typedef tvec4<T, P> col_type;
|
typedef vec<4, T, P> col_type;
|
||||||
typedef tvec3<T, P> row_type;
|
typedef vec<3, T, P> row_type;
|
||||||
typedef tmat3x4<T, P> type;
|
typedef tmat3x4<T, P> type;
|
||||||
typedef tmat4x3<T, P> transpose_type;
|
typedef tmat4x3<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -56,9 +56,9 @@ namespace glm
|
|||||||
|
|
||||||
template <typename V1, typename V2, typename V3>
|
template <typename V1, typename V2, typename V3>
|
||||||
GLM_FUNC_DECL tmat3x4(
|
GLM_FUNC_DECL tmat3x4(
|
||||||
tvec4<V1, P> const & v1,
|
vec<4, V1, P> const & v1,
|
||||||
tvec4<V2, P> const & v2,
|
vec<4, V2, P> const & v2,
|
||||||
tvec4<V3, P> const & v3);
|
vec<4, V3, P> const & v3);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -97,9 +97,9 @@ namespace glm
|
|||||||
template <typename V1, typename V2, typename V3>
|
template <typename V1, typename V2, typename V3>
|
||||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
|
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4
|
||||||
(
|
(
|
||||||
tvec4<V1, P> const & v1,
|
vec<4, V1, P> const & v1,
|
||||||
tvec4<V2, P> const & v2,
|
vec<4, V2, P> const & v2,
|
||||||
tvec4<V3, P> const & v3
|
vec<4, V3, P> const & v3
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
|
@ -15,8 +15,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat4x2
|
struct tmat4x2
|
||||||
{
|
{
|
||||||
typedef tvec2<T, P> col_type;
|
typedef vec<2, T, P> col_type;
|
||||||
typedef tvec4<T, P> row_type;
|
typedef vec<4, T, P> row_type;
|
||||||
typedef tmat4x2<T, P> type;
|
typedef tmat4x2<T, P> type;
|
||||||
typedef tmat2x4<T, P> transpose_type;
|
typedef tmat2x4<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -60,10 +60,10 @@ namespace glm
|
|||||||
|
|
||||||
template <typename V1, typename V2, typename V3, typename V4>
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
GLM_FUNC_DECL tmat4x2(
|
GLM_FUNC_DECL tmat4x2(
|
||||||
tvec2<V1, P> const & v1,
|
vec<2, V1, P> const & v1,
|
||||||
tvec2<V2, P> const & v2,
|
vec<2, V2, P> const & v2,
|
||||||
tvec2<V3, P> const & v3,
|
vec<2, V3, P> const & v3,
|
||||||
tvec2<V4, P> const & v4);
|
vec<2, V4, P> const & v4);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -108,10 +108,10 @@ namespace glm
|
|||||||
template <typename V1, typename V2, typename V3, typename V4>
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
|
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2
|
||||||
(
|
(
|
||||||
tvec2<V1, P> const & v1,
|
vec<2, V1, P> const & v1,
|
||||||
tvec2<V2, P> const & v2,
|
vec<2, V2, P> const & v2,
|
||||||
tvec2<V3, P> const & v3,
|
vec<2, V3, P> const & v3,
|
||||||
tvec2<V4, P> const & v4
|
vec<2, V4, P> const & v4
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
|
@ -15,8 +15,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat4x3
|
struct tmat4x3
|
||||||
{
|
{
|
||||||
typedef tvec3<T, P> col_type;
|
typedef vec<3, T, P> col_type;
|
||||||
typedef tvec4<T, P> row_type;
|
typedef vec<4, T, P> row_type;
|
||||||
typedef tmat4x3<T, P> type;
|
typedef tmat4x3<T, P> type;
|
||||||
typedef tmat3x4<T, P> transpose_type;
|
typedef tmat3x4<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -60,10 +60,10 @@ namespace glm
|
|||||||
|
|
||||||
template <typename V1, typename V2, typename V3, typename V4>
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
GLM_FUNC_DECL tmat4x3(
|
GLM_FUNC_DECL tmat4x3(
|
||||||
tvec3<V1, P> const & v1,
|
vec<3, V1, P> const & v1,
|
||||||
tvec3<V2, P> const & v2,
|
vec<3, V2, P> const & v2,
|
||||||
tvec3<V3, P> const & v3,
|
vec<3, V3, P> const & v3,
|
||||||
tvec3<V4, P> const & v4);
|
vec<3, V4, P> const & v4);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -108,10 +108,10 @@ namespace glm
|
|||||||
template <typename V1, typename V2, typename V3, typename V4>
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
|
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3
|
||||||
(
|
(
|
||||||
tvec3<V1, P> const & v1,
|
vec<3, V1, P> const & v1,
|
||||||
tvec3<V2, P> const & v2,
|
vec<3, V2, P> const & v2,
|
||||||
tvec3<V3, P> const & v3,
|
vec<3, V3, P> const & v3,
|
||||||
tvec3<V4, P> const & v4
|
vec<3, V4, P> const & v4
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this->value[0] = col_type(v1);
|
this->value[0] = col_type(v1);
|
||||||
|
@ -14,8 +14,8 @@ namespace glm
|
|||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
struct tmat4x4
|
struct tmat4x4
|
||||||
{
|
{
|
||||||
typedef tvec4<T, P> col_type;
|
typedef vec<4, T, P> col_type;
|
||||||
typedef tvec4<T, P> row_type;
|
typedef vec<4, T, P> row_type;
|
||||||
typedef tmat4x4<T, P> type;
|
typedef tmat4x4<T, P> type;
|
||||||
typedef tmat4x4<T, P> transpose_type;
|
typedef tmat4x4<T, P> transpose_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
@ -59,10 +59,10 @@ namespace glm
|
|||||||
|
|
||||||
template <typename V1, typename V2, typename V3, typename V4>
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
GLM_FUNC_DECL tmat4x4(
|
GLM_FUNC_DECL tmat4x4(
|
||||||
tvec4<V1, P> const & v1,
|
vec<4, V1, P> const & v1,
|
||||||
tvec4<V2, P> const & v2,
|
vec<4, V2, P> const & v2,
|
||||||
tvec4<V3, P> const & v3,
|
vec<4, V3, P> const & v3,
|
||||||
tvec4<V4, P> const & v4);
|
vec<4, V4, P> const & v4);
|
||||||
|
|
||||||
// -- Matrix conversions --
|
// -- Matrix conversions --
|
||||||
|
|
||||||
|
@ -143,10 +143,10 @@ namespace glm
|
|||||||
template <typename V1, typename V2, typename V3, typename V4>
|
template <typename V1, typename V2, typename V3, typename V4>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
|
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4
|
||||||
(
|
(
|
||||||
tvec4<V1, P> const & v1,
|
vec<4, V1, P> const & v1,
|
||||||
tvec4<V2, P> const & v2,
|
vec<4, V2, P> const & v2,
|
||||||
tvec4<V3, P> const & v3,
|
vec<4, V3, P> const & v3,
|
||||||
tvec4<V4, P> const & v4
|
vec<4, V4, P> const & v4
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
|
GLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
|
||||||
|
@ -103,26 +103,26 @@ namespace detail
|
|||||||
|
|
||||||
template <int D, typename T, precision P = defaultp> struct vec;
|
template <int D, typename T, precision P = defaultp> struct vec;
|
||||||
|
|
||||||
template <typename T, precision P = defaultp> using tvec1 = vec<1, T, P>;
|
// template <typename T, precision P = defaultp> using tvec1 = vec<1, T, P>;
|
||||||
template <typename T, precision P = defaultp> using tvec2 = vec<2, T, P>;
|
// template <typename T, precision P = defaultp> using tvec2 = vec<2, T, P>;
|
||||||
template <typename T, precision P = defaultp> using tvec3 = vec<3, T, P>;
|
// template <typename T, precision P = defaultp> using tvec3 = vec<3, T, P>;
|
||||||
template <typename T, precision P = defaultp> using tvec4 = vec<4, T, P>;
|
// template <typename T, precision P = defaultp> using tvec4 = vec<4, T, P>;
|
||||||
|
|
||||||
typedef tvec1<float, highp> highp_vec1_t;
|
typedef vec<1, float, highp> highp_vec1_t;
|
||||||
typedef tvec1<float, mediump> mediump_vec1_t;
|
typedef vec<1, float, mediump> mediump_vec1_t;
|
||||||
typedef tvec1<float, lowp> lowp_vec1_t;
|
typedef vec<1, float, lowp> lowp_vec1_t;
|
||||||
typedef tvec1<double, highp> highp_dvec1_t;
|
typedef vec<1, double, highp> highp_dvec1_t;
|
||||||
typedef tvec1<double, mediump> mediump_dvec1_t;
|
typedef vec<1, double, mediump> mediump_dvec1_t;
|
||||||
typedef tvec1<double, lowp> lowp_dvec1_t;
|
typedef vec<1, double, lowp> lowp_dvec1_t;
|
||||||
typedef tvec1<int, highp> highp_ivec1_t;
|
typedef vec<1, int, highp> highp_ivec1_t;
|
||||||
typedef tvec1<int, mediump> mediump_ivec1_t;
|
typedef vec<1, int, mediump> mediump_ivec1_t;
|
||||||
typedef tvec1<int, lowp> lowp_ivec1_t;
|
typedef vec<1, int, lowp> lowp_ivec1_t;
|
||||||
typedef tvec1<uint, highp> highp_uvec1_t;
|
typedef vec<1, uint, highp> highp_uvec1_t;
|
||||||
typedef tvec1<uint, mediump> mediump_uvec1_t;
|
typedef vec<1, uint, mediump> mediump_uvec1_t;
|
||||||
typedef tvec1<uint, lowp> lowp_uvec1_t;
|
typedef vec<1, uint, lowp> lowp_uvec1_t;
|
||||||
typedef tvec1<bool, highp> highp_bvec1_t;
|
typedef vec<1, bool, highp> highp_bvec1_t;
|
||||||
typedef tvec1<bool, mediump> mediump_bvec1_t;
|
typedef vec<1, bool, mediump> mediump_bvec1_t;
|
||||||
typedef tvec1<bool, lowp> lowp_bvec1_t;
|
typedef vec<1, bool, lowp> lowp_bvec1_t;
|
||||||
|
|
||||||
/// @addtogroup core_precision
|
/// @addtogroup core_precision
|
||||||
/// @{
|
/// @{
|
||||||
@ -132,105 +132,105 @@ namespace detail
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<float, highp> highp_vec2;
|
typedef vec<2, float, highp> highp_vec2;
|
||||||
|
|
||||||
/// 2 components vector of medium single-precision floating-point numbers.
|
/// 2 components vector of medium single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<float, mediump> mediump_vec2;
|
typedef vec<2, float, mediump> mediump_vec2;
|
||||||
|
|
||||||
/// 2 components vector of low single-precision floating-point numbers.
|
/// 2 components vector of low single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<float, lowp> lowp_vec2;
|
typedef vec<2, float, lowp> lowp_vec2;
|
||||||
|
|
||||||
/// 2 components vector of high double-precision floating-point numbers.
|
/// 2 components vector of high double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<double, highp> highp_dvec2;
|
typedef vec<2, double, highp> highp_dvec2;
|
||||||
|
|
||||||
/// 2 components vector of medium double-precision floating-point numbers.
|
/// 2 components vector of medium double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<double, mediump> mediump_dvec2;
|
typedef vec<2, double, mediump> mediump_dvec2;
|
||||||
|
|
||||||
/// 2 components vector of low double-precision floating-point numbers.
|
/// 2 components vector of low double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<double, lowp> lowp_dvec2;
|
typedef vec<2, double, lowp> lowp_dvec2;
|
||||||
|
|
||||||
/// 2 components vector of high precision signed integer numbers.
|
/// 2 components vector of high precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<int, highp> highp_ivec2;
|
typedef vec<2, int, highp> highp_ivec2;
|
||||||
|
|
||||||
/// 2 components vector of medium precision signed integer numbers.
|
/// 2 components vector of medium precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<int, mediump> mediump_ivec2;
|
typedef vec<2, int, mediump> mediump_ivec2;
|
||||||
|
|
||||||
/// 2 components vector of low precision signed integer numbers.
|
/// 2 components vector of low precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<int, lowp> lowp_ivec2;
|
typedef vec<2, int, lowp> lowp_ivec2;
|
||||||
|
|
||||||
/// 2 components vector of high precision unsigned integer numbers.
|
/// 2 components vector of high precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<uint, highp> highp_uvec2;
|
typedef vec<2, uint, highp> highp_uvec2;
|
||||||
|
|
||||||
/// 2 components vector of medium precision unsigned integer numbers.
|
/// 2 components vector of medium precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<uint, mediump> mediump_uvec2;
|
typedef vec<2, uint, mediump> mediump_uvec2;
|
||||||
|
|
||||||
/// 2 components vector of low precision unsigned integer numbers.
|
/// 2 components vector of low precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<uint, lowp> lowp_uvec2;
|
typedef vec<2, uint, lowp> lowp_uvec2;
|
||||||
|
|
||||||
/// 2 components vector of high precision bool numbers.
|
/// 2 components vector of high precision bool numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<bool, highp> highp_bvec2;
|
typedef vec<2, bool, highp> highp_bvec2;
|
||||||
|
|
||||||
/// 2 components vector of medium precision bool numbers.
|
/// 2 components vector of medium precision bool numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<bool, mediump> mediump_bvec2;
|
typedef vec<2, bool, mediump> mediump_bvec2;
|
||||||
|
|
||||||
/// 2 components vector of low precision bool numbers.
|
/// 2 components vector of low precision bool numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec2<bool, lowp> lowp_bvec2;
|
typedef vec<2, bool, lowp> lowp_bvec2;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
@ -242,102 +242,102 @@ namespace detail
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<float, highp> highp_vec3;
|
typedef vec<3, float, highp> highp_vec3;
|
||||||
|
|
||||||
/// 3 components vector of medium single-precision floating-point numbers.
|
/// 3 components vector of medium single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<float, mediump> mediump_vec3;
|
typedef vec<3, float, mediump> mediump_vec3;
|
||||||
|
|
||||||
/// 3 components vector of low single-precision floating-point numbers.
|
/// 3 components vector of low single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<float, lowp> lowp_vec3;
|
typedef vec<3, float, lowp> lowp_vec3;
|
||||||
|
|
||||||
/// 3 components vector of high double-precision floating-point numbers.
|
/// 3 components vector of high double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<double, highp> highp_dvec3;
|
typedef vec<3, double, highp> highp_dvec3;
|
||||||
|
|
||||||
/// 3 components vector of medium double-precision floating-point numbers.
|
/// 3 components vector of medium double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<double, mediump> mediump_dvec3;
|
typedef vec<3, double, mediump> mediump_dvec3;
|
||||||
|
|
||||||
/// 3 components vector of low double-precision floating-point numbers.
|
/// 3 components vector of low double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<double, lowp> lowp_dvec3;
|
typedef vec<3, double, lowp> lowp_dvec3;
|
||||||
|
|
||||||
/// 3 components vector of high precision signed integer numbers.
|
/// 3 components vector of high precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<int, highp> highp_ivec3;
|
typedef vec<3, int, highp> highp_ivec3;
|
||||||
|
|
||||||
/// 3 components vector of medium precision signed integer numbers.
|
/// 3 components vector of medium precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<int, mediump> mediump_ivec3;
|
typedef vec<3, int, mediump> mediump_ivec3;
|
||||||
|
|
||||||
/// 3 components vector of low precision signed integer numbers.
|
/// 3 components vector of low precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<int, lowp> lowp_ivec3;
|
typedef vec<3, int, lowp> lowp_ivec3;
|
||||||
|
|
||||||
/// 3 components vector of high precision unsigned integer numbers.
|
/// 3 components vector of high precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<uint, highp> highp_uvec3;
|
typedef vec<3, uint, highp> highp_uvec3;
|
||||||
|
|
||||||
/// 3 components vector of medium precision unsigned integer numbers.
|
/// 3 components vector of medium precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<uint, mediump> mediump_uvec3;
|
typedef vec<3, uint, mediump> mediump_uvec3;
|
||||||
|
|
||||||
/// 3 components vector of low precision unsigned integer numbers.
|
/// 3 components vector of low precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<uint, lowp> lowp_uvec3;
|
typedef vec<3, uint, lowp> lowp_uvec3;
|
||||||
|
|
||||||
/// 3 components vector of high precision bool numbers.
|
/// 3 components vector of high precision bool numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<bool, highp> highp_bvec3;
|
typedef vec<3, bool, highp> highp_bvec3;
|
||||||
|
|
||||||
/// 3 components vector of medium precision bool numbers.
|
/// 3 components vector of medium precision bool numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<bool, mediump> mediump_bvec3;
|
typedef vec<3, bool, mediump> mediump_bvec3;
|
||||||
|
|
||||||
/// 3 components vector of low precision bool numbers.
|
/// 3 components vector of low precision bool numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec3<bool, lowp> lowp_bvec3;
|
typedef vec<3, bool, lowp> lowp_bvec3;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
@ -348,91 +348,91 @@ namespace detail
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<float, highp> highp_vec4;
|
typedef vec<4, float, highp> highp_vec4;
|
||||||
|
|
||||||
/// 4 components vector of medium single-precision floating-point numbers.
|
/// 4 components vector of medium single-precision floating-point numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<float, mediump> mediump_vec4;
|
typedef vec<4, float, mediump> mediump_vec4;
|
||||||
|
|
||||||
/// 4 components vector of low single-precision floating-point numbers.
|
/// 4 components vector of low single-precision floating-point numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<float, lowp> lowp_vec4;
|
typedef vec<4, float, lowp> lowp_vec4;
|
||||||
|
|
||||||
/// 4 components vector of high double-precision floating-point numbers.
|
/// 4 components vector of high double-precision floating-point numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<double, highp> highp_dvec4;
|
typedef vec<4, double, highp> highp_dvec4;
|
||||||
|
|
||||||
/// 4 components vector of medium double-precision floating-point numbers.
|
/// 4 components vector of medium double-precision floating-point numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<double, mediump> mediump_dvec4;
|
typedef vec<4, double, mediump> mediump_dvec4;
|
||||||
|
|
||||||
/// 4 components vector of low double-precision floating-point numbers.
|
/// 4 components vector of low double-precision floating-point numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<double, lowp> lowp_dvec4;
|
typedef vec<4, double, lowp> lowp_dvec4;
|
||||||
|
|
||||||
/// 4 components vector of high precision signed integer numbers.
|
/// 4 components vector of high precision signed integer numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<int, highp> highp_ivec4;
|
typedef vec<4, int, highp> highp_ivec4;
|
||||||
|
|
||||||
/// 4 components vector of medium precision signed integer numbers.
|
/// 4 components vector of medium precision signed integer numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<int, mediump> mediump_ivec4;
|
typedef vec<4, int, mediump> mediump_ivec4;
|
||||||
|
|
||||||
/// 4 components vector of low precision signed integer numbers.
|
/// 4 components vector of low precision signed integer numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<int, lowp> lowp_ivec4;
|
typedef vec<4, int, lowp> lowp_ivec4;
|
||||||
|
|
||||||
/// 4 components vector of high precision unsigned integer numbers.
|
/// 4 components vector of high precision unsigned integer numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<uint, highp> highp_uvec4;
|
typedef vec<4, uint, highp> highp_uvec4;
|
||||||
|
|
||||||
/// 4 components vector of medium precision unsigned integer numbers.
|
/// 4 components vector of medium precision unsigned integer numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<uint, mediump> mediump_uvec4;
|
typedef vec<4, uint, mediump> mediump_uvec4;
|
||||||
|
|
||||||
/// 4 components vector of low precision unsigned integer numbers.
|
/// 4 components vector of low precision unsigned integer numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<uint, lowp> lowp_uvec4;
|
typedef vec<4, uint, lowp> lowp_uvec4;
|
||||||
|
|
||||||
/// 4 components vector of high precision bool numbers.
|
/// 4 components vector of high precision bool numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<bool, highp> highp_bvec4;
|
typedef vec<4, bool, highp> highp_bvec4;
|
||||||
|
|
||||||
/// 4 components vector of medium precision bool numbers.
|
/// 4 components vector of medium precision bool numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<bool, mediump> mediump_bvec4;
|
typedef vec<4, bool, mediump> mediump_bvec4;
|
||||||
|
|
||||||
/// 4 components vector of low precision bool numbers.
|
/// 4 components vector of low precision bool numbers.
|
||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
|
||||||
typedef tvec4<bool, lowp> lowp_bvec4;
|
typedef vec<4, bool, lowp> lowp_bvec4;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ namespace glm
|
|||||||
union {T y, g, t;};
|
union {T y, g, t;};
|
||||||
|
|
||||||
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4)
|
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P)
|
||||||
# endif//GLM_SWIZZLE
|
# endif//GLM_SWIZZLE
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ namespace glm
|
|||||||
union { T z, b, p; };
|
union { T z, b, p; };
|
||||||
|
|
||||||
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, tvec3, tvec2, tvec3, tvec4)
|
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P)
|
||||||
# endif//GLM_SWIZZLE
|
# endif//GLM_SWIZZLE
|
||||||
# endif//GLM_LANG
|
# endif//GLM_LANG
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ namespace glm
|
|||||||
union { T w, a, q; };
|
union { T w, a, q; };
|
||||||
|
|
||||||
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4)
|
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P)
|
||||||
# endif//GLM_SWIZZLE
|
# endif//GLM_SWIZZLE
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ namespace detail
|
|||||||
template <precision P, int E0, int E1, int E2, int E3>
|
template <precision P, int E0, int E1, int E2, int E3>
|
||||||
struct _swizzle_base1<4, float, P, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4>
|
struct _swizzle_base1<4, float, P, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, P> operator ()() const
|
GLM_FUNC_QUALIFIER vec<4, float, P> operator ()() const
|
||||||
{
|
{
|
||||||
__m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer);
|
__m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer);
|
||||||
|
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
# if GLM_ARCH & GLM_ARCH_AVX_BIT
|
# if GLM_ARCH & GLM_ARCH_AVX_BIT
|
||||||
Result.data = _mm_permute_ps(data, _MM_SHUFFLE(E3, E2, E1, E0));
|
Result.data = _mm_permute_ps(data, _MM_SHUFFLE(E3, E2, E1, E0));
|
||||||
# else
|
# else
|
||||||
@ -27,11 +27,11 @@ namespace detail
|
|||||||
template <precision P, int E0, int E1, int E2, int E3>
|
template <precision P, int E0, int E1, int E2, int E3>
|
||||||
struct _swizzle_base1<4, int32, P, E0,E1,E2,E3, true> : public _swizzle_base0<int32, 4>
|
struct _swizzle_base1<4, int32, P, E0,E1,E2,E3, true> : public _swizzle_base0<int32, 4>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER tvec4<int32, P> operator ()() const
|
GLM_FUNC_QUALIFIER vec<4, int32, P> operator ()() const
|
||||||
{
|
{
|
||||||
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);
|
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);
|
||||||
|
|
||||||
tvec4<int32, P> Result(uninitialize);
|
vec<4, int32, P> Result(uninitialize);
|
||||||
Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0));
|
Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -40,11 +40,11 @@ namespace detail
|
|||||||
template <precision P, int E0, int E1, int E2, int E3>
|
template <precision P, int E0, int E1, int E2, int E3>
|
||||||
struct _swizzle_base1<4, uint32, P, E0,E1,E2,E3, true> : public _swizzle_base0<uint32, 4>
|
struct _swizzle_base1<4, uint32, P, E0,E1,E2,E3, true> : public _swizzle_base0<uint32, 4>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER tvec4<uint32, P> operator ()() const
|
GLM_FUNC_QUALIFIER vec<4, uint32, P> operator ()() const
|
||||||
{
|
{
|
||||||
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);
|
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);
|
||||||
|
|
||||||
tvec4<uint32, P> Result(uninitialize);
|
vec<4, uint32, P> Result(uninitialize);
|
||||||
Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0));
|
Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -54,9 +54,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_add<float, P, true>
|
struct compute_vec4_add<float, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b)
|
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_add_ps(a.data, b.data);
|
Result.data = _mm_add_ps(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -66,9 +66,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_add<double, P, true>
|
struct compute_vec4_add<double, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b)
|
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<double, P> Result(uninitialize);
|
vec<4, double, P> Result(uninitialize);
|
||||||
Result.data = _mm256_add_pd(a.data, b.data);
|
Result.data = _mm256_add_pd(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -78,9 +78,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_sub<float, P, true>
|
struct compute_vec4_sub<float, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b)
|
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_sub_ps(a.data, b.data);
|
Result.data = _mm_sub_ps(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -90,9 +90,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_sub<double, P, true>
|
struct compute_vec4_sub<double, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b)
|
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<double, P> Result(uninitialize);
|
vec<4, double, P> Result(uninitialize);
|
||||||
Result.data = _mm256_sub_pd(a.data, b.data);
|
Result.data = _mm256_sub_pd(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -102,9 +102,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_mul<float, P, true>
|
struct compute_vec4_mul<float, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b)
|
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_mul_ps(a.data, b.data);
|
Result.data = _mm_mul_ps(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -114,9 +114,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_mul<double, P, true>
|
struct compute_vec4_mul<double, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b)
|
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<double, P> Result(uninitialize);
|
vec<4, double, P> Result(uninitialize);
|
||||||
Result.data = _mm256_mul_pd(a.data, b.data);
|
Result.data = _mm256_mul_pd(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -126,9 +126,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_div<float, P, true>
|
struct compute_vec4_div<float, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b)
|
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_div_ps(a.data, b.data);
|
Result.data = _mm_div_ps(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -138,9 +138,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_div<double, P, true>
|
struct compute_vec4_div<double, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b)
|
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
|
||||||
{
|
{
|
||||||
tvec4<double, P> Result(uninitialize);
|
vec<4, double, P> Result(uninitialize);
|
||||||
Result.data = _mm256_div_pd(a.data, b.data);
|
Result.data = _mm256_div_pd(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -150,9 +150,9 @@ namespace detail
|
|||||||
template <>
|
template <>
|
||||||
struct compute_vec4_div<float, aligned_lowp, true>
|
struct compute_vec4_div<float, aligned_lowp, true>
|
||||||
{
|
{
|
||||||
static tvec4<float, aligned_lowp> call(tvec4<float, aligned_lowp> const & a, tvec4<float, aligned_lowp> const & b)
|
static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & a, vec<4, float, aligned_lowp> const & b)
|
||||||
{
|
{
|
||||||
tvec4<float, aligned_lowp> Result(uninitialize);
|
vec<4, float, aligned_lowp> Result(uninitialize);
|
||||||
Result.data = _mm_mul_ps(a.data, _mm_rcp_ps(b.data));
|
Result.data = _mm_mul_ps(a.data, _mm_rcp_ps(b.data));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -161,9 +161,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_and<T, P, true, 32, true>
|
struct compute_vec4_and<T, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm_and_si128(a.data, b.data);
|
Result.data = _mm_and_si128(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -173,9 +173,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_and<T, P, true, 64, true>
|
struct compute_vec4_and<T, P, true, 64, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm256_and_si256(a.data, b.data);
|
Result.data = _mm256_and_si256(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -185,9 +185,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_or<T, P, true, 32, true>
|
struct compute_vec4_or<T, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm_or_si128(a.data, b.data);
|
Result.data = _mm_or_si128(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -197,9 +197,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_or<T, P, true, 64, true>
|
struct compute_vec4_or<T, P, true, 64, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm256_or_si256(a.data, b.data);
|
Result.data = _mm256_or_si256(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -209,9 +209,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_xor<T, P, true, 32, true>
|
struct compute_vec4_xor<T, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm_xor_si128(a.data, b.data);
|
Result.data = _mm_xor_si128(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -221,9 +221,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_xor<T, P, true, 64, true>
|
struct compute_vec4_xor<T, P, true, 64, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm256_xor_si256(a.data, b.data);
|
Result.data = _mm256_xor_si256(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -233,9 +233,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_shift_left<T, P, true, 32, true>
|
struct compute_vec4_shift_left<T, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm_sll_epi32(a.data, b.data);
|
Result.data = _mm_sll_epi32(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -245,9 +245,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_shift_left<T, P, true, 64, true>
|
struct compute_vec4_shift_left<T, P, true, 64, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm256_sll_epi64(a.data, b.data);
|
Result.data = _mm256_sll_epi64(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -257,9 +257,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_shift_right<T, P, true, 32, true>
|
struct compute_vec4_shift_right<T, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm_srl_epi32(a.data, b.data);
|
Result.data = _mm_srl_epi32(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -269,9 +269,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_shift_right<T, P, true, 64, true>
|
struct compute_vec4_shift_right<T, P, true, 64, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b)
|
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm256_srl_epi64(a.data, b.data);
|
Result.data = _mm256_srl_epi64(a.data, b.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -281,9 +281,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_bitwise_not<T, P, true, 32, true>
|
struct compute_vec4_bitwise_not<T, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const & v)
|
static vec<4, T, P> call(vec<4, T, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm_xor_si128(v.data, _mm_set1_epi32(-1));
|
Result.data = _mm_xor_si128(v.data, _mm_set1_epi32(-1));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -293,9 +293,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_vec4_bitwise_not<T, P, true, 64, true>
|
struct compute_vec4_bitwise_not<T, P, true, 64, true>
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tvec4<T, P> const & v)
|
static vec<4, T, P> call(vec<4, T, P> const & v)
|
||||||
{
|
{
|
||||||
tvec4<T, P> Result(uninitialize);
|
vec<4, T, P> Result(uninitialize);
|
||||||
Result.data = _mm256_xor_si256(v.data, _mm_set1_epi32(-1));
|
Result.data = _mm256_xor_si256(v.data, _mm_set1_epi32(-1));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_equal<float, P, false, 32, true>
|
struct compute_vec4_equal<float, P, false, 32, true>
|
||||||
{
|
{
|
||||||
static bool call(tvec4<float, P> const & v1, tvec4<float, P> const & v2)
|
static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
|
||||||
{
|
{
|
||||||
return _mm_movemask_ps(_mm_cmpeq_ps(v1.data, v2.data)) != 0;
|
return _mm_movemask_ps(_mm_cmpeq_ps(v1.data, v2.data)) != 0;
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_equal<int32, P, true, 32, true>
|
struct compute_vec4_equal<int32, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static bool call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2)
|
static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
|
||||||
{
|
{
|
||||||
return _mm_movemask_epi8(_mm_cmpeq_epi32(v1.data, v2.data)) != 0;
|
return _mm_movemask_epi8(_mm_cmpeq_epi32(v1.data, v2.data)) != 0;
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_nequal<float, P, false, 32, true>
|
struct compute_vec4_nequal<float, P, false, 32, true>
|
||||||
{
|
{
|
||||||
static bool call(tvec4<float, P> const & v1, tvec4<float, P> const & v2)
|
static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
|
||||||
{
|
{
|
||||||
return _mm_movemask_ps(_mm_cmpneq_ps(v1.data, v2.data)) != 0;
|
return _mm_movemask_ps(_mm_cmpneq_ps(v1.data, v2.data)) != 0;
|
||||||
}
|
}
|
||||||
@ -332,7 +332,7 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_nequal<int32, P, true, 32, true>
|
struct compute_vec4_nequal<int32, P, true, 32, true>
|
||||||
{
|
{
|
||||||
static bool call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2)
|
static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
|
||||||
{
|
{
|
||||||
return _mm_movemask_epi8(_mm_cmpneq_epi32(v1.data, v2.data)) != 0;
|
return _mm_movemask_epi8(_mm_cmpneq_epi32(v1.data, v2.data)) != 0;
|
||||||
}
|
}
|
||||||
@ -341,21 +341,21 @@ namespace detail
|
|||||||
|
|
||||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::vec()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec()
|
||||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||||
: data(_mm_setzero_ps())
|
: data(_mm_setzero_ps())
|
||||||
# endif
|
# endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::vec()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec()
|
||||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||||
: data(_mm_setzero_ps())
|
: data(_mm_setzero_ps())
|
||||||
# endif
|
# endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::vec()
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec()
|
||||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||||
: data(_mm_setzero_ps())
|
: data(_mm_setzero_ps())
|
||||||
# endif
|
# endif
|
||||||
@ -363,117 +363,117 @@ namespace detail
|
|||||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::vec(float s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float s) :
|
||||||
data(_mm_set1_ps(s))
|
data(_mm_set1_ps(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::vec(float s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(float s) :
|
||||||
data(_mm_set1_ps(s))
|
data(_mm_set1_ps(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::vec(float s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(float s) :
|
||||||
data(_mm_set1_ps(s))
|
data(_mm_set1_ps(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
# if GLM_ARCH & GLM_ARCH_AVX_BIT
|
# if GLM_ARCH & GLM_ARCH_AVX_BIT
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_lowp>::vec(double s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_lowp>::vec(double s) :
|
||||||
data(_mm256_set1_pd(s))
|
data(_mm256_set1_pd(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_mediump>::vec(double s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_mediump>::vec(double s) :
|
||||||
data(_mm256_set1_pd(s))
|
data(_mm256_set1_pd(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_highp>::vec(double s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_highp>::vec(double s) :
|
||||||
data(_mm256_set1_pd(s))
|
data(_mm256_set1_pd(s))
|
||||||
{}
|
{}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::vec(int32 s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_lowp>::vec(int32 s) :
|
||||||
data(_mm_set1_epi32(s))
|
data(_mm_set1_epi32(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::vec(int32 s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_mediump>::vec(int32 s) :
|
||||||
data(_mm_set1_epi32(s))
|
data(_mm_set1_epi32(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::vec(int32 s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_highp>::vec(int32 s) :
|
||||||
data(_mm_set1_epi32(s))
|
data(_mm_set1_epi32(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
# if GLM_ARCH & GLM_ARCH_AVX2_BIT
|
# if GLM_ARCH & GLM_ARCH_AVX2_BIT
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_lowp>::vec(int64 s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_lowp>::vec(int64 s) :
|
||||||
data(_mm256_set1_epi64x(s))
|
data(_mm256_set1_epi64x(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_mediump>::vec(int64 s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_mediump>::vec(int64 s) :
|
||||||
data(_mm256_set1_epi64x(s))
|
data(_mm256_set1_epi64x(s))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_highp>::vec(int64 s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_highp>::vec(int64 s) :
|
||||||
data(_mm256_set1_epi64x(s))
|
data(_mm256_set1_epi64x(s))
|
||||||
{}
|
{}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::vec(float a, float b, float c, float d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float a, float b, float c, float d) :
|
||||||
data(_mm_set_ps(d, c, b, a))
|
data(_mm_set_ps(d, c, b, a))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::vec(float a, float b, float c, float d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(float a, float b, float c, float d) :
|
||||||
data(_mm_set_ps(d, c, b, a))
|
data(_mm_set_ps(d, c, b, a))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::vec(float a, float b, float c, float d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(float a, float b, float c, float d) :
|
||||||
data(_mm_set_ps(d, c, b, a))
|
data(_mm_set_ps(d, c, b, a))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_lowp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
||||||
data(_mm_set_epi32(d, c, b, a))
|
data(_mm_set_epi32(d, c, b, a))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::vec(int32 a, int32 b, int32 c, int32 d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_mediump>::vec(int32 a, int32 b, int32 c, int32 d) :
|
||||||
data(_mm_set_epi32(d, c, b, a))
|
data(_mm_set_epi32(d, c, b, a))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
||||||
data(_mm_set_epi32(d, c, b, a))
|
data(_mm_set_epi32(d, c, b, a))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
||||||
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
|
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::vec(int32 a, int32 b, int32 c, int32 d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(int32 a, int32 b, int32 c, int32 d) :
|
||||||
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
|
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) :
|
||||||
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
|
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
|
||||||
{}
|
{}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
336
glm/fwd.hpp
336
glm/fwd.hpp
@ -300,53 +300,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 8 bit signed integer scalar type.
|
/// Low precision 8 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i8, lowp> lowp_i8vec1;
|
typedef vec<1, i8, lowp> lowp_i8vec1;
|
||||||
|
|
||||||
/// Low precision 8 bit signed integer vector of 2 components type.
|
/// Low precision 8 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i8, lowp> lowp_i8vec2;
|
typedef vec<2, i8, lowp> lowp_i8vec2;
|
||||||
|
|
||||||
/// Low precision 8 bit signed integer vector of 3 components type.
|
/// Low precision 8 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i8, lowp> lowp_i8vec3;
|
typedef vec<3, i8, lowp> lowp_i8vec3;
|
||||||
|
|
||||||
/// Low precision 8 bit signed integer vector of 4 components type.
|
/// Low precision 8 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i8, lowp> lowp_i8vec4;
|
typedef vec<4, i8, lowp> lowp_i8vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 8 bit signed integer scalar type.
|
/// Medium precision 8 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i8, mediump> mediump_i8vec1;
|
typedef vec<1, i8, mediump> mediump_i8vec1;
|
||||||
|
|
||||||
/// Medium precision 8 bit signed integer vector of 2 components type.
|
/// Medium precision 8 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i8, mediump> mediump_i8vec2;
|
typedef vec<2, i8, mediump> mediump_i8vec2;
|
||||||
|
|
||||||
/// Medium precision 8 bit signed integer vector of 3 components type.
|
/// Medium precision 8 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i8, mediump> mediump_i8vec3;
|
typedef vec<3, i8, mediump> mediump_i8vec3;
|
||||||
|
|
||||||
/// Medium precision 8 bit signed integer vector of 4 components type.
|
/// Medium precision 8 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i8, mediump> mediump_i8vec4;
|
typedef vec<4, i8, mediump> mediump_i8vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 8 bit signed integer scalar type.
|
/// High precision 8 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i8, highp> highp_i8vec1;
|
typedef vec<1, i8, highp> highp_i8vec1;
|
||||||
|
|
||||||
/// High precision 8 bit signed integer vector of 2 components type.
|
/// High precision 8 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i8, highp> highp_i8vec2;
|
typedef vec<2, i8, highp> highp_i8vec2;
|
||||||
|
|
||||||
/// High precision 8 bit signed integer vector of 3 components type.
|
/// High precision 8 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i8, highp> highp_i8vec3;
|
typedef vec<3, i8, highp> highp_i8vec3;
|
||||||
|
|
||||||
/// High precision 8 bit signed integer vector of 4 components type.
|
/// High precision 8 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i8, highp> highp_i8vec4;
|
typedef vec<4, i8, highp> highp_i8vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef lowp_i8vec1 i8vec1;
|
typedef lowp_i8vec1 i8vec1;
|
||||||
@ -379,53 +379,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 16 bit signed integer scalar type.
|
/// Low precision 16 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i16, lowp> lowp_i16vec1;
|
typedef vec<1, i16, lowp> lowp_i16vec1;
|
||||||
|
|
||||||
/// Low precision 16 bit signed integer vector of 2 components type.
|
/// Low precision 16 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i16, lowp> lowp_i16vec2;
|
typedef vec<2, i16, lowp> lowp_i16vec2;
|
||||||
|
|
||||||
/// Low precision 16 bit signed integer vector of 3 components type.
|
/// Low precision 16 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i16, lowp> lowp_i16vec3;
|
typedef vec<3, i16, lowp> lowp_i16vec3;
|
||||||
|
|
||||||
/// Low precision 16 bit signed integer vector of 4 components type.
|
/// Low precision 16 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i16, lowp> lowp_i16vec4;
|
typedef vec<4, i16, lowp> lowp_i16vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 16 bit signed integer scalar type.
|
/// Medium precision 16 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i16, mediump> mediump_i16vec1;
|
typedef vec<1, i16, mediump> mediump_i16vec1;
|
||||||
|
|
||||||
/// Medium precision 16 bit signed integer vector of 2 components type.
|
/// Medium precision 16 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i16, mediump> mediump_i16vec2;
|
typedef vec<2, i16, mediump> mediump_i16vec2;
|
||||||
|
|
||||||
/// Medium precision 16 bit signed integer vector of 3 components type.
|
/// Medium precision 16 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i16, mediump> mediump_i16vec3;
|
typedef vec<3, i16, mediump> mediump_i16vec3;
|
||||||
|
|
||||||
/// Medium precision 16 bit signed integer vector of 4 components type.
|
/// Medium precision 16 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i16, mediump> mediump_i16vec4;
|
typedef vec<4, i16, mediump> mediump_i16vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 16 bit signed integer scalar type.
|
/// High precision 16 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i16, highp> highp_i16vec1;
|
typedef vec<1, i16, highp> highp_i16vec1;
|
||||||
|
|
||||||
/// High precision 16 bit signed integer vector of 2 components type.
|
/// High precision 16 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i16, highp> highp_i16vec2;
|
typedef vec<2, i16, highp> highp_i16vec2;
|
||||||
|
|
||||||
/// High precision 16 bit signed integer vector of 3 components type.
|
/// High precision 16 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i16, highp> highp_i16vec3;
|
typedef vec<3, i16, highp> highp_i16vec3;
|
||||||
|
|
||||||
/// High precision 16 bit signed integer vector of 4 components type.
|
/// High precision 16 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i16, highp> highp_i16vec4;
|
typedef vec<4, i16, highp> highp_i16vec4;
|
||||||
|
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
@ -459,53 +459,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 32 bit signed integer scalar type.
|
/// Low precision 32 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i32, lowp> lowp_i32vec1;
|
typedef vec<1, i32, lowp> lowp_i32vec1;
|
||||||
|
|
||||||
/// Low precision 32 bit signed integer vector of 2 components type.
|
/// Low precision 32 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i32, lowp> lowp_i32vec2;
|
typedef vec<2, i32, lowp> lowp_i32vec2;
|
||||||
|
|
||||||
/// Low precision 32 bit signed integer vector of 3 components type.
|
/// Low precision 32 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i32, lowp> lowp_i32vec3;
|
typedef vec<3, i32, lowp> lowp_i32vec3;
|
||||||
|
|
||||||
/// Low precision 32 bit signed integer vector of 4 components type.
|
/// Low precision 32 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i32, lowp> lowp_i32vec4;
|
typedef vec<4, i32, lowp> lowp_i32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer scalar type.
|
/// Medium precision 32 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i32, mediump> mediump_i32vec1;
|
typedef vec<1, i32, mediump> mediump_i32vec1;
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer vector of 2 components type.
|
/// Medium precision 32 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i32, mediump> mediump_i32vec2;
|
typedef vec<2, i32, mediump> mediump_i32vec2;
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer vector of 3 components type.
|
/// Medium precision 32 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i32, mediump> mediump_i32vec3;
|
typedef vec<3, i32, mediump> mediump_i32vec3;
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer vector of 4 components type.
|
/// Medium precision 32 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i32, mediump> mediump_i32vec4;
|
typedef vec<4, i32, mediump> mediump_i32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 32 bit signed integer scalar type.
|
/// High precision 32 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i32, highp> highp_i32vec1;
|
typedef vec<1, i32, highp> highp_i32vec1;
|
||||||
|
|
||||||
/// High precision 32 bit signed integer vector of 2 components type.
|
/// High precision 32 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i32, highp> highp_i32vec2;
|
typedef vec<2, i32, highp> highp_i32vec2;
|
||||||
|
|
||||||
/// High precision 32 bit signed integer vector of 3 components type.
|
/// High precision 32 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i32, highp> highp_i32vec3;
|
typedef vec<3, i32, highp> highp_i32vec3;
|
||||||
|
|
||||||
/// High precision 32 bit signed integer vector of 4 components type.
|
/// High precision 32 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i32, highp> highp_i32vec4;
|
typedef vec<4, i32, highp> highp_i32vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef lowp_i32vec1 i32vec1;
|
typedef lowp_i32vec1 i32vec1;
|
||||||
@ -538,53 +538,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 32 bit signed integer scalar type.
|
/// Low precision 32 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i32, lowp> lowp_i32vec1;
|
typedef vec<1, i32, lowp> lowp_i32vec1;
|
||||||
|
|
||||||
/// Low precision 32 bit signed integer vector of 2 components type.
|
/// Low precision 32 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i32, lowp> lowp_i32vec2;
|
typedef vec<2, i32, lowp> lowp_i32vec2;
|
||||||
|
|
||||||
/// Low precision 32 bit signed integer vector of 3 components type.
|
/// Low precision 32 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i32, lowp> lowp_i32vec3;
|
typedef vec<3, i32, lowp> lowp_i32vec3;
|
||||||
|
|
||||||
/// Low precision 32 bit signed integer vector of 4 components type.
|
/// Low precision 32 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i32, lowp> lowp_i32vec4;
|
typedef vec<4, i32, lowp> lowp_i32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer scalar type.
|
/// Medium precision 32 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i32, mediump> mediump_i32vec1;
|
typedef vec<1, i32, mediump> mediump_i32vec1;
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer vector of 2 components type.
|
/// Medium precision 32 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i32, mediump> mediump_i32vec2;
|
typedef vec<2, i32, mediump> mediump_i32vec2;
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer vector of 3 components type.
|
/// Medium precision 32 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i32, mediump> mediump_i32vec3;
|
typedef vec<3, i32, mediump> mediump_i32vec3;
|
||||||
|
|
||||||
/// Medium precision 32 bit signed integer vector of 4 components type.
|
/// Medium precision 32 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i32, mediump> mediump_i32vec4;
|
typedef vec<4, i32, mediump> mediump_i32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 32 bit signed integer scalar type.
|
/// High precision 32 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i32, highp> highp_i32vec1;
|
typedef vec<1, i32, highp> highp_i32vec1;
|
||||||
|
|
||||||
/// High precision 32 bit signed integer vector of 2 components type.
|
/// High precision 32 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i32, highp> highp_i32vec2;
|
typedef vec<2, i32, highp> highp_i32vec2;
|
||||||
|
|
||||||
/// High precision 32 bit signed integer vector of 3 components type.
|
/// High precision 32 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i32, highp> highp_i32vec3;
|
typedef vec<3, i32, highp> highp_i32vec3;
|
||||||
|
|
||||||
/// High precision 32 bit signed integer vector of 4 components type.
|
/// High precision 32 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i32, highp> highp_i32vec4;
|
typedef vec<4, i32, highp> highp_i32vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef lowp_i32vec1 i32vec1;
|
typedef lowp_i32vec1 i32vec1;
|
||||||
@ -618,53 +618,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 64 bit signed integer scalar type.
|
/// Low precision 64 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i64, lowp> lowp_i64vec1;
|
typedef vec<1, i64, lowp> lowp_i64vec1;
|
||||||
|
|
||||||
/// Low precision 64 bit signed integer vector of 2 components type.
|
/// Low precision 64 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i64, lowp> lowp_i64vec2;
|
typedef vec<2, i64, lowp> lowp_i64vec2;
|
||||||
|
|
||||||
/// Low precision 64 bit signed integer vector of 3 components type.
|
/// Low precision 64 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i64, lowp> lowp_i64vec3;
|
typedef vec<3, i64, lowp> lowp_i64vec3;
|
||||||
|
|
||||||
/// Low precision 64 bit signed integer vector of 4 components type.
|
/// Low precision 64 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i64, lowp> lowp_i64vec4;
|
typedef vec<4, i64, lowp> lowp_i64vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 64 bit signed integer scalar type.
|
/// Medium precision 64 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i64, mediump> mediump_i64vec1;
|
typedef vec<1, i64, mediump> mediump_i64vec1;
|
||||||
|
|
||||||
/// Medium precision 64 bit signed integer vector of 2 components type.
|
/// Medium precision 64 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i64, mediump> mediump_i64vec2;
|
typedef vec<2, i64, mediump> mediump_i64vec2;
|
||||||
|
|
||||||
/// Medium precision 64 bit signed integer vector of 3 components type.
|
/// Medium precision 64 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i64, mediump> mediump_i64vec3;
|
typedef vec<3, i64, mediump> mediump_i64vec3;
|
||||||
|
|
||||||
/// Medium precision 64 bit signed integer vector of 4 components type.
|
/// Medium precision 64 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i64, mediump> mediump_i64vec4;
|
typedef vec<4, i64, mediump> mediump_i64vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 64 bit signed integer scalar type.
|
/// High precision 64 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i64, highp> highp_i64vec1;
|
typedef vec<1, i64, highp> highp_i64vec1;
|
||||||
|
|
||||||
/// High precision 64 bit signed integer vector of 2 components type.
|
/// High precision 64 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i64, highp> highp_i64vec2;
|
typedef vec<2, i64, highp> highp_i64vec2;
|
||||||
|
|
||||||
/// High precision 64 bit signed integer vector of 3 components type.
|
/// High precision 64 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i64, highp> highp_i64vec3;
|
typedef vec<3, i64, highp> highp_i64vec3;
|
||||||
|
|
||||||
/// High precision 64 bit signed integer vector of 4 components type.
|
/// High precision 64 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i64, highp> highp_i64vec4;
|
typedef vec<4, i64, highp> highp_i64vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef lowp_i64vec1 i64vec1;
|
typedef lowp_i64vec1 i64vec1;
|
||||||
@ -909,53 +909,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 8 bit unsigned integer scalar type.
|
/// Low precision 8 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u8, lowp> lowp_u8vec1;
|
typedef vec<1, u8, lowp> lowp_u8vec1;
|
||||||
|
|
||||||
/// Low precision 8 bit unsigned integer vector of 2 components type.
|
/// Low precision 8 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u8, lowp> lowp_u8vec2;
|
typedef vec<2, u8, lowp> lowp_u8vec2;
|
||||||
|
|
||||||
/// Low precision 8 bit unsigned integer vector of 3 components type.
|
/// Low precision 8 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u8, lowp> lowp_u8vec3;
|
typedef vec<3, u8, lowp> lowp_u8vec3;
|
||||||
|
|
||||||
/// Low precision 8 bit unsigned integer vector of 4 components type.
|
/// Low precision 8 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u8, lowp> lowp_u8vec4;
|
typedef vec<4, u8, lowp> lowp_u8vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 8 bit unsigned integer scalar type.
|
/// Medium precision 8 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u8, mediump> mediump_u8vec1;
|
typedef vec<1, u8, mediump> mediump_u8vec1;
|
||||||
|
|
||||||
/// Medium precision 8 bit unsigned integer vector of 2 components type.
|
/// Medium precision 8 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u8, mediump> mediump_u8vec2;
|
typedef vec<2, u8, mediump> mediump_u8vec2;
|
||||||
|
|
||||||
/// Medium precision 8 bit unsigned integer vector of 3 components type.
|
/// Medium precision 8 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u8, mediump> mediump_u8vec3;
|
typedef vec<3, u8, mediump> mediump_u8vec3;
|
||||||
|
|
||||||
/// Medium precision 8 bit unsigned integer vector of 4 components type.
|
/// Medium precision 8 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u8, mediump> mediump_u8vec4;
|
typedef vec<4, u8, mediump> mediump_u8vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 8 bit unsigned integer scalar type.
|
/// High precision 8 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u8, highp> highp_u8vec1;
|
typedef vec<1, u8, highp> highp_u8vec1;
|
||||||
|
|
||||||
/// High precision 8 bit unsigned integer vector of 2 components type.
|
/// High precision 8 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u8, highp> highp_u8vec2;
|
typedef vec<2, u8, highp> highp_u8vec2;
|
||||||
|
|
||||||
/// High precision 8 bit unsigned integer vector of 3 components type.
|
/// High precision 8 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u8, highp> highp_u8vec3;
|
typedef vec<3, u8, highp> highp_u8vec3;
|
||||||
|
|
||||||
/// High precision 8 bit unsigned integer vector of 4 components type.
|
/// High precision 8 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u8, highp> highp_u8vec4;
|
typedef vec<4, u8, highp> highp_u8vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef lowp_u8vec1 u8vec1;
|
typedef lowp_u8vec1 u8vec1;
|
||||||
@ -988,53 +988,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 16 bit unsigned integer scalar type.
|
/// Low precision 16 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u16, lowp> lowp_u16vec1;
|
typedef vec<1, u16, lowp> lowp_u16vec1;
|
||||||
|
|
||||||
/// Low precision 16 bit unsigned integer vector of 2 components type.
|
/// Low precision 16 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u16, lowp> lowp_u16vec2;
|
typedef vec<2, u16, lowp> lowp_u16vec2;
|
||||||
|
|
||||||
/// Low precision 16 bit unsigned integer vector of 3 components type.
|
/// Low precision 16 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u16, lowp> lowp_u16vec3;
|
typedef vec<3, u16, lowp> lowp_u16vec3;
|
||||||
|
|
||||||
/// Low precision 16 bit unsigned integer vector of 4 components type.
|
/// Low precision 16 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u16, lowp> lowp_u16vec4;
|
typedef vec<4, u16, lowp> lowp_u16vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 16 bit unsigned integer scalar type.
|
/// Medium precision 16 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u16, mediump> mediump_u16vec1;
|
typedef vec<1, u16, mediump> mediump_u16vec1;
|
||||||
|
|
||||||
/// Medium precision 16 bit unsigned integer vector of 2 components type.
|
/// Medium precision 16 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u16, mediump> mediump_u16vec2;
|
typedef vec<2, u16, mediump> mediump_u16vec2;
|
||||||
|
|
||||||
/// Medium precision 16 bit unsigned integer vector of 3 components type.
|
/// Medium precision 16 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u16, mediump> mediump_u16vec3;
|
typedef vec<3, u16, mediump> mediump_u16vec3;
|
||||||
|
|
||||||
/// Medium precision 16 bit unsigned integer vector of 4 components type.
|
/// Medium precision 16 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u16, mediump> mediump_u16vec4;
|
typedef vec<4, u16, mediump> mediump_u16vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 16 bit unsigned integer scalar type.
|
/// High precision 16 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u16, highp> highp_u16vec1;
|
typedef vec<1, u16, highp> highp_u16vec1;
|
||||||
|
|
||||||
/// High precision 16 bit unsigned integer vector of 2 components type.
|
/// High precision 16 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u16, highp> highp_u16vec2;
|
typedef vec<2, u16, highp> highp_u16vec2;
|
||||||
|
|
||||||
/// High precision 16 bit unsigned integer vector of 3 components type.
|
/// High precision 16 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u16, highp> highp_u16vec3;
|
typedef vec<3, u16, highp> highp_u16vec3;
|
||||||
|
|
||||||
/// High precision 16 bit unsigned integer vector of 4 components type.
|
/// High precision 16 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u16, highp> highp_u16vec4;
|
typedef vec<4, u16, highp> highp_u16vec4;
|
||||||
|
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
@ -1068,53 +1068,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 32 bit unsigned integer scalar type.
|
/// Low precision 32 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u32, lowp> lowp_u32vec1;
|
typedef vec<1, u32, lowp> lowp_u32vec1;
|
||||||
|
|
||||||
/// Low precision 32 bit unsigned integer vector of 2 components type.
|
/// Low precision 32 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u32, lowp> lowp_u32vec2;
|
typedef vec<2, u32, lowp> lowp_u32vec2;
|
||||||
|
|
||||||
/// Low precision 32 bit unsigned integer vector of 3 components type.
|
/// Low precision 32 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u32, lowp> lowp_u32vec3;
|
typedef vec<3, u32, lowp> lowp_u32vec3;
|
||||||
|
|
||||||
/// Low precision 32 bit unsigned integer vector of 4 components type.
|
/// Low precision 32 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u32, lowp> lowp_u32vec4;
|
typedef vec<4, u32, lowp> lowp_u32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer scalar type.
|
/// Medium precision 32 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u32, mediump> mediump_u32vec1;
|
typedef vec<1, u32, mediump> mediump_u32vec1;
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer vector of 2 components type.
|
/// Medium precision 32 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u32, mediump> mediump_u32vec2;
|
typedef vec<2, u32, mediump> mediump_u32vec2;
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer vector of 3 components type.
|
/// Medium precision 32 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u32, mediump> mediump_u32vec3;
|
typedef vec<3, u32, mediump> mediump_u32vec3;
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer vector of 4 components type.
|
/// Medium precision 32 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u32, mediump> mediump_u32vec4;
|
typedef vec<4, u32, mediump> mediump_u32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer scalar type.
|
/// High precision 32 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u32, highp> highp_u32vec1;
|
typedef vec<1, u32, highp> highp_u32vec1;
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer vector of 2 components type.
|
/// High precision 32 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u32, highp> highp_u32vec2;
|
typedef vec<2, u32, highp> highp_u32vec2;
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer vector of 3 components type.
|
/// High precision 32 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u32, highp> highp_u32vec3;
|
typedef vec<3, u32, highp> highp_u32vec3;
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer vector of 4 components type.
|
/// High precision 32 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u32, highp> highp_u32vec4;
|
typedef vec<4, u32, highp> highp_u32vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef lowp_u32vec1 u32vec1;
|
typedef lowp_u32vec1 u32vec1;
|
||||||
@ -1147,53 +1147,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 32 bit unsigned integer scalar type.
|
/// Low precision 32 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u32, lowp> lowp_u32vec1;
|
typedef vec<1, u32, lowp> lowp_u32vec1;
|
||||||
|
|
||||||
/// Low precision 32 bit unsigned integer vector of 2 components type.
|
/// Low precision 32 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u32, lowp> lowp_u32vec2;
|
typedef vec<2, u32, lowp> lowp_u32vec2;
|
||||||
|
|
||||||
/// Low precision 32 bit unsigned integer vector of 3 components type.
|
/// Low precision 32 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u32, lowp> lowp_u32vec3;
|
typedef vec<3, u32, lowp> lowp_u32vec3;
|
||||||
|
|
||||||
/// Low precision 32 bit unsigned integer vector of 4 components type.
|
/// Low precision 32 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u32, lowp> lowp_u32vec4;
|
typedef vec<4, u32, lowp> lowp_u32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer scalar type.
|
/// Medium precision 32 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u32, mediump> mediump_u32vec1;
|
typedef vec<1, u32, mediump> mediump_u32vec1;
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer vector of 2 components type.
|
/// Medium precision 32 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u32, mediump> mediump_u32vec2;
|
typedef vec<2, u32, mediump> mediump_u32vec2;
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer vector of 3 components type.
|
/// Medium precision 32 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u32, mediump> mediump_u32vec3;
|
typedef vec<3, u32, mediump> mediump_u32vec3;
|
||||||
|
|
||||||
/// Medium precision 32 bit unsigned integer vector of 4 components type.
|
/// Medium precision 32 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u32, mediump> mediump_u32vec4;
|
typedef vec<4, u32, mediump> mediump_u32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer scalar type.
|
/// High precision 32 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u32, highp> highp_u32vec1;
|
typedef vec<1, u32, highp> highp_u32vec1;
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer vector of 2 components type.
|
/// High precision 32 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u32, highp> highp_u32vec2;
|
typedef vec<2, u32, highp> highp_u32vec2;
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer vector of 3 components type.
|
/// High precision 32 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u32, highp> highp_u32vec3;
|
typedef vec<3, u32, highp> highp_u32vec3;
|
||||||
|
|
||||||
/// High precision 32 bit unsigned integer vector of 4 components type.
|
/// High precision 32 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u32, highp> highp_u32vec4;
|
typedef vec<4, u32, highp> highp_u32vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_INT))
|
#if(defined(GLM_PRECISION_LOWP_INT))
|
||||||
typedef lowp_u32vec1 u32vec1;
|
typedef lowp_u32vec1 u32vec1;
|
||||||
@ -1227,53 +1227,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Low precision 64 bit unsigned integer scalar type.
|
/// Low precision 64 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u64, lowp> lowp_u64vec1;
|
typedef vec<1, u64, lowp> lowp_u64vec1;
|
||||||
|
|
||||||
/// Low precision 64 bit unsigned integer vector of 2 components type.
|
/// Low precision 64 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u64, lowp> lowp_u64vec2;
|
typedef vec<2, u64, lowp> lowp_u64vec2;
|
||||||
|
|
||||||
/// Low precision 64 bit unsigned integer vector of 3 components type.
|
/// Low precision 64 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u64, lowp> lowp_u64vec3;
|
typedef vec<3, u64, lowp> lowp_u64vec3;
|
||||||
|
|
||||||
/// Low precision 64 bit unsigned integer vector of 4 components type.
|
/// Low precision 64 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u64, lowp> lowp_u64vec4;
|
typedef vec<4, u64, lowp> lowp_u64vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium precision 64 bit unsigned integer scalar type.
|
/// Medium precision 64 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u64, mediump> mediump_u64vec1;
|
typedef vec<1, u64, mediump> mediump_u64vec1;
|
||||||
|
|
||||||
/// Medium precision 64 bit unsigned integer vector of 2 components type.
|
/// Medium precision 64 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u64, mediump> mediump_u64vec2;
|
typedef vec<2, u64, mediump> mediump_u64vec2;
|
||||||
|
|
||||||
/// Medium precision 64 bit unsigned integer vector of 3 components type.
|
/// Medium precision 64 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u64, mediump> mediump_u64vec3;
|
typedef vec<3, u64, mediump> mediump_u64vec3;
|
||||||
|
|
||||||
/// Medium precision 64 bit unsigned integer vector of 4 components type.
|
/// Medium precision 64 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u64, mediump> mediump_u64vec4;
|
typedef vec<4, u64, mediump> mediump_u64vec4;
|
||||||
|
|
||||||
|
|
||||||
/// High precision 64 bit unsigned integer scalar type.
|
/// High precision 64 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u64, highp> highp_u64vec1;
|
typedef vec<1, u64, highp> highp_u64vec1;
|
||||||
|
|
||||||
/// High precision 64 bit unsigned integer vector of 2 components type.
|
/// High precision 64 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u64, highp> highp_u64vec2;
|
typedef vec<2, u64, highp> highp_u64vec2;
|
||||||
|
|
||||||
/// High precision 64 bit unsigned integer vector of 3 components type.
|
/// High precision 64 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u64, highp> highp_u64vec3;
|
typedef vec<3, u64, highp> highp_u64vec3;
|
||||||
|
|
||||||
/// High precision 64 bit unsigned integer vector of 4 components type.
|
/// High precision 64 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u64, highp> highp_u64vec4;
|
typedef vec<4, u64, highp> highp_u64vec4;
|
||||||
|
|
||||||
#if(defined(GLM_PRECISION_LOWP_UINT))
|
#if(defined(GLM_PRECISION_LOWP_UINT))
|
||||||
typedef lowp_u64vec1 u64vec1;
|
typedef lowp_u64vec1 u64vec1;
|
||||||
@ -1512,199 +1512,199 @@ namespace glm
|
|||||||
|
|
||||||
/// Low single-precision floating-point vector of 1 component.
|
/// Low single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<float, lowp> lowp_vec1;
|
typedef vec<1, float, lowp> lowp_vec1;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 2 components.
|
/// Low single-precision floating-point vector of 2 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec2<float, lowp> lowp_vec2;
|
typedef vec<2, float, lowp> lowp_vec2;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 3 components.
|
/// Low single-precision floating-point vector of 3 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec3<float, lowp> lowp_vec3;
|
typedef vec<3, float, lowp> lowp_vec3;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 4 components.
|
/// Low single-precision floating-point vector of 4 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec4<float, lowp> lowp_vec4;
|
typedef vec<4, float, lowp> lowp_vec4;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 1 component.
|
/// Low single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<float, lowp> lowp_fvec1;
|
typedef vec<1, float, lowp> lowp_fvec1;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 2 components.
|
/// Low single-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<float, lowp> lowp_fvec2;
|
typedef vec<2, float, lowp> lowp_fvec2;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 3 components.
|
/// Low single-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<float, lowp> lowp_fvec3;
|
typedef vec<3, float, lowp> lowp_fvec3;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 4 components.
|
/// Low single-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<float, lowp> lowp_fvec4;
|
typedef vec<4, float, lowp> lowp_fvec4;
|
||||||
|
|
||||||
|
|
||||||
/// Medium single-precision floating-point vector of 1 component.
|
/// Medium single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<float, mediump> mediump_vec1;
|
typedef vec<1, float, mediump> mediump_vec1;
|
||||||
|
|
||||||
/// Medium Single-precision floating-point vector of 2 components.
|
/// Medium Single-precision floating-point vector of 2 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec2<float, mediump> mediump_vec2;
|
typedef vec<2, float, mediump> mediump_vec2;
|
||||||
|
|
||||||
/// Medium Single-precision floating-point vector of 3 components.
|
/// Medium Single-precision floating-point vector of 3 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec3<float, mediump> mediump_vec3;
|
typedef vec<3, float, mediump> mediump_vec3;
|
||||||
|
|
||||||
/// Medium Single-precision floating-point vector of 4 components.
|
/// Medium Single-precision floating-point vector of 4 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec4<float, mediump> mediump_vec4;
|
typedef vec<4, float, mediump> mediump_vec4;
|
||||||
|
|
||||||
/// Medium single-precision floating-point vector of 1 component.
|
/// Medium single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<float, mediump> mediump_fvec1;
|
typedef vec<1, float, mediump> mediump_fvec1;
|
||||||
|
|
||||||
/// Medium Single-precision floating-point vector of 2 components.
|
/// Medium Single-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<float, mediump> mediump_fvec2;
|
typedef vec<2, float, mediump> mediump_fvec2;
|
||||||
|
|
||||||
/// Medium Single-precision floating-point vector of 3 components.
|
/// Medium Single-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<float, mediump> mediump_fvec3;
|
typedef vec<3, float, mediump> mediump_fvec3;
|
||||||
|
|
||||||
/// Medium Single-precision floating-point vector of 4 components.
|
/// Medium Single-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<float, mediump> mediump_fvec4;
|
typedef vec<4, float, mediump> mediump_fvec4;
|
||||||
|
|
||||||
|
|
||||||
/// High single-precision floating-point vector of 1 component.
|
/// High single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<float, highp> highp_vec1;
|
typedef vec<1, float, highp> highp_vec1;
|
||||||
|
|
||||||
/// High Single-precision floating-point vector of 2 components.
|
/// High Single-precision floating-point vector of 2 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec2<float, highp> highp_vec2;
|
typedef vec<2, float, highp> highp_vec2;
|
||||||
|
|
||||||
/// High Single-precision floating-point vector of 3 components.
|
/// High Single-precision floating-point vector of 3 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec3<float, highp> highp_vec3;
|
typedef vec<3, float, highp> highp_vec3;
|
||||||
|
|
||||||
/// High Single-precision floating-point vector of 4 components.
|
/// High Single-precision floating-point vector of 4 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec4<float, highp> highp_vec4;
|
typedef vec<4, float, highp> highp_vec4;
|
||||||
|
|
||||||
/// High single-precision floating-point vector of 1 component.
|
/// High single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<float, highp> highp_fvec1;
|
typedef vec<1, float, highp> highp_fvec1;
|
||||||
|
|
||||||
/// High Single-precision floating-point vector of 2 components.
|
/// High Single-precision floating-point vector of 2 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec2<float, highp> highp_fvec2;
|
typedef vec<2, float, highp> highp_fvec2;
|
||||||
|
|
||||||
/// High Single-precision floating-point vector of 3 components.
|
/// High Single-precision floating-point vector of 3 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec3<float, highp> highp_fvec3;
|
typedef vec<3, float, highp> highp_fvec3;
|
||||||
|
|
||||||
/// High Single-precision floating-point vector of 4 components.
|
/// High Single-precision floating-point vector of 4 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec4<float, highp> highp_fvec4;
|
typedef vec<4, float, highp> highp_fvec4;
|
||||||
|
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 1 component.
|
/// Low single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f32, lowp> lowp_f32vec1;
|
typedef vec<1, f32, lowp> lowp_f32vec1;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 2 components.
|
/// Low single-precision floating-point vector of 2 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec2<f32, lowp> lowp_f32vec2;
|
typedef vec<2, f32, lowp> lowp_f32vec2;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 3 components.
|
/// Low single-precision floating-point vector of 3 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec3<f32, lowp> lowp_f32vec3;
|
typedef vec<3, f32, lowp> lowp_f32vec3;
|
||||||
|
|
||||||
/// Low single-precision floating-point vector of 4 components.
|
/// Low single-precision floating-point vector of 4 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec4<f32, lowp> lowp_f32vec4;
|
typedef vec<4, f32, lowp> lowp_f32vec4;
|
||||||
|
|
||||||
/// Medium single-precision floating-point vector of 1 component.
|
/// Medium single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f32, mediump> mediump_f32vec1;
|
typedef vec<1, f32, mediump> mediump_f32vec1;
|
||||||
|
|
||||||
/// Medium single-precision floating-point vector of 2 components.
|
/// Medium single-precision floating-point vector of 2 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec2<f32, mediump> mediump_f32vec2;
|
typedef vec<2, f32, mediump> mediump_f32vec2;
|
||||||
|
|
||||||
/// Medium single-precision floating-point vector of 3 components.
|
/// Medium single-precision floating-point vector of 3 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec3<f32, mediump> mediump_f32vec3;
|
typedef vec<3, f32, mediump> mediump_f32vec3;
|
||||||
|
|
||||||
/// Medium single-precision floating-point vector of 4 components.
|
/// Medium single-precision floating-point vector of 4 components.
|
||||||
/// @see core_precision
|
/// @see core_precision
|
||||||
typedef tvec4<f32, mediump> mediump_f32vec4;
|
typedef vec<4, f32, mediump> mediump_f32vec4;
|
||||||
|
|
||||||
/// High single-precision floating-point vector of 1 component.
|
/// High single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f32, highp> highp_f32vec1;
|
typedef vec<1, f32, highp> highp_f32vec1;
|
||||||
|
|
||||||
/// High single-precision floating-point vector of 2 components.
|
/// High single-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<f32, highp> highp_f32vec2;
|
typedef vec<2, f32, highp> highp_f32vec2;
|
||||||
|
|
||||||
/// High single-precision floating-point vector of 3 components.
|
/// High single-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<f32, highp> highp_f32vec3;
|
typedef vec<3, f32, highp> highp_f32vec3;
|
||||||
|
|
||||||
/// High single-precision floating-point vector of 4 components.
|
/// High single-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<f32, highp> highp_f32vec4;
|
typedef vec<4, f32, highp> highp_f32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Low double-precision floating-point vector of 1 component.
|
/// Low double-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f64, lowp> lowp_f64vec1;
|
typedef vec<1, f64, lowp> lowp_f64vec1;
|
||||||
|
|
||||||
/// Low double-precision floating-point vector of 2 components.
|
/// Low double-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<f64, lowp> lowp_f64vec2;
|
typedef vec<2, f64, lowp> lowp_f64vec2;
|
||||||
|
|
||||||
/// Low double-precision floating-point vector of 3 components.
|
/// Low double-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<f64, lowp> lowp_f64vec3;
|
typedef vec<3, f64, lowp> lowp_f64vec3;
|
||||||
|
|
||||||
/// Low double-precision floating-point vector of 4 components.
|
/// Low double-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<f64, lowp> lowp_f64vec4;
|
typedef vec<4, f64, lowp> lowp_f64vec4;
|
||||||
|
|
||||||
/// Medium double-precision floating-point vector of 1 component.
|
/// Medium double-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f64, mediump> mediump_f64vec1;
|
typedef vec<1, f64, mediump> mediump_f64vec1;
|
||||||
|
|
||||||
/// Medium double-precision floating-point vector of 2 components.
|
/// Medium double-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<f64, mediump> mediump_f64vec2;
|
typedef vec<2, f64, mediump> mediump_f64vec2;
|
||||||
|
|
||||||
/// Medium double-precision floating-point vector of 3 components.
|
/// Medium double-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<f64, mediump> mediump_f64vec3;
|
typedef vec<3, f64, mediump> mediump_f64vec3;
|
||||||
|
|
||||||
/// Medium double-precision floating-point vector of 4 components.
|
/// Medium double-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<f64, mediump> mediump_f64vec4;
|
typedef vec<4, f64, mediump> mediump_f64vec4;
|
||||||
|
|
||||||
/// High double-precision floating-point vector of 1 component.
|
/// High double-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f64, highp> highp_f64vec1;
|
typedef vec<1, f64, highp> highp_f64vec1;
|
||||||
|
|
||||||
/// High double-precision floating-point vector of 2 components.
|
/// High double-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<f64, highp> highp_f64vec2;
|
typedef vec<2, f64, highp> highp_f64vec2;
|
||||||
|
|
||||||
/// High double-precision floating-point vector of 3 components.
|
/// High double-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<f64, highp> highp_f64vec3;
|
typedef vec<3, f64, highp> highp_f64vec3;
|
||||||
|
|
||||||
/// High double-precision floating-point vector of 4 components.
|
/// High double-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<f64, highp> highp_f64vec4;
|
typedef vec<4, f64, highp> highp_f64vec4;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////
|
//////////////////////
|
||||||
|
@ -21,9 +21,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_rgbToSrgb<4, T, P, vec>
|
struct compute_rgbToSrgb<4, T, P, vec>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<T, P> call(tvec4<T, P> const& ColorRGB, T GammaCorrection)
|
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorRGB, T GammaCorrection)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(compute_rgbToSrgb<3, T, P, vec>::call(tvec3<T, P>(ColorRGB), GammaCorrection), ColorRGB.a);
|
return vec<4, T, P>(compute_rgbToSrgb<3, T, P, vec>::call(vec<3, T, P>(ColorRGB), GammaCorrection), ColorRGB.a);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -42,9 +42,9 @@ namespace detail
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
struct compute_srgbToRgb<4, T, P, vec>
|
struct compute_srgbToRgb<4, T, P, vec>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<T, P> call(tvec4<T, P> const& ColorSRGB, T Gamma)
|
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorSRGB, T Gamma)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(compute_srgbToRgb<3, T, P, vec>::call(tvec3<T, P>(ColorSRGB), Gamma), ColorSRGB.a);
|
return vec<4, T, P>(compute_srgbToRgb<3, T, P, vec>::call(vec<3, T, P>(ColorSRGB), Gamma), ColorSRGB.a);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
@ -57,11 +57,11 @@ namespace detail
|
|||||||
|
|
||||||
// Based on Ian Taylor http://chilliant.blogspot.fr/2012/08/srgb-approximations-for-hlsl.html
|
// Based on Ian Taylor http://chilliant.blogspot.fr/2012/08/srgb-approximations-for-hlsl.html
|
||||||
template <>
|
template <>
|
||||||
GLM_FUNC_QUALIFIER tvec3<float, lowp> convertLinearToSRGB(tvec3<float, lowp> const& ColorLinear)
|
GLM_FUNC_QUALIFIER vec<3, float, lowp> convertLinearToSRGB(vec<3, float, lowp> const& ColorLinear)
|
||||||
{
|
{
|
||||||
tvec3<float, lowp> S1 = sqrt(ColorLinear);
|
vec<3, float, lowp> S1 = sqrt(ColorLinear);
|
||||||
tvec3<float, lowp> S2 = sqrt(S1);
|
vec<3, float, lowp> S2 = sqrt(S1);
|
||||||
tvec3<float, lowp> S3 = sqrt(S2);
|
vec<3, float, lowp> S3 = sqrt(S2);
|
||||||
return 0.662002687f * S1 + 0.684122060f * S2 - 0.323583601f * S3 - 0.0225411470f * ColorLinear;
|
return 0.662002687f * S1 + 0.684122060f * S2 - 0.323583601f * S3 - 0.0225411470f * ColorLinear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,26 +100,26 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> epsilonEqual
|
GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonEqual
|
||||||
(
|
(
|
||||||
tquat<T, P> const & x,
|
tquat<T, P> const & x,
|
||||||
tquat<T, P> const & y,
|
tquat<T, P> const & y,
|
||||||
T const & epsilon
|
T const & epsilon
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
|
vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
|
||||||
return lessThan(abs(v), tvec4<T, P>(epsilon));
|
return lessThan(abs(v), vec<4, T, P>(epsilon));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> epsilonNotEqual
|
GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonNotEqual
|
||||||
(
|
(
|
||||||
tquat<T, P> const & x,
|
tquat<T, P> const & x,
|
||||||
tquat<T, P> const & y,
|
tquat<T, P> const & y,
|
||||||
T const & epsilon
|
T const & epsilon
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
|
vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
|
||||||
return greaterThanEqual(abs(v), tvec4<T, P>(epsilon));
|
return greaterThanEqual(abs(v), vec<4, T, P>(epsilon));
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -41,9 +41,9 @@ namespace glm
|
|||||||
/// @see gtc_epsilon
|
/// @see gtc_epsilon
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL T gauss(
|
GLM_FUNC_DECL T gauss(
|
||||||
tvec2<T, P> const& Coord,
|
vec<2, T, P> const& Coord,
|
||||||
tvec2<T, P> const& ExpectedValue,
|
vec<2, T, P> const& ExpectedValue,
|
||||||
tvec2<T, P> const& StandardDeviation);
|
vec<2, T, P> const& StandardDeviation);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -19,12 +19,12 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T gauss
|
GLM_FUNC_QUALIFIER T gauss
|
||||||
(
|
(
|
||||||
tvec2<T, P> const& Coord,
|
vec<2, T, P> const& Coord,
|
||||||
tvec2<T, P> const& ExpectedValue,
|
vec<2, T, P> const& ExpectedValue,
|
||||||
tvec2<T, P> const& StandardDeviation
|
vec<2, T, P> const& StandardDeviation
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec2<T, P> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation);
|
vec<2, T, P> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation);
|
||||||
return exp(-(Squared.x + Squared.y));
|
return exp(-(Squared.x + Squared.y));
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -19,14 +19,14 @@ namespace detail
|
|||||||
template <precision P, bool Aligned>
|
template <precision P, bool Aligned>
|
||||||
struct compute_log2<4, int, P, vec, false, Aligned>
|
struct compute_log2<4, int, P, vec, false, Aligned>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<int, P> call(tvec4<int, P> const & vec)
|
GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const& v)
|
||||||
{
|
{
|
||||||
tvec4<int, P> Result(glm::uninitialize);
|
vec<4, int, P> Result(glm::uninitialize);
|
||||||
|
|
||||||
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.x), vec.x);
|
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.x), v.x);
|
||||||
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.y), vec.y);
|
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.y), v.y);
|
||||||
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.z), vec.z);
|
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.z), v.z);
|
||||||
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.w), vec.w);
|
_BitScanReverse(reinterpret_cast<unsigned long*>(&Result.w), v.w);
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@ namespace glm
|
|||||||
tmat2x2<T, P> const Inv(inverse(tmat2x2<T, P>(m)));
|
tmat2x2<T, P> const Inv(inverse(tmat2x2<T, P>(m)));
|
||||||
|
|
||||||
return tmat3x3<T, P>(
|
return tmat3x3<T, P>(
|
||||||
tvec3<T, P>(Inv[0], static_cast<T>(0)),
|
vec<3, T, P>(Inv[0], static_cast<T>(0)),
|
||||||
tvec3<T, P>(Inv[1], static_cast<T>(0)),
|
vec<3, T, P>(Inv[1], static_cast<T>(0)),
|
||||||
tvec3<T, P>(-Inv * tvec2<T, P>(m[2]), static_cast<T>(1)));
|
vec<3, T, P>(-Inv * vec<2, T, P>(m[2]), static_cast<T>(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
@ -20,10 +20,10 @@ namespace glm
|
|||||||
tmat3x3<T, P> const Inv(inverse(tmat3x3<T, P>(m)));
|
tmat3x3<T, P> const Inv(inverse(tmat3x3<T, P>(m)));
|
||||||
|
|
||||||
return tmat4x4<T, P>(
|
return tmat4x4<T, P>(
|
||||||
tvec4<T, P>(Inv[0], static_cast<T>(0)),
|
vec<4, T, P>(Inv[0], static_cast<T>(0)),
|
||||||
tvec4<T, P>(Inv[1], static_cast<T>(0)),
|
vec<4, T, P>(Inv[1], static_cast<T>(0)),
|
||||||
tvec4<T, P>(Inv[2], static_cast<T>(0)),
|
vec<4, T, P>(Inv[2], static_cast<T>(0)),
|
||||||
tvec4<T, P>(-Inv * tvec3<T, P>(m[3]), static_cast<T>(1)));
|
vec<4, T, P>(-Inv * vec<3, T, P>(m[3]), static_cast<T>(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
|
@ -53,11 +53,11 @@ namespace glm
|
|||||||
/// @endcode
|
/// @endcode
|
||||||
/// @see gtc_matrix_transform
|
/// @see gtc_matrix_transform
|
||||||
/// @see - translate(tmat4x4<T, P> const & m, T x, T y, T z)
|
/// @see - translate(tmat4x4<T, P> const & m, T x, T y, T z)
|
||||||
/// @see - translate(tvec3<T, P> const & v)
|
/// @see - translate(vec<3, T, P> const & v)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> translate(
|
GLM_FUNC_DECL tmat4x4<T, P> translate(
|
||||||
tmat4x4<T, P> const & m,
|
tmat4x4<T, P> const & m,
|
||||||
tvec3<T, P> const & v);
|
vec<3, T, P> const & v);
|
||||||
|
|
||||||
/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
|
/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
|
||||||
///
|
///
|
||||||
@ -67,12 +67,12 @@ namespace glm
|
|||||||
/// @tparam T Value type used to build the matrix. Supported: half, float or double.
|
/// @tparam T Value type used to build the matrix. Supported: half, float or double.
|
||||||
/// @see gtc_matrix_transform
|
/// @see gtc_matrix_transform
|
||||||
/// @see - rotate(tmat4x4<T, P> const & m, T angle, T x, T y, T z)
|
/// @see - rotate(tmat4x4<T, P> const & m, T angle, T x, T y, T z)
|
||||||
/// @see - rotate(T angle, tvec3<T, P> const & v)
|
/// @see - rotate(T angle, vec<3, T, P> const & v)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> rotate(
|
GLM_FUNC_DECL tmat4x4<T, P> rotate(
|
||||||
tmat4x4<T, P> const & m,
|
tmat4x4<T, P> const & m,
|
||||||
T angle,
|
T angle,
|
||||||
tvec3<T, P> const & axis);
|
vec<3, T, P> const & axis);
|
||||||
|
|
||||||
/// Builds a scale 4 * 4 matrix created from 3 scalars.
|
/// Builds a scale 4 * 4 matrix created from 3 scalars.
|
||||||
///
|
///
|
||||||
@ -81,11 +81,11 @@ namespace glm
|
|||||||
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double.
|
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double.
|
||||||
/// @see gtc_matrix_transform
|
/// @see gtc_matrix_transform
|
||||||
/// @see - scale(tmat4x4<T, P> const & m, T x, T y, T z)
|
/// @see - scale(tmat4x4<T, P> const & m, T x, T y, T z)
|
||||||
/// @see - scale(tvec3<T, P> const & v)
|
/// @see - scale(vec<3, T, P> const & v)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> scale(
|
GLM_FUNC_DECL tmat4x4<T, P> scale(
|
||||||
tmat4x4<T, P> const & m,
|
tmat4x4<T, P> const & m,
|
||||||
tvec3<T, P> const & v);
|
vec<3, T, P> const & v);
|
||||||
|
|
||||||
/// Creates a matrix for an orthographic parallel viewing volume, using the default handedness.
|
/// Creates a matrix for an orthographic parallel viewing volume, using the default handedness.
|
||||||
///
|
///
|
||||||
@ -383,11 +383,11 @@ namespace glm
|
|||||||
/// @tparam U Currently supported: Floating-point types and integer types.
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
||||||
/// @see gtc_matrix_transform
|
/// @see gtc_matrix_transform
|
||||||
template <typename T, typename U, precision P>
|
template <typename T, typename U, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> project(
|
GLM_FUNC_DECL vec<3, T, P> project(
|
||||||
tvec3<T, P> const & obj,
|
vec<3, T, P> const & obj,
|
||||||
tmat4x4<T, P> const & model,
|
tmat4x4<T, P> const & model,
|
||||||
tmat4x4<T, P> const & proj,
|
tmat4x4<T, P> const & proj,
|
||||||
tvec4<U, P> const & viewport);
|
vec<4, U, P> const & viewport);
|
||||||
|
|
||||||
/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
|
/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
|
||||||
///
|
///
|
||||||
@ -400,11 +400,11 @@ namespace glm
|
|||||||
/// @tparam U Currently supported: Floating-point types and integer types.
|
/// @tparam U Currently supported: Floating-point types and integer types.
|
||||||
/// @see gtc_matrix_transform
|
/// @see gtc_matrix_transform
|
||||||
template <typename T, typename U, precision P>
|
template <typename T, typename U, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> unProject(
|
GLM_FUNC_DECL vec<3, T, P> unProject(
|
||||||
tvec3<T, P> const & win,
|
vec<3, T, P> const & win,
|
||||||
tmat4x4<T, P> const & model,
|
tmat4x4<T, P> const & model,
|
||||||
tmat4x4<T, P> const & proj,
|
tmat4x4<T, P> const & proj,
|
||||||
tvec4<U, P> const & viewport);
|
vec<4, U, P> const & viewport);
|
||||||
|
|
||||||
/// Define a picking region
|
/// Define a picking region
|
||||||
///
|
///
|
||||||
@ -416,9 +416,9 @@ namespace glm
|
|||||||
/// @see gtc_matrix_transform
|
/// @see gtc_matrix_transform
|
||||||
template <typename T, precision P, typename U>
|
template <typename T, precision P, typename U>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> pickMatrix(
|
GLM_FUNC_DECL tmat4x4<T, P> pickMatrix(
|
||||||
tvec2<T, P> const & center,
|
vec<2, T, P> const & center,
|
||||||
tvec2<T, P> const & delta,
|
vec<2, T, P> const & delta,
|
||||||
tvec4<U, P> const & viewport);
|
vec<4, U, P> const & viewport);
|
||||||
|
|
||||||
/// Build a look at view matrix based on the default handedness.
|
/// Build a look at view matrix based on the default handedness.
|
||||||
///
|
///
|
||||||
@ -429,9 +429,9 @@ namespace glm
|
|||||||
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> lookAt(
|
GLM_FUNC_DECL tmat4x4<T, P> lookAt(
|
||||||
tvec3<T, P> const & eye,
|
vec<3, T, P> const & eye,
|
||||||
tvec3<T, P> const & center,
|
vec<3, T, P> const & center,
|
||||||
tvec3<T, P> const & up);
|
vec<3, T, P> const & up);
|
||||||
|
|
||||||
/// Build a right handed look at view matrix.
|
/// Build a right handed look at view matrix.
|
||||||
///
|
///
|
||||||
@ -442,9 +442,9 @@ namespace glm
|
|||||||
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> lookAtRH(
|
GLM_FUNC_DECL tmat4x4<T, P> lookAtRH(
|
||||||
tvec3<T, P> const & eye,
|
vec<3, T, P> const & eye,
|
||||||
tvec3<T, P> const & center,
|
vec<3, T, P> const & center,
|
||||||
tvec3<T, P> const & up);
|
vec<3, T, P> const & up);
|
||||||
|
|
||||||
/// Build a left handed look at view matrix.
|
/// Build a left handed look at view matrix.
|
||||||
///
|
///
|
||||||
@ -455,9 +455,9 @@ namespace glm
|
|||||||
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> lookAtLH(
|
GLM_FUNC_DECL tmat4x4<T, P> lookAtLH(
|
||||||
tvec3<T, P> const & eye,
|
vec<3, T, P> const & eye,
|
||||||
tvec3<T, P> const & center,
|
vec<3, T, P> const & center,
|
||||||
tvec3<T, P> const & up);
|
vec<3, T, P> const & up);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(tmat4x4<T, P> const & m, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(tmat4x4<T, P> const & m, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(m);
|
tmat4x4<T, P> Result(m);
|
||||||
Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
|
Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
|
||||||
@ -16,14 +16,14 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(tmat4x4<T, P> const & m, T angle, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(tmat4x4<T, P> const & m, T angle, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
T const a = angle;
|
T const a = angle;
|
||||||
T const c = cos(a);
|
T const c = cos(a);
|
||||||
T const s = sin(a);
|
T const s = sin(a);
|
||||||
|
|
||||||
tvec3<T, P> axis(normalize(v));
|
vec<3, T, P> axis(normalize(v));
|
||||||
tvec3<T, P> temp((T(1) - c) * axis);
|
vec<3, T, P> temp((T(1) - c) * axis);
|
||||||
|
|
||||||
tmat4x4<T, P> Rotate(uninitialize);
|
tmat4x4<T, P> Rotate(uninitialize);
|
||||||
Rotate[0][0] = c + temp[0] * axis[0];
|
Rotate[0][0] = c + temp[0] * axis[0];
|
||||||
@ -47,14 +47,14 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow(tmat4x4<T, P> const & m, T angle, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow(tmat4x4<T, P> const & m, T angle, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
T const a = angle;
|
T const a = angle;
|
||||||
T const c = cos(a);
|
T const c = cos(a);
|
||||||
T const s = sin(a);
|
T const s = sin(a);
|
||||||
tmat4x4<T, P> Result;
|
tmat4x4<T, P> Result;
|
||||||
|
|
||||||
tvec3<T, P> axis = normalize(v);
|
vec<3, T, P> axis = normalize(v);
|
||||||
|
|
||||||
Result[0][0] = c + (static_cast<T>(1) - c) * axis.x * axis.x;
|
Result[0][0] = c + (static_cast<T>(1) - c) * axis.x * axis.x;
|
||||||
Result[0][1] = (static_cast<T>(1) - c) * axis.x * axis.y + s * axis.z;
|
Result[0][1] = (static_cast<T>(1) - c) * axis.x * axis.y + s * axis.z;
|
||||||
@ -71,12 +71,12 @@ namespace glm
|
|||||||
Result[2][2] = c + (static_cast<T>(1) - c) * axis.z * axis.z;
|
Result[2][2] = c + (static_cast<T>(1) - c) * axis.z * axis.z;
|
||||||
Result[2][3] = static_cast<T>(0);
|
Result[2][3] = static_cast<T>(0);
|
||||||
|
|
||||||
Result[3] = tvec4<T, P>(0, 0, 0, 1);
|
Result[3] = vec<4, T, P>(0, 0, 0, 1);
|
||||||
return m * Result;
|
return m * Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(tmat4x4<T, P> const & m, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(tmat4x4<T, P> const & m, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(uninitialize);
|
tmat4x4<T, P> Result(uninitialize);
|
||||||
Result[0] = m[0] * v[0];
|
Result[0] = m[0] * v[0];
|
||||||
@ -87,7 +87,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow(tmat4x4<T, P> const & m, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow(tmat4x4<T, P> const & m, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(T(1));
|
tmat4x4<T, P> Result(T(1));
|
||||||
Result[0][0] = v.x;
|
Result[0][0] = v.x;
|
||||||
@ -436,15 +436,15 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename U, precision P>
|
template <typename T, typename U, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> project
|
GLM_FUNC_QUALIFIER vec<3, T, P> project
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & obj,
|
vec<3, T, P> const & obj,
|
||||||
tmat4x4<T, P> const & model,
|
tmat4x4<T, P> const & model,
|
||||||
tmat4x4<T, P> const & proj,
|
tmat4x4<T, P> const & proj,
|
||||||
tvec4<U, P> const & viewport
|
vec<4, U, P> const & viewport
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec4<T, P> tmp = tvec4<T, P>(obj, static_cast<T>(1));
|
vec<4, T, P> tmp = vec<4, T, P>(obj, static_cast<T>(1));
|
||||||
tmp = model * tmp;
|
tmp = model * tmp;
|
||||||
tmp = proj * tmp;
|
tmp = proj * tmp;
|
||||||
|
|
||||||
@ -458,21 +458,21 @@ namespace glm
|
|||||||
tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);
|
tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);
|
||||||
tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);
|
tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);
|
||||||
|
|
||||||
return tvec3<T, P>(tmp);
|
return vec<3, T, P>(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename U, precision P>
|
template <typename T, typename U, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> unProject
|
GLM_FUNC_QUALIFIER vec<3, T, P> unProject
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & win,
|
vec<3, T, P> const & win,
|
||||||
tmat4x4<T, P> const & model,
|
tmat4x4<T, P> const & model,
|
||||||
tmat4x4<T, P> const & proj,
|
tmat4x4<T, P> const & proj,
|
||||||
tvec4<U, P> const & viewport
|
vec<4, U, P> const & viewport
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Inverse = inverse(proj * model);
|
tmat4x4<T, P> Inverse = inverse(proj * model);
|
||||||
|
|
||||||
tvec4<T, P> tmp = tvec4<T, P>(win, T(1));
|
vec<4, T, P> tmp = vec<4, T, P>(win, T(1));
|
||||||
tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
|
tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
|
||||||
tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);
|
tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);
|
||||||
# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE
|
# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE
|
||||||
@ -482,14 +482,14 @@ namespace glm
|
|||||||
tmp = tmp * static_cast<T>(2) - static_cast<T>(1);
|
tmp = tmp * static_cast<T>(2) - static_cast<T>(1);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
tvec4<T, P> obj = Inverse * tmp;
|
vec<4, T, P> obj = Inverse * tmp;
|
||||||
obj /= obj.w;
|
obj /= obj.w;
|
||||||
|
|
||||||
return tvec3<T, P>(obj);
|
return vec<3, T, P>(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P, typename U>
|
template <typename T, precision P, typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix(tvec2<T, P> const & center, tvec2<T, P> const & delta, tvec4<U, P> const & viewport)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix(vec<2, T, P> const & center, vec<2, T, P> const & delta, vec<4, U, P> const & viewport)
|
||||||
{
|
{
|
||||||
assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0));
|
assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0));
|
||||||
tmat4x4<T, P> Result(static_cast<T>(1));
|
tmat4x4<T, P> Result(static_cast<T>(1));
|
||||||
@ -497,18 +497,18 @@ namespace glm
|
|||||||
if(!(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)))
|
if(!(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)))
|
||||||
return Result; // Error
|
return Result; // Error
|
||||||
|
|
||||||
tvec3<T, P> Temp(
|
vec<3, T, P> Temp(
|
||||||
(static_cast<T>(viewport[2]) - static_cast<T>(2) * (center.x - static_cast<T>(viewport[0]))) / delta.x,
|
(static_cast<T>(viewport[2]) - static_cast<T>(2) * (center.x - static_cast<T>(viewport[0]))) / delta.x,
|
||||||
(static_cast<T>(viewport[3]) - static_cast<T>(2) * (center.y - static_cast<T>(viewport[1]))) / delta.y,
|
(static_cast<T>(viewport[3]) - static_cast<T>(2) * (center.y - static_cast<T>(viewport[1]))) / delta.y,
|
||||||
static_cast<T>(0));
|
static_cast<T>(0));
|
||||||
|
|
||||||
// Translate and scale the picked region to the entire window
|
// Translate and scale the picked region to the entire window
|
||||||
Result = translate(Result, Temp);
|
Result = translate(Result, Temp);
|
||||||
return scale(Result, tvec3<T, P>(static_cast<T>(viewport[2]) / delta.x, static_cast<T>(viewport[3]) / delta.y, static_cast<T>(1)));
|
return scale(Result, vec<3, T, P>(static_cast<T>(viewport[2]) / delta.x, static_cast<T>(viewport[3]) / delta.y, static_cast<T>(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt(tvec3<T, P> const & eye, tvec3<T, P> const & center, tvec3<T, P> const & up)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt(vec<3, T, P> const & eye, vec<3, T, P> const & center, vec<3, T, P> const & up)
|
||||||
{
|
{
|
||||||
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
||||||
return lookAtLH(eye, center, up);
|
return lookAtLH(eye, center, up);
|
||||||
@ -520,14 +520,14 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAtRH
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAtRH
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & eye,
|
vec<3, T, P> const & eye,
|
||||||
tvec3<T, P> const & center,
|
vec<3, T, P> const & center,
|
||||||
tvec3<T, P> const & up
|
vec<3, T, P> const & up
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const f(normalize(center - eye));
|
vec<3, T, P> const f(normalize(center - eye));
|
||||||
tvec3<T, P> const s(normalize(cross(f, up)));
|
vec<3, T, P> const s(normalize(cross(f, up)));
|
||||||
tvec3<T, P> const u(cross(s, f));
|
vec<3, T, P> const u(cross(s, f));
|
||||||
|
|
||||||
tmat4x4<T, P> Result(1);
|
tmat4x4<T, P> Result(1);
|
||||||
Result[0][0] = s.x;
|
Result[0][0] = s.x;
|
||||||
@ -548,14 +548,14 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAtLH
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAtLH
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & eye,
|
vec<3, T, P> const & eye,
|
||||||
tvec3<T, P> const & center,
|
vec<3, T, P> const & center,
|
||||||
tvec3<T, P> const & up
|
vec<3, T, P> const & up
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const f(normalize(center - eye));
|
vec<3, T, P> const f(normalize(center - eye));
|
||||||
tvec3<T, P> const s(normalize(cross(up, f)));
|
vec<3, T, P> const s(normalize(cross(up, f)));
|
||||||
tvec3<T, P> const u(cross(f, s));
|
vec<3, T, P> const u(cross(f, s));
|
||||||
|
|
||||||
tmat4x4<T, P> Result(1);
|
tmat4x4<T, P> Result(1);
|
||||||
Result[0][0] = s.x;
|
Result[0][0] = s.x;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -475,20 +475,20 @@ namespace glm
|
|||||||
/// the forth component specifies the 16 most-significant bits.
|
/// the forth component specifies the 16 most-significant bits.
|
||||||
///
|
///
|
||||||
/// @see gtc_packing
|
/// @see gtc_packing
|
||||||
/// @see tvec3<T, P> unpackRGBM(tvec4<T, P> const & p)
|
/// @see vec<3, T, P> unpackRGBM(vec<4, T, P> const & p)
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||||
template <int D, typename T, precision P>
|
template <int D, typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<T, P> packRGBM(tvec3<T, P> const & rgb);
|
GLM_FUNC_DECL vec<4, T, P> packRGBM(vec<3, T, P> const & rgb);
|
||||||
|
|
||||||
/// Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values.
|
/// Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values.
|
||||||
/// The first component of the vector is obtained from the 16 least-significant bits of v;
|
/// The first component of the vector is obtained from the 16 least-significant bits of v;
|
||||||
/// the forth component is obtained from the 16 most-significant bits of v.
|
/// the forth component is obtained from the 16 most-significant bits of v.
|
||||||
///
|
///
|
||||||
/// @see gtc_packing
|
/// @see gtc_packing
|
||||||
/// @see tvec4<T, P> packRGBM(tvec3<float, P> const & v)
|
/// @see vec<4, T, P> packRGBM(vec<3, float, P> const & v)
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
|
||||||
template <int D, typename T, precision P>
|
template <int D, typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> unpackRGBM(tvec4<T, P> const & rgbm);
|
GLM_FUNC_DECL vec<3, T, P> unpackRGBM(vec<4, T, P> const & rgbm);
|
||||||
|
|
||||||
/// Returns an unsigned integer vector obtained by converting the components of a floating-point vector
|
/// Returns an unsigned integer vector obtained by converting the components of a floating-point vector
|
||||||
/// to the 16-bit floating-point representation found in the OpenGL Specification.
|
/// to the 16-bit floating-point representation found in the OpenGL Specification.
|
||||||
|
@ -85,7 +85,7 @@ namespace glm
|
|||||||
// -- Explicit basic constructors --
|
// -- Explicit basic constructors --
|
||||||
|
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor);
|
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor);
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & s, tvec3<T, P> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & s, vec<3, T, P> const & v);
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & w, T const & x, T const & y, T const & z);
|
GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & w, T const & x, T const & y, T const & z);
|
||||||
|
|
||||||
// -- Conversion constructors --
|
// -- Conversion constructors --
|
||||||
@ -105,10 +105,10 @@ namespace glm
|
|||||||
/// @param v A second normalized axis
|
/// @param v A second normalized axis
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
/// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors
|
/// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors
|
||||||
GLM_FUNC_DECL tquat(tvec3<T, P> const & u, tvec3<T, P> const & v);
|
GLM_FUNC_DECL tquat(vec<3, T, P> const & u, vec<3, T, P> const & v);
|
||||||
|
|
||||||
/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
|
/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.
|
||||||
GLM_FUNC_DECL GLM_EXPLICIT tquat(tvec3<T, P> const & eulerAngles);
|
GLM_FUNC_DECL GLM_EXPLICIT tquat(vec<3, T, P> const & eulerAngles);
|
||||||
GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat3x3<T, P> const & m);
|
GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat3x3<T, P> const & m);
|
||||||
GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat4x4<T, P> const & m);
|
GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat4x4<T, P> const & m);
|
||||||
|
|
||||||
@ -147,16 +147,16 @@ namespace glm
|
|||||||
GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p);
|
GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> operator*(tquat<T, P> const & q, tvec3<T, P> const & v);
|
GLM_FUNC_DECL vec<3, T, P> operator*(tquat<T, P> const & q, vec<3, T, P> const & v);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tquat<T, P> const & q);
|
GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tquat<T, P> const & q);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<T, P> operator*(tquat<T, P> const & q, tvec4<T, P> const & v);
|
GLM_FUNC_DECL vec<4, T, P> operator*(tquat<T, P> const & q, vec<4, T, P> const & v);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, tquat<T, P> const & q);
|
GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tquat<T, P> const & q);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, T const & s);
|
GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, T const & s);
|
||||||
@ -248,14 +248,14 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, tvec3<T, P> const & axis);
|
GLM_FUNC_DECL tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, vec<3, T, P> const & axis);
|
||||||
|
|
||||||
/// Returns euler angles, pitch as x, yaw as y, roll as z.
|
/// Returns euler angles, pitch as x, yaw as y, roll as z.
|
||||||
/// The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
|
/// The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.
|
||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> eulerAngles(tquat<T, P> const & x);
|
GLM_FUNC_DECL vec<3, T, P> eulerAngles(tquat<T, P> const & x);
|
||||||
|
|
||||||
/// Returns roll value of euler angles expressed in radians.
|
/// Returns roll value of euler angles expressed in radians.
|
||||||
///
|
///
|
||||||
@ -309,7 +309,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> axis(tquat<T, P> const & x);
|
GLM_FUNC_DECL vec<3, T, P> axis(tquat<T, P> const & x);
|
||||||
|
|
||||||
/// Build a quaternion from an angle and a normalized axis.
|
/// Build a quaternion from an angle and a normalized axis.
|
||||||
///
|
///
|
||||||
@ -318,7 +318,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tquat<T, P> angleAxis(T const & angle, tvec3<T, P> const & axis);
|
GLM_FUNC_DECL tquat<T, P> angleAxis(T const & angle, vec<3, T, P> const & axis);
|
||||||
|
|
||||||
/// Returns the component-wise comparison result of x < y.
|
/// Returns the component-wise comparison result of x < y.
|
||||||
///
|
///
|
||||||
@ -326,7 +326,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y);
|
GLM_FUNC_DECL vec<4, bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y);
|
||||||
|
|
||||||
/// Returns the component-wise comparison of result x <= y.
|
/// Returns the component-wise comparison of result x <= y.
|
||||||
///
|
///
|
||||||
@ -334,7 +334,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y);
|
GLM_FUNC_DECL vec<4, bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y);
|
||||||
|
|
||||||
/// Returns the component-wise comparison of result x > y.
|
/// Returns the component-wise comparison of result x > y.
|
||||||
///
|
///
|
||||||
@ -342,7 +342,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y);
|
GLM_FUNC_DECL vec<4, bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y);
|
||||||
|
|
||||||
/// Returns the component-wise comparison of result x >= y.
|
/// Returns the component-wise comparison of result x >= y.
|
||||||
///
|
///
|
||||||
@ -350,7 +350,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y);
|
GLM_FUNC_DECL vec<4, bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y);
|
||||||
|
|
||||||
/// Returns the component-wise comparison of result x == y.
|
/// Returns the component-wise comparison of result x == y.
|
||||||
///
|
///
|
||||||
@ -358,7 +358,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y);
|
GLM_FUNC_DECL vec<4, bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y);
|
||||||
|
|
||||||
/// Returns the component-wise comparison of result x != y.
|
/// Returns the component-wise comparison of result x != y.
|
||||||
///
|
///
|
||||||
@ -366,7 +366,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see gtc_quaternion
|
/// @see gtc_quaternion
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y);
|
GLM_FUNC_DECL vec<4, bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y);
|
||||||
|
|
||||||
/// Returns true if x holds a NaN (not a number)
|
/// Returns true if x holds a NaN (not a number)
|
||||||
/// representation in the underlying implementation's set of
|
/// representation in the underlying implementation's set of
|
||||||
@ -378,7 +378,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @tparam genType Floating-point scalar or vector types.
|
/// @tparam genType Floating-point scalar or vector types.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> isnan(tquat<T, P> const & x);
|
GLM_FUNC_DECL vec<4, bool, P> isnan(tquat<T, P> const & x);
|
||||||
|
|
||||||
/// Returns true if x holds a positive infinity or negative
|
/// Returns true if x holds a positive infinity or negative
|
||||||
/// infinity representation in the underlying implementation's
|
/// infinity representation in the underlying implementation's
|
||||||
@ -388,7 +388,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @tparam genType Floating-point scalar or vector types.
|
/// @tparam genType Floating-point scalar or vector types.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<bool, P> isinf(tquat<T, P> const & x);
|
GLM_FUNC_DECL vec<4, bool, P> isinf(tquat<T, P> const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
} //namespace glm
|
} //namespace glm
|
||||||
|
@ -14,7 +14,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
static GLM_FUNC_QUALIFIER T call(tquat<T, P> const& a, tquat<T, P> const& b)
|
static GLM_FUNC_QUALIFIER T call(tquat<T, P> const& a, tquat<T, P> const& b)
|
||||||
{
|
{
|
||||||
tvec4<T, P> tmp(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
|
vec<4, T, P> tmp(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w);
|
||||||
return (tmp.x + tmp.y) + (tmp.z + tmp.w);
|
return (tmp.x + tmp.y) + (tmp.z + tmp.w);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -58,9 +58,9 @@ namespace detail
|
|||||||
template <typename T, precision P, bool Aligned>
|
template <typename T, precision P, bool Aligned>
|
||||||
struct compute_quat_mul_vec4
|
struct compute_quat_mul_vec4
|
||||||
{
|
{
|
||||||
static tvec4<T, P> call(tquat<T, P> const & q, tvec4<T, P> const & v)
|
static vec<4, T, P> call(tquat<T, P> const & q, vec<4, T, P> const & v)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(q * tvec3<T, P>(v), v.w);
|
return vec<4, T, P>(q * vec<3, T, P>(v), v.w);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
@ -112,7 +112,7 @@ namespace detail
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T const & s, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T const & s, vec<3, T, P> const & v)
|
||||||
: x(v.x), y(v.y), z(v.z), w(s)
|
: x(v.x), y(v.y), z(v.z), w(s)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -140,9 +140,9 @@ namespace detail
|
|||||||
// valType const & roll
|
// valType const & roll
|
||||||
//)
|
//)
|
||||||
//{
|
//{
|
||||||
// tvec3<valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5));
|
// vec<3, valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5));
|
||||||
// tvec3<valType> c = glm::cos(eulerAngle * valType(0.5));
|
// vec<3, valType> c = glm::cos(eulerAngle * valType(0.5));
|
||||||
// tvec3<valType> s = glm::sin(eulerAngle * valType(0.5));
|
// vec<3, valType> s = glm::sin(eulerAngle * valType(0.5));
|
||||||
//
|
//
|
||||||
// this->w = c.x * c.y * c.z + s.x * s.y * s.z;
|
// this->w = c.x * c.y * c.z + s.x * s.y * s.z;
|
||||||
// this->x = s.x * c.y * c.z - c.x * s.y * s.z;
|
// this->x = s.x * c.y * c.z - c.x * s.y * s.z;
|
||||||
@ -151,9 +151,9 @@ namespace detail
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tvec3<T, P> const & u, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const & u, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const LocalW(cross(u, v));
|
vec<3, T, P> const LocalW(cross(u, v));
|
||||||
T Dot = detail::compute_dot<vec<3, T, P>, T, detail::is_aligned<P>::value>::call(u, v);
|
T Dot = detail::compute_dot<vec<3, T, P>, T, detail::is_aligned<P>::value>::call(u, v);
|
||||||
tquat<T, P> q(T(1) + Dot, LocalW.x, LocalW.y, LocalW.z);
|
tquat<T, P> q(T(1) + Dot, LocalW.x, LocalW.y, LocalW.z);
|
||||||
|
|
||||||
@ -161,10 +161,10 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tvec3<T, P> const & eulerAngle)
|
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const & eulerAngle)
|
||||||
{
|
{
|
||||||
tvec3<T, P> c = glm::cos(eulerAngle * T(0.5));
|
vec<3, T, P> c = glm::cos(eulerAngle * T(0.5));
|
||||||
tvec3<T, P> s = glm::sin(eulerAngle * T(0.5));
|
vec<3, T, P> s = glm::sin(eulerAngle * T(0.5));
|
||||||
|
|
||||||
this->w = c.x * c.y * c.z + s.x * s.y * s.z;
|
this->w = c.x * c.y * c.z + s.x * s.y * s.z;
|
||||||
this->x = s.x * c.y * c.z - c.x * s.y * s.z;
|
this->x = s.x * c.y * c.z - c.x * s.y * s.z;
|
||||||
@ -306,29 +306,29 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tquat<T, P> const & q, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tquat<T, P> const & q, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const QuatVector(q.x, q.y, q.z);
|
vec<3, T, P> const QuatVector(q.x, q.y, q.z);
|
||||||
tvec3<T, P> const uv(glm::cross(QuatVector, v));
|
vec<3, T, P> const uv(glm::cross(QuatVector, v));
|
||||||
tvec3<T, P> const uuv(glm::cross(QuatVector, uv));
|
vec<3, T, P> const uuv(glm::cross(QuatVector, uv));
|
||||||
|
|
||||||
return v + ((uv * q.w) + uuv) * static_cast<T>(2);
|
return v + ((uv * q.w) + uuv) * static_cast<T>(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, tquat<T, P> const & q)
|
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tquat<T, P> const & q)
|
||||||
{
|
{
|
||||||
return glm::inverse(q) * v;
|
return glm::inverse(q) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tquat<T, P> const& q, tvec4<T, P> const& v)
|
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tquat<T, P> const& q, vec<4, T, P> const& v)
|
||||||
{
|
{
|
||||||
return detail::compute_quat_mul_vec4<T, P, detail::is_aligned<P>::value>::call(q, v);
|
return detail::compute_quat_mul_vec4<T, P, detail::is_aligned<P>::value>::call(q, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, tquat<T, P> const & q)
|
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tquat<T, P> const & q)
|
||||||
{
|
{
|
||||||
return glm::inverse(q) * v;
|
return glm::inverse(q) * v;
|
||||||
}
|
}
|
||||||
@ -538,9 +538,9 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
tvec3<T, P> Tmp = v;
|
vec<3, T, P> Tmp = v;
|
||||||
|
|
||||||
// Axis of rotation must be normalised
|
// Axis of rotation must be normalised
|
||||||
T len = glm::length(Tmp);
|
T len = glm::length(Tmp);
|
||||||
@ -560,9 +560,9 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> eulerAngles(tquat<T, P> const & x)
|
GLM_FUNC_QUALIFIER vec<3, T, P> eulerAngles(tquat<T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec3<T, P>(pitch(x), yaw(x), roll(x));
|
return vec<3, T, P>(pitch(x), yaw(x), roll(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
@ -694,17 +694,17 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> axis(tquat<T, P> const & x)
|
GLM_FUNC_QUALIFIER vec<3, T, P> axis(tquat<T, P> const & x)
|
||||||
{
|
{
|
||||||
T tmp1 = static_cast<T>(1) - x.w * x.w;
|
T tmp1 = static_cast<T>(1) - x.w * x.w;
|
||||||
if(tmp1 <= static_cast<T>(0))
|
if(tmp1 <= static_cast<T>(0))
|
||||||
return tvec3<T, P>(0, 0, 1);
|
return vec<3, T, P>(0, 0, 1);
|
||||||
T tmp2 = static_cast<T>(1) / sqrt(tmp1);
|
T tmp2 = static_cast<T>(1) / sqrt(tmp1);
|
||||||
return tvec3<T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2);
|
return vec<3, T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> angleAxis(T const & angle, tvec3<T, P> const & v)
|
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(uninitialize);
|
||||||
|
|
||||||
@ -719,73 +719,73 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||||
{
|
{
|
||||||
tvec4<bool, P> Result(uninitialize);
|
vec<4, bool, P> Result(uninitialize);
|
||||||
for(length_t i = 0; i < x.length(); ++i)
|
for(length_t i = 0; i < x.length(); ++i)
|
||||||
Result[i] = x[i] < y[i];
|
Result[i] = x[i] < y[i];
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||||
{
|
{
|
||||||
tvec4<bool, P> Result(uninitialize);
|
vec<4, bool, P> Result(uninitialize);
|
||||||
for(length_t i = 0; i < x.length(); ++i)
|
for(length_t i = 0; i < x.length(); ++i)
|
||||||
Result[i] = x[i] <= y[i];
|
Result[i] = x[i] <= y[i];
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||||
{
|
{
|
||||||
tvec4<bool, P> Result(uninitialize);
|
vec<4, bool, P> Result(uninitialize);
|
||||||
for(length_t i = 0; i < x.length(); ++i)
|
for(length_t i = 0; i < x.length(); ++i)
|
||||||
Result[i] = x[i] > y[i];
|
Result[i] = x[i] > y[i];
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||||
{
|
{
|
||||||
tvec4<bool, P> Result(uninitialize);
|
vec<4, bool, P> Result(uninitialize);
|
||||||
for(length_t i = 0; i < x.length(); ++i)
|
for(length_t i = 0; i < x.length(); ++i)
|
||||||
Result[i] = x[i] >= y[i];
|
Result[i] = x[i] >= y[i];
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> equal(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||||
{
|
{
|
||||||
tvec4<bool, P> Result(uninitialize);
|
vec<4, bool, P> Result(uninitialize);
|
||||||
for(length_t i = 0; i < x.length(); ++i)
|
for(length_t i = 0; i < x.length(); ++i)
|
||||||
Result[i] = x[i] == y[i];
|
Result[i] = x[i] == y[i];
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y)
|
||||||
{
|
{
|
||||||
tvec4<bool, P> Result(uninitialize);
|
vec<4, bool, P> Result(uninitialize);
|
||||||
for(length_t i = 0; i < x.length(); ++i)
|
for(length_t i = 0; i < x.length(); ++i)
|
||||||
Result[i] = x[i] != y[i];
|
Result[i] = x[i] != y[i];
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> isnan(tquat<T, P> const& q)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> isnan(tquat<T, P> const& q)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec4<bool, P>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w));
|
return vec<4, bool, P>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> isinf(tquat<T, P> const& q)
|
GLM_FUNC_QUALIFIER vec<4, bool, P> isinf(tquat<T, P> const& q)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isinf' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isinf' only accept floating-point inputs");
|
||||||
|
|
||||||
return tvec4<bool, P>(isinf(q.x), isinf(q.y), isinf(q.z), isinf(q.w));
|
return vec<4, bool, P>(isinf(q.x), isinf(q.y), isinf(q.z), isinf(q.w));
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p)
|
static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p)
|
||||||
{
|
{
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_sub_ps(q.data, p.data);
|
Result.data = _mm_sub_ps(q.data, p.data);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
static tquat<float, P> call(tquat<float, P> const& q, float s)
|
static tquat<float, P> call(tquat<float, P> const& q, float s)
|
||||||
{
|
{
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_mul_ps(q.data, _mm_set_ps1(s));
|
Result.data = _mm_mul_ps(q.data, _mm_set_ps1(s));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
static tquat<float, P> call(tquat<float, P> const& q, float s)
|
static tquat<float, P> call(tquat<float, P> const& q, float s)
|
||||||
{
|
{
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_div_ps(q.data, _mm_set_ps1(s));
|
Result.data = _mm_div_ps(q.data, _mm_set_ps1(s));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
@ -169,7 +169,7 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_quat_mul_vec4<float, P, true>
|
struct compute_quat_mul_vec4<float, P, true>
|
||||||
{
|
{
|
||||||
static tvec4<float, P> call(tquat<float, P> const& q, tvec4<float, P> const& v)
|
static vec<4, float, P> call(tquat<float, P> const& q, vec<4, float, P> const& v)
|
||||||
{
|
{
|
||||||
__m128 const q_wwww = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 3, 3, 3));
|
__m128 const q_wwww = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 3, 3, 3));
|
||||||
__m128 const q_swp0 = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 0, 2, 1));
|
__m128 const q_swp0 = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 0, 2, 1));
|
||||||
@ -186,7 +186,7 @@ namespace detail
|
|||||||
uv = _mm_mul_ps(uv, _mm_mul_ps(q_wwww, two));
|
uv = _mm_mul_ps(uv, _mm_mul_ps(q_wwww, two));
|
||||||
uuv = _mm_mul_ps(uuv, two);
|
uuv = _mm_mul_ps(uuv, two);
|
||||||
|
|
||||||
tvec4<float, P> Result(uninitialize);
|
vec<4, float, P> Result(uninitialize);
|
||||||
Result.data = _mm_add_ps(v.Data, _mm_add_ps(uv, uuv));
|
Result.data = _mm_add_ps(v.Data, _mm_add_ps(uv, uuv));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace glm
|
|||||||
/// @param Radius
|
/// @param Radius
|
||||||
/// @see gtc_random
|
/// @see gtc_random
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_DECL tvec2<T, defaultp> circularRand(
|
GLM_FUNC_DECL vec<2, T, defaultp> circularRand(
|
||||||
T Radius);
|
T Radius);
|
||||||
|
|
||||||
/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius
|
/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius
|
||||||
@ -72,7 +72,7 @@ namespace glm
|
|||||||
/// @param Radius
|
/// @param Radius
|
||||||
/// @see gtc_random
|
/// @see gtc_random
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_DECL tvec3<T, defaultp> sphericalRand(
|
GLM_FUNC_DECL vec<3, T, defaultp> sphericalRand(
|
||||||
T Radius);
|
T Radius);
|
||||||
|
|
||||||
/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius
|
/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius
|
||||||
@ -80,7 +80,7 @@ namespace glm
|
|||||||
/// @param Radius
|
/// @param Radius
|
||||||
/// @see gtc_random
|
/// @see gtc_random
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_DECL tvec2<T, defaultp> diskRand(
|
GLM_FUNC_DECL vec<2, T, defaultp> diskRand(
|
||||||
T Radius);
|
T Radius);
|
||||||
|
|
||||||
/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius
|
/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius
|
||||||
@ -88,7 +88,7 @@ namespace glm
|
|||||||
/// @param Radius
|
/// @param Radius
|
||||||
/// @see gtc_random
|
/// @see gtc_random
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_DECL tvec3<T, defaultp> ballRand(
|
GLM_FUNC_DECL vec<3, T, defaultp> ballRand(
|
||||||
T Radius);
|
T Radius);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
@ -19,9 +19,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_rand<1, uint8, P, vec>
|
struct compute_rand<1, uint8, P, vec>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec1<uint8, P> call()
|
GLM_FUNC_QUALIFIER static vec<1, uint8, P> call()
|
||||||
{
|
{
|
||||||
return tvec1<uint8, P>(
|
return vec<1, uint8, P>(
|
||||||
std::rand() % std::numeric_limits<uint8>::max());
|
std::rand() % std::numeric_limits<uint8>::max());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -29,9 +29,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_rand<2, uint8, P, vec>
|
struct compute_rand<2, uint8, P, vec>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec2<uint8, P> call()
|
GLM_FUNC_QUALIFIER static vec<2, uint8, P> call()
|
||||||
{
|
{
|
||||||
return tvec2<uint8, P>(
|
return vec<2, uint8, P>(
|
||||||
std::rand() % std::numeric_limits<uint8>::max(),
|
std::rand() % std::numeric_limits<uint8>::max(),
|
||||||
std::rand() % std::numeric_limits<uint8>::max());
|
std::rand() % std::numeric_limits<uint8>::max());
|
||||||
}
|
}
|
||||||
@ -40,9 +40,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_rand<3, uint8, P, vec>
|
struct compute_rand<3, uint8, P, vec>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec3<uint8, P> call()
|
GLM_FUNC_QUALIFIER static vec<3, uint8, P> call()
|
||||||
{
|
{
|
||||||
return tvec3<uint8, P>(
|
return vec<3, uint8, P>(
|
||||||
std::rand() % std::numeric_limits<uint8>::max(),
|
std::rand() % std::numeric_limits<uint8>::max(),
|
||||||
std::rand() % std::numeric_limits<uint8>::max(),
|
std::rand() % std::numeric_limits<uint8>::max(),
|
||||||
std::rand() % std::numeric_limits<uint8>::max());
|
std::rand() % std::numeric_limits<uint8>::max());
|
||||||
@ -52,9 +52,9 @@ namespace detail
|
|||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_rand<4, uint8, P, vec>
|
struct compute_rand<4, uint8, P, vec>
|
||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER static tvec4<uint8, P> call()
|
GLM_FUNC_QUALIFIER static vec<4, uint8, P> call()
|
||||||
{
|
{
|
||||||
return tvec4<uint8, P>(
|
return vec<4, uint8, P>(
|
||||||
std::rand() % std::numeric_limits<uint8>::max(),
|
std::rand() % std::numeric_limits<uint8>::max(),
|
||||||
std::rand() % std::numeric_limits<uint8>::max(),
|
std::rand() % std::numeric_limits<uint8>::max(),
|
||||||
std::rand() % std::numeric_limits<uint8>::max(),
|
std::rand() % std::numeric_limits<uint8>::max(),
|
||||||
@ -259,8 +259,8 @@ namespace detail
|
|||||||
GLM_FUNC_QUALIFIER genType linearRand(genType Min, genType Max)
|
GLM_FUNC_QUALIFIER genType linearRand(genType Min, genType Max)
|
||||||
{
|
{
|
||||||
return detail::compute_linearRand<1, genType, highp, vec>::call(
|
return detail::compute_linearRand<1, genType, highp, vec>::call(
|
||||||
tvec1<genType, highp>(Min),
|
vec<1, genType, highp>(Min),
|
||||||
tvec1<genType, highp>(Max)).x;
|
vec<1, genType, highp>(Max)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
@ -292,16 +292,16 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, defaultp> diskRand(T Radius)
|
GLM_FUNC_QUALIFIER vec<2, T, defaultp> diskRand(T Radius)
|
||||||
{
|
{
|
||||||
tvec2<T, defaultp> Result(T(0));
|
vec<2, T, defaultp> Result(T(0));
|
||||||
T LenRadius(T(0));
|
T LenRadius(T(0));
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
Result = linearRand(
|
Result = linearRand(
|
||||||
tvec2<T, defaultp>(-Radius),
|
vec<2, T, defaultp>(-Radius),
|
||||||
tvec2<T, defaultp>(Radius));
|
vec<2, T, defaultp>(Radius));
|
||||||
LenRadius = length(Result);
|
LenRadius = length(Result);
|
||||||
}
|
}
|
||||||
while(LenRadius > Radius);
|
while(LenRadius > Radius);
|
||||||
@ -310,16 +310,16 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, defaultp> ballRand(T Radius)
|
GLM_FUNC_QUALIFIER vec<3, T, defaultp> ballRand(T Radius)
|
||||||
{
|
{
|
||||||
tvec3<T, defaultp> Result(T(0));
|
vec<3, T, defaultp> Result(T(0));
|
||||||
T LenRadius(T(0));
|
T LenRadius(T(0));
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
Result = linearRand(
|
Result = linearRand(
|
||||||
tvec3<T, defaultp>(-Radius),
|
vec<3, T, defaultp>(-Radius),
|
||||||
tvec3<T, defaultp>(Radius));
|
vec<3, T, defaultp>(Radius));
|
||||||
LenRadius = length(Result);
|
LenRadius = length(Result);
|
||||||
}
|
}
|
||||||
while(LenRadius > Radius);
|
while(LenRadius > Radius);
|
||||||
@ -328,14 +328,14 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, defaultp> circularRand(T Radius)
|
GLM_FUNC_QUALIFIER vec<2, T, defaultp> circularRand(T Radius)
|
||||||
{
|
{
|
||||||
T a = linearRand(T(0), T(6.283185307179586476925286766559f));
|
T a = linearRand(T(0), T(6.283185307179586476925286766559f));
|
||||||
return tvec2<T, defaultp>(cos(a), sin(a)) * Radius;
|
return vec<2, T, defaultp>(cos(a), sin(a)) * Radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, defaultp> sphericalRand(T Radius)
|
GLM_FUNC_QUALIFIER vec<3, T, defaultp> sphericalRand(T Radius)
|
||||||
{
|
{
|
||||||
T z = linearRand(T(-1), T(1));
|
T z = linearRand(T(-1), T(1));
|
||||||
T a = linearRand(T(0), T(6.283185307179586476925286766559f));
|
T a = linearRand(T(0), T(6.283185307179586476925286766559f));
|
||||||
@ -345,6 +345,6 @@ namespace detail
|
|||||||
T x = r * cos(a);
|
T x = r * cos(a);
|
||||||
T y = r * sin(a);
|
T y = r * sin(a);
|
||||||
|
|
||||||
return tvec3<T, defaultp>(x, y, z) * Radius;
|
return vec<3, T, defaultp>(x, y, z) * Radius;
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -232,7 +232,7 @@ namespace detail
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType ceilPowerOfTwo(genType value)
|
GLM_FUNC_QUALIFIER genType ceilPowerOfTwo(genType value)
|
||||||
{
|
{
|
||||||
return detail::compute_ceilPowerOfTwo<1, genType, defaultp, vec, std::numeric_limits<genType>::is_signed>::call(tvec1<genType, defaultp>(value)).x;
|
return detail::compute_ceilPowerOfTwo<1, genType, defaultp, vec, std::numeric_limits<genType>::is_signed>::call(vec<1, genType, defaultp>(value)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
@ -282,7 +282,7 @@ namespace detail
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER bool isMultiple(genType Value, genType Multiple)
|
GLM_FUNC_QUALIFIER bool isMultiple(genType Value, genType Multiple)
|
||||||
{
|
{
|
||||||
return isMultiple(tvec1<genType>(Value), tvec1<genType>(Multiple)).x;
|
return isMultiple(vec<1, genType>(Value), vec<1, genType>(Multiple)).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
|
@ -30,205 +30,205 @@ namespace glm
|
|||||||
|
|
||||||
// -- *vec1 --
|
// -- *vec1 --
|
||||||
|
|
||||||
typedef tvec1<float, aligned_highp> aligned_highp_vec1;
|
typedef vec<1, float, aligned_highp> aligned_highp_vec1;
|
||||||
typedef tvec1<float, aligned_mediump> aligned_mediump_vec1;
|
typedef vec<1, float, aligned_mediump> aligned_mediump_vec1;
|
||||||
typedef tvec1<float, aligned_lowp> aligned_lowp_vec1;
|
typedef vec<1, float, aligned_lowp> aligned_lowp_vec1;
|
||||||
typedef tvec1<double, aligned_highp> aligned_highp_dvec1;
|
typedef vec<1, double, aligned_highp> aligned_highp_dvec1;
|
||||||
typedef tvec1<double, aligned_mediump> aligned_mediump_dvec1;
|
typedef vec<1, double, aligned_mediump> aligned_mediump_dvec1;
|
||||||
typedef tvec1<double, aligned_lowp> aligned_lowp_dvec1;
|
typedef vec<1, double, aligned_lowp> aligned_lowp_dvec1;
|
||||||
typedef tvec1<int, aligned_highp> aligned_highp_ivec1;
|
typedef vec<1, int, aligned_highp> aligned_highp_ivec1;
|
||||||
typedef tvec1<int, aligned_mediump> aligned_mediump_ivec1;
|
typedef vec<1, int, aligned_mediump> aligned_mediump_ivec1;
|
||||||
typedef tvec1<int, aligned_lowp> aligned_lowp_ivec1;
|
typedef vec<1, int, aligned_lowp> aligned_lowp_ivec1;
|
||||||
typedef tvec1<uint, aligned_highp> aligned_highp_uvec1;
|
typedef vec<1, uint, aligned_highp> aligned_highp_uvec1;
|
||||||
typedef tvec1<uint, aligned_mediump> aligned_mediump_uvec1;
|
typedef vec<1, uint, aligned_mediump> aligned_mediump_uvec1;
|
||||||
typedef tvec1<uint, aligned_lowp> aligned_lowp_uvec1;
|
typedef vec<1, uint, aligned_lowp> aligned_lowp_uvec1;
|
||||||
typedef tvec1<bool, aligned_highp> aligned_highp_bvec1;
|
typedef vec<1, bool, aligned_highp> aligned_highp_bvec1;
|
||||||
typedef tvec1<bool, aligned_mediump> aligned_mediump_bvec1;
|
typedef vec<1, bool, aligned_mediump> aligned_mediump_bvec1;
|
||||||
typedef tvec1<bool, aligned_lowp> aligned_lowp_bvec1;
|
typedef vec<1, bool, aligned_lowp> aligned_lowp_bvec1;
|
||||||
|
|
||||||
typedef tvec1<float, packed_highp> packed_highp_vec1;
|
typedef vec<1, float, packed_highp> packed_highp_vec1;
|
||||||
typedef tvec1<float, packed_mediump> packed_mediump_vec1;
|
typedef vec<1, float, packed_mediump> packed_mediump_vec1;
|
||||||
typedef tvec1<float, packed_lowp> packed_lowp_vec1;
|
typedef vec<1, float, packed_lowp> packed_lowp_vec1;
|
||||||
typedef tvec1<double, packed_highp> packed_highp_dvec1;
|
typedef vec<1, double, packed_highp> packed_highp_dvec1;
|
||||||
typedef tvec1<double, packed_mediump> packed_mediump_dvec1;
|
typedef vec<1, double, packed_mediump> packed_mediump_dvec1;
|
||||||
typedef tvec1<double, packed_lowp> packed_lowp_dvec1;
|
typedef vec<1, double, packed_lowp> packed_lowp_dvec1;
|
||||||
typedef tvec1<int, packed_highp> packed_highp_ivec1;
|
typedef vec<1, int, packed_highp> packed_highp_ivec1;
|
||||||
typedef tvec1<int, packed_mediump> packed_mediump_ivec1;
|
typedef vec<1, int, packed_mediump> packed_mediump_ivec1;
|
||||||
typedef tvec1<int, packed_lowp> packed_lowp_ivec1;
|
typedef vec<1, int, packed_lowp> packed_lowp_ivec1;
|
||||||
typedef tvec1<uint, packed_highp> packed_highp_uvec1;
|
typedef vec<1, uint, packed_highp> packed_highp_uvec1;
|
||||||
typedef tvec1<uint, packed_mediump> packed_mediump_uvec1;
|
typedef vec<1, uint, packed_mediump> packed_mediump_uvec1;
|
||||||
typedef tvec1<uint, packed_lowp> packed_lowp_uvec1;
|
typedef vec<1, uint, packed_lowp> packed_lowp_uvec1;
|
||||||
typedef tvec1<bool, packed_highp> packed_highp_bvec1;
|
typedef vec<1, bool, packed_highp> packed_highp_bvec1;
|
||||||
typedef tvec1<bool, packed_mediump> packed_mediump_bvec1;
|
typedef vec<1, bool, packed_mediump> packed_mediump_bvec1;
|
||||||
typedef tvec1<bool, packed_lowp> packed_lowp_bvec1;
|
typedef vec<1, bool, packed_lowp> packed_lowp_bvec1;
|
||||||
|
|
||||||
// -- *vec2 --
|
// -- *vec2 --
|
||||||
|
|
||||||
/// 2 components vector of high single-precision floating-point numbers.
|
/// 2 components vector of high single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<float, aligned_highp> aligned_highp_vec2;
|
typedef vec<2, float, aligned_highp> aligned_highp_vec2;
|
||||||
|
|
||||||
/// 2 components vector of medium single-precision floating-point numbers.
|
/// 2 components vector of medium single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<float, aligned_mediump> aligned_mediump_vec2;
|
typedef vec<2, float, aligned_mediump> aligned_mediump_vec2;
|
||||||
|
|
||||||
/// 2 components vector of low single-precision floating-point numbers.
|
/// 2 components vector of low single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<float, aligned_lowp> aligned_lowp_vec2;
|
typedef vec<2, float, aligned_lowp> aligned_lowp_vec2;
|
||||||
|
|
||||||
/// 2 components vector of high double-precision floating-point numbers.
|
/// 2 components vector of high double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<double, aligned_highp> aligned_highp_dvec2;
|
typedef vec<2double, aligned_highp> aligned_highp_dvec2;
|
||||||
|
|
||||||
/// 2 components vector of medium double-precision floating-point numbers.
|
/// 2 components vector of medium double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<double, aligned_mediump> aligned_mediump_dvec2;
|
typedef vec<2double, aligned_mediump> aligned_mediump_dvec2;
|
||||||
|
|
||||||
/// 2 components vector of low double-precision floating-point numbers.
|
/// 2 components vector of low double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<double, aligned_lowp> aligned_lowp_dvec2;
|
typedef vec<2double, aligned_lowp> aligned_lowp_dvec2;
|
||||||
|
|
||||||
/// 2 components vector of high precision signed integer numbers.
|
/// 2 components vector of high precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<int, aligned_highp> aligned_highp_ivec2;
|
typedef vec<2, int, aligned_highp> aligned_highp_ivec2;
|
||||||
|
|
||||||
/// 2 components vector of medium precision signed integer numbers.
|
/// 2 components vector of medium precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<int, aligned_mediump> aligned_mediump_ivec2;
|
typedef vec<2, int, aligned_mediump> aligned_mediump_ivec2;
|
||||||
|
|
||||||
/// 2 components vector of low precision signed integer numbers.
|
/// 2 components vector of low precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<int, aligned_lowp> aligned_lowp_ivec2;
|
typedef vec<2, int, aligned_lowp> aligned_lowp_ivec2;
|
||||||
|
|
||||||
/// 2 components vector of high precision unsigned integer numbers.
|
/// 2 components vector of high precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<uint, aligned_highp> aligned_highp_uvec2;
|
typedef vec<2, uint, aligned_highp> aligned_highp_uvec2;
|
||||||
|
|
||||||
/// 2 components vector of medium precision unsigned integer numbers.
|
/// 2 components vector of medium precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<uint, aligned_mediump> aligned_mediump_uvec2;
|
typedef vec<2, uint, aligned_mediump> aligned_mediump_uvec2;
|
||||||
|
|
||||||
/// 2 components vector of low precision unsigned integer numbers.
|
/// 2 components vector of low precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<uint, aligned_lowp> aligned_lowp_uvec2;
|
typedef vec<2, uint, aligned_lowp> aligned_lowp_uvec2;
|
||||||
|
|
||||||
/// 2 components vector of high precision bool numbers.
|
/// 2 components vector of high precision bool numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<bool, aligned_highp> aligned_highp_bvec2;
|
typedef vec<2bool, aligned_highp> aligned_highp_bvec2;
|
||||||
|
|
||||||
/// 2 components vector of medium precision bool numbers.
|
/// 2 components vector of medium precision bool numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<bool, aligned_mediump> aligned_mediump_bvec2;
|
typedef vec<2bool, aligned_mediump> aligned_mediump_bvec2;
|
||||||
|
|
||||||
/// 2 components vector of low precision bool numbers.
|
/// 2 components vector of low precision bool numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec2<bool, aligned_lowp> aligned_lowp_bvec2;
|
typedef vec<2bool, aligned_lowp> aligned_lowp_bvec2;
|
||||||
|
|
||||||
// -- *vec3 --
|
// -- *vec3 --
|
||||||
|
|
||||||
/// 3 components vector of high single-precision floating-point numbers.
|
/// 3 components vector of high single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<float, aligned_highp> aligned_highp_vec3;
|
typedef vec<3, float, aligned_highp> aligned_highp_vec3;
|
||||||
|
|
||||||
/// 3 components vector of medium single-precision floating-point numbers.
|
/// 3 components vector of medium single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<float, aligned_mediump> aligned_mediump_vec3;
|
typedef vec<3, float, aligned_mediump> aligned_mediump_vec3;
|
||||||
|
|
||||||
/// 3 components vector of low single-precision floating-point numbers.
|
/// 3 components vector of low single-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<float, aligned_lowp> aligned_lowp_vec3;
|
typedef vec<3, float, aligned_lowp> aligned_lowp_vec3;
|
||||||
|
|
||||||
/// 3 components vector of high double-precision floating-point numbers.
|
/// 3 components vector of high double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<double, aligned_highp> aligned_highp_dvec3;
|
typedef vec<3, double, aligned_highp> aligned_highp_dvec3;
|
||||||
|
|
||||||
/// 3 components vector of medium double-precision floating-point numbers.
|
/// 3 components vector of medium double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<double, aligned_mediump> aligned_mediump_dvec3;
|
typedef vec<3, double, aligned_mediump> aligned_mediump_dvec3;
|
||||||
|
|
||||||
/// 3 components vector of low double-precision floating-point numbers.
|
/// 3 components vector of low double-precision floating-point numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<double, aligned_lowp> aligned_lowp_dvec3;
|
typedef vec<3, double, aligned_lowp> aligned_lowp_dvec3;
|
||||||
|
|
||||||
/// 3 components vector of high precision signed integer numbers.
|
/// 3 components vector of high precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<int, aligned_highp> aligned_highp_ivec3;
|
typedef vec<3, int, aligned_highp> aligned_highp_ivec3;
|
||||||
|
|
||||||
/// 3 components vector of medium precision signed integer numbers.
|
/// 3 components vector of medium precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<int, aligned_mediump> aligned_mediump_ivec3;
|
typedef vec<3, int, aligned_mediump> aligned_mediump_ivec3;
|
||||||
|
|
||||||
/// 3 components vector of low precision signed integer numbers.
|
/// 3 components vector of low precision signed integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<int, aligned_lowp> aligned_lowp_ivec3;
|
typedef vec<3, int, aligned_lowp> aligned_lowp_ivec3;
|
||||||
|
|
||||||
/// 3 components vector of high precision unsigned integer numbers.
|
/// 3 components vector of high precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<uint, aligned_highp> aligned_highp_uvec3;
|
typedef vec<3, uint, aligned_highp> aligned_highp_uvec3;
|
||||||
|
|
||||||
/// 3 components vector of medium precision unsigned integer numbers.
|
/// 3 components vector of medium precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<uint, aligned_mediump> aligned_mediump_uvec3;
|
typedef vec<3, uint, aligned_mediump> aligned_mediump_uvec3;
|
||||||
|
|
||||||
/// 3 components vector of low precision unsigned integer numbers.
|
/// 3 components vector of low precision unsigned integer numbers.
|
||||||
/// There is no guarantee on the actual precision.
|
/// There is no guarantee on the actual precision.
|
||||||
typedef tvec3<uint, aligned_lowp> aligned_lowp_uvec3;
|
typedef vec<3, uint, aligned_lowp> aligned_lowp_uvec3;
|
||||||
|
|
||||||
/// 3 components vector of high precision bool numbers.
|
/// 3 components vector of high precision bool numbers.
|
||||||
typedef tvec3<bool, aligned_highp> aligned_highp_bvec3;
|
typedef vec<3, bool, aligned_highp> aligned_highp_bvec3;
|
||||||
|
|
||||||
/// 3 components vector of medium precision bool numbers.
|
/// 3 components vector of medium precision bool numbers.
|
||||||
typedef tvec3<bool, aligned_mediump> aligned_mediump_bvec3;
|
typedef vec<3, bool, aligned_mediump> aligned_mediump_bvec3;
|
||||||
|
|
||||||
/// 3 components vector of low precision bool numbers.
|
/// 3 components vector of low precision bool numbers.
|
||||||
typedef tvec3<bool, aligned_lowp> aligned_lowp_bvec3;
|
typedef vec<3, bool, aligned_lowp> aligned_lowp_bvec3;
|
||||||
|
|
||||||
// -- *vec4 --
|
// -- *vec4 --
|
||||||
|
|
||||||
/// 4 components vector of high single-precision floating-point numbers.
|
/// 4 components vector of high single-precision floating-point numbers.
|
||||||
typedef tvec4<float, aligned_highp> aligned_highp_vec4;
|
typedef vec<4, float, aligned_highp> aligned_highp_vec4;
|
||||||
|
|
||||||
/// 4 components vector of medium single-precision floating-point numbers.
|
/// 4 components vector of medium single-precision floating-point numbers.
|
||||||
typedef tvec4<float, aligned_mediump> aligned_mediump_vec4;
|
typedef vec<4, float, aligned_mediump> aligned_mediump_vec4;
|
||||||
|
|
||||||
/// 4 components vector of low single-precision floating-point numbers.
|
/// 4 components vector of low single-precision floating-point numbers.
|
||||||
typedef tvec4<float, aligned_lowp> aligned_lowp_vec4;
|
typedef vec<4, float, aligned_lowp> aligned_lowp_vec4;
|
||||||
|
|
||||||
/// 4 components vector of high double-precision floating-point numbers.
|
/// 4 components vector of high double-precision floating-point numbers.
|
||||||
typedef tvec4<double, aligned_highp> aligned_highp_dvec4;
|
typedef vec<4, double, aligned_highp> aligned_highp_dvec4;
|
||||||
|
|
||||||
/// 4 components vector of medium double-precision floating-point numbers.
|
/// 4 components vector of medium double-precision floating-point numbers.
|
||||||
typedef tvec4<double, aligned_mediump> aligned_mediump_dvec4;
|
typedef vec<4, double, aligned_mediump> aligned_mediump_dvec4;
|
||||||
|
|
||||||
/// 4 components vector of low double-precision floating-point numbers.
|
/// 4 components vector of low double-precision floating-point numbers.
|
||||||
typedef tvec4<double, aligned_lowp> aligned_lowp_dvec4;
|
typedef vec<4, double, aligned_lowp> aligned_lowp_dvec4;
|
||||||
|
|
||||||
/// 4 components vector of high precision signed integer numbers.
|
/// 4 components vector of high precision signed integer numbers.
|
||||||
typedef tvec4<int, aligned_highp> aligned_highp_ivec4;
|
typedef vec<4, int, aligned_highp> aligned_highp_ivec4;
|
||||||
|
|
||||||
/// 4 components vector of medium precision signed integer numbers.
|
/// 4 components vector of medium precision signed integer numbers.
|
||||||
typedef tvec4<int, aligned_mediump> aligned_mediump_ivec4;
|
typedef vec<4, int, aligned_mediump> aligned_mediump_ivec4;
|
||||||
|
|
||||||
/// 4 components vector of low precision signed integer numbers.
|
/// 4 components vector of low precision signed integer numbers.
|
||||||
typedef tvec4<int, aligned_lowp> aligned_lowp_ivec4;
|
typedef vec<4, int, aligned_lowp> aligned_lowp_ivec4;
|
||||||
|
|
||||||
/// 4 components vector of high precision unsigned integer numbers.
|
/// 4 components vector of high precision unsigned integer numbers.
|
||||||
typedef tvec4<uint, aligned_highp> aligned_highp_uvec4;
|
typedef vec<4, uint, aligned_highp> aligned_highp_uvec4;
|
||||||
|
|
||||||
/// 4 components vector of medium precision unsigned integer numbers.
|
/// 4 components vector of medium precision unsigned integer numbers.
|
||||||
typedef tvec4<uint, aligned_mediump> aligned_mediump_uvec4;
|
typedef vec<4, uint, aligned_mediump> aligned_mediump_uvec4;
|
||||||
|
|
||||||
/// 4 components vector of low precision unsigned integer numbers.
|
/// 4 components vector of low precision unsigned integer numbers.
|
||||||
typedef tvec4<uint, aligned_lowp> aligned_lowp_uvec4;
|
typedef vec<4, uint, aligned_lowp> aligned_lowp_uvec4;
|
||||||
|
|
||||||
/// 4 components vector of high precision bool numbers.
|
/// 4 components vector of high precision bool numbers.
|
||||||
typedef tvec4<bool, aligned_highp> aligned_highp_bvec4;
|
typedef vec<4, bool, aligned_highp> aligned_highp_bvec4;
|
||||||
|
|
||||||
/// 4 components vector of medium precision bool numbers.
|
/// 4 components vector of medium precision bool numbers.
|
||||||
typedef tvec4<bool, aligned_mediump> aligned_mediump_bvec4;
|
typedef vec<4, bool, aligned_mediump> aligned_mediump_bvec4;
|
||||||
|
|
||||||
/// 4 components vector of low precision bool numbers.
|
/// 4 components vector of low precision bool numbers.
|
||||||
typedef tvec4<bool, aligned_lowp> aligned_lowp_bvec4;
|
typedef vec<4, bool, aligned_lowp> aligned_lowp_bvec4;
|
||||||
|
|
||||||
// -- default --
|
// -- default --
|
||||||
|
|
||||||
|
@ -247,70 +247,70 @@ namespace glm
|
|||||||
|
|
||||||
/// 8 bit signed integer scalar type.
|
/// 8 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i8, defaultp> i8vec1;
|
typedef vec<1, i8, defaultp> i8vec1;
|
||||||
|
|
||||||
/// 8 bit signed integer vector of 2 components type.
|
/// 8 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i8, defaultp> i8vec2;
|
typedef vec<2, i8, defaultp> i8vec2;
|
||||||
|
|
||||||
/// 8 bit signed integer vector of 3 components type.
|
/// 8 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i8, defaultp> i8vec3;
|
typedef vec<3, i8, defaultp> i8vec3;
|
||||||
|
|
||||||
/// 8 bit signed integer vector of 4 components type.
|
/// 8 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i8, defaultp> i8vec4;
|
typedef vec<4, i8, defaultp> i8vec4;
|
||||||
|
|
||||||
|
|
||||||
/// 16 bit signed integer scalar type.
|
/// 16 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i16, defaultp> i16vec1;
|
typedef vec<1, i16, defaultp> i16vec1;
|
||||||
|
|
||||||
/// 16 bit signed integer vector of 2 components type.
|
/// 16 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i16, defaultp> i16vec2;
|
typedef vec<2, i16, defaultp> i16vec2;
|
||||||
|
|
||||||
/// 16 bit signed integer vector of 3 components type.
|
/// 16 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i16, defaultp> i16vec3;
|
typedef vec<3, i16, defaultp> i16vec3;
|
||||||
|
|
||||||
/// 16 bit signed integer vector of 4 components type.
|
/// 16 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i16, defaultp> i16vec4;
|
typedef vec<4, i16, defaultp> i16vec4;
|
||||||
|
|
||||||
|
|
||||||
/// 32 bit signed integer scalar type.
|
/// 32 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i32, defaultp> i32vec1;
|
typedef vec<1, i32, defaultp> i32vec1;
|
||||||
|
|
||||||
/// 32 bit signed integer vector of 2 components type.
|
/// 32 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i32, defaultp> i32vec2;
|
typedef vec<2, i32, defaultp> i32vec2;
|
||||||
|
|
||||||
/// 32 bit signed integer vector of 3 components type.
|
/// 32 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i32, defaultp> i32vec3;
|
typedef vec<3, i32, defaultp> i32vec3;
|
||||||
|
|
||||||
/// 32 bit signed integer vector of 4 components type.
|
/// 32 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i32, defaultp> i32vec4;
|
typedef vec<4, i32, defaultp> i32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// 64 bit signed integer scalar type.
|
/// 64 bit signed integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<i64, defaultp> i64vec1;
|
typedef vec<1, i64, defaultp> i64vec1;
|
||||||
|
|
||||||
/// 64 bit signed integer vector of 2 components type.
|
/// 64 bit signed integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<i64, defaultp> i64vec2;
|
typedef vec<2, i64, defaultp> i64vec2;
|
||||||
|
|
||||||
/// 64 bit signed integer vector of 3 components type.
|
/// 64 bit signed integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<i64, defaultp> i64vec3;
|
typedef vec<3, i64, defaultp> i64vec3;
|
||||||
|
|
||||||
/// 64 bit signed integer vector of 4 components type.
|
/// 64 bit signed integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<i64, defaultp> i64vec4;
|
typedef vec<4, i64, defaultp> i64vec4;
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
@ -519,70 +519,70 @@ namespace glm
|
|||||||
|
|
||||||
/// Default precision 8 bit unsigned integer scalar type.
|
/// Default precision 8 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u8, defaultp> u8vec1;
|
typedef vec<1, u8, defaultp> u8vec1;
|
||||||
|
|
||||||
/// Default precision 8 bit unsigned integer vector of 2 components type.
|
/// Default precision 8 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u8, defaultp> u8vec2;
|
typedef vec<2, u8, defaultp> u8vec2;
|
||||||
|
|
||||||
/// Default precision 8 bit unsigned integer vector of 3 components type.
|
/// Default precision 8 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u8, defaultp> u8vec3;
|
typedef vec<3, u8, defaultp> u8vec3;
|
||||||
|
|
||||||
/// Default precision 8 bit unsigned integer vector of 4 components type.
|
/// Default precision 8 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u8, defaultp> u8vec4;
|
typedef vec<4, u8, defaultp> u8vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Default precision 16 bit unsigned integer scalar type.
|
/// Default precision 16 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u16, defaultp> u16vec1;
|
typedef vec<1, u16, defaultp> u16vec1;
|
||||||
|
|
||||||
/// Default precision 16 bit unsigned integer vector of 2 components type.
|
/// Default precision 16 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u16, defaultp> u16vec2;
|
typedef vec<2, u16, defaultp> u16vec2;
|
||||||
|
|
||||||
/// Default precision 16 bit unsigned integer vector of 3 components type.
|
/// Default precision 16 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u16, defaultp> u16vec3;
|
typedef vec<3, u16, defaultp> u16vec3;
|
||||||
|
|
||||||
/// Default precision 16 bit unsigned integer vector of 4 components type.
|
/// Default precision 16 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u16, defaultp> u16vec4;
|
typedef vec<4, u16, defaultp> u16vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Default precision 32 bit unsigned integer scalar type.
|
/// Default precision 32 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u32, defaultp> u32vec1;
|
typedef vec<1, u32, defaultp> u32vec1;
|
||||||
|
|
||||||
/// Default precision 32 bit unsigned integer vector of 2 components type.
|
/// Default precision 32 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u32, defaultp> u32vec2;
|
typedef vec<2, u32, defaultp> u32vec2;
|
||||||
|
|
||||||
/// Default precision 32 bit unsigned integer vector of 3 components type.
|
/// Default precision 32 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u32, defaultp> u32vec3;
|
typedef vec<3, u32, defaultp> u32vec3;
|
||||||
|
|
||||||
/// Default precision 32 bit unsigned integer vector of 4 components type.
|
/// Default precision 32 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u32, defaultp> u32vec4;
|
typedef vec<4, u32, defaultp> u32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Default precision 64 bit unsigned integer scalar type.
|
/// Default precision 64 bit unsigned integer scalar type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<u64, defaultp> u64vec1;
|
typedef vec<1, u64, defaultp> u64vec1;
|
||||||
|
|
||||||
/// Default precision 64 bit unsigned integer vector of 2 components type.
|
/// Default precision 64 bit unsigned integer vector of 2 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<u64, defaultp> u64vec2;
|
typedef vec<2, u64, defaultp> u64vec2;
|
||||||
|
|
||||||
/// Default precision 64 bit unsigned integer vector of 3 components type.
|
/// Default precision 64 bit unsigned integer vector of 3 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<u64, defaultp> u64vec3;
|
typedef vec<3, u64, defaultp> u64vec3;
|
||||||
|
|
||||||
/// Default precision 64 bit unsigned integer vector of 4 components type.
|
/// Default precision 64 bit unsigned integer vector of 4 components type.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<u64, defaultp> u64vec4;
|
typedef vec<4, u64, defaultp> u64vec4;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////
|
//////////////////////
|
||||||
@ -617,53 +617,53 @@ namespace glm
|
|||||||
|
|
||||||
/// Single-precision floating-point vector of 1 component.
|
/// Single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<float, defaultp> fvec1;
|
typedef vec<1, float, defaultp> fvec1;
|
||||||
|
|
||||||
/// Single-precision floating-point vector of 2 components.
|
/// Single-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<float, defaultp> fvec2;
|
typedef vec<2, float, defaultp> fvec2;
|
||||||
|
|
||||||
/// Single-precision floating-point vector of 3 components.
|
/// Single-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<float, defaultp> fvec3;
|
typedef vec<3, float, defaultp> fvec3;
|
||||||
|
|
||||||
/// Single-precision floating-point vector of 4 components.
|
/// Single-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<float, defaultp> fvec4;
|
typedef vec<4, float, defaultp> fvec4;
|
||||||
|
|
||||||
|
|
||||||
/// Single-precision floating-point vector of 1 component.
|
/// Single-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f32, defaultp> f32vec1;
|
typedef vec<1, f32, defaultp> f32vec1;
|
||||||
|
|
||||||
/// Single-precision floating-point vector of 2 components.
|
/// Single-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<f32, defaultp> f32vec2;
|
typedef vec<2, f32, defaultp> f32vec2;
|
||||||
|
|
||||||
/// Single-precision floating-point vector of 3 components.
|
/// Single-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<f32, defaultp> f32vec3;
|
typedef vec<3, f32, defaultp> f32vec3;
|
||||||
|
|
||||||
/// Single-precision floating-point vector of 4 components.
|
/// Single-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<f32, defaultp> f32vec4;
|
typedef vec<4, f32, defaultp> f32vec4;
|
||||||
|
|
||||||
|
|
||||||
/// Double-precision floating-point vector of 1 component.
|
/// Double-precision floating-point vector of 1 component.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec1<f64, defaultp> f64vec1;
|
typedef vec<1, f64, defaultp> f64vec1;
|
||||||
|
|
||||||
/// Double-precision floating-point vector of 2 components.
|
/// Double-precision floating-point vector of 2 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec2<f64, defaultp> f64vec2;
|
typedef vec<2, f64, defaultp> f64vec2;
|
||||||
|
|
||||||
/// Double-precision floating-point vector of 3 components.
|
/// Double-precision floating-point vector of 3 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec3<f64, defaultp> f64vec3;
|
typedef vec<3, f64, defaultp> f64vec3;
|
||||||
|
|
||||||
/// Double-precision floating-point vector of 4 components.
|
/// Double-precision floating-point vector of 4 components.
|
||||||
/// @see gtc_type_precision
|
/// @see gtc_type_precision
|
||||||
typedef tvec4<f64, defaultp> f64vec4;
|
typedef vec<4, f64, defaultp> f64vec4;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////
|
//////////////////////
|
||||||
|
@ -65,17 +65,17 @@ namespace glm
|
|||||||
/// Build a vector from a pointer.
|
/// Build a vector from a pointer.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T>
|
template<typename T>
|
||||||
GLM_FUNC_DECL tvec2<T, defaultp> make_vec2(T const * const ptr);
|
GLM_FUNC_DECL vec<2, T, defaultp> make_vec2(T const * const ptr);
|
||||||
|
|
||||||
/// Build a vector from a pointer.
|
/// Build a vector from a pointer.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T>
|
template<typename T>
|
||||||
GLM_FUNC_DECL tvec3<T, defaultp> make_vec3(T const * const ptr);
|
GLM_FUNC_DECL vec<3, T, defaultp> make_vec3(T const * const ptr);
|
||||||
|
|
||||||
/// Build a vector from a pointer.
|
/// Build a vector from a pointer.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template<typename T>
|
template<typename T>
|
||||||
GLM_FUNC_DECL tvec4<T, defaultp> make_vec4(T const * const ptr);
|
GLM_FUNC_DECL vec<4, T, defaultp> make_vec4(T const * const ptr);
|
||||||
|
|
||||||
/// Build a matrix from a pointer.
|
/// Build a matrix from a pointer.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
|
@ -13,7 +13,7 @@ namespace glm
|
|||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T const * value_ptr
|
GLM_FUNC_QUALIFIER T const * value_ptr
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & vec
|
vec<2, T, P> const & vec
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(vec.x);
|
return &(vec.x);
|
||||||
@ -24,7 +24,7 @@ namespace glm
|
|||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr
|
GLM_FUNC_QUALIFIER T * value_ptr
|
||||||
(
|
(
|
||||||
tvec2<T, P> & vec
|
vec<2, T, P> & vec
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(vec.x);
|
return &(vec.x);
|
||||||
@ -35,7 +35,7 @@ namespace glm
|
|||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T const * value_ptr
|
GLM_FUNC_QUALIFIER T const * value_ptr
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & vec
|
vec<3, T, P> const & vec
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(vec.x);
|
return &(vec.x);
|
||||||
@ -46,7 +46,7 @@ namespace glm
|
|||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr
|
GLM_FUNC_QUALIFIER T * value_ptr
|
||||||
(
|
(
|
||||||
tvec3<T, P> & vec
|
vec<3, T, P> & vec
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(vec.x);
|
return &(vec.x);
|
||||||
@ -57,7 +57,7 @@ namespace glm
|
|||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T const * value_ptr
|
GLM_FUNC_QUALIFIER T const * value_ptr
|
||||||
(
|
(
|
||||||
tvec4<T, P> const & vec
|
vec<4, T, P> const & vec
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(vec.x);
|
return &(vec.x);
|
||||||
@ -68,7 +68,7 @@ namespace glm
|
|||||||
template<typename T, precision P>
|
template<typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T * value_ptr
|
GLM_FUNC_QUALIFIER T * value_ptr
|
||||||
(
|
(
|
||||||
tvec4<T, P> & vec
|
vec<4, T, P> & vec
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return &(vec.x);
|
return &(vec.x);
|
||||||
@ -294,30 +294,30 @@ namespace glm
|
|||||||
/// Build a vector from a pointer.
|
/// Build a vector from a pointer.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, defaultp> make_vec2(T const * const ptr)
|
GLM_FUNC_QUALIFIER vec<2, T, defaultp> make_vec2(T const * const ptr)
|
||||||
{
|
{
|
||||||
tvec2<T, defaultp> Result;
|
vec<2, T, defaultp> Result;
|
||||||
memcpy(value_ptr(Result), ptr, sizeof(tvec2<T, defaultp>));
|
memcpy(value_ptr(Result), ptr, sizeof(vec<2, T, defaultp>));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build a vector from a pointer.
|
/// Build a vector from a pointer.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, defaultp> make_vec3(T const * const ptr)
|
GLM_FUNC_QUALIFIER vec<3, T, defaultp> make_vec3(T const * const ptr)
|
||||||
{
|
{
|
||||||
tvec3<T, defaultp> Result;
|
vec<3, T, defaultp> Result;
|
||||||
memcpy(value_ptr(Result), ptr, sizeof(tvec3<T, defaultp>));
|
memcpy(value_ptr(Result), ptr, sizeof(vec<3, T, defaultp>));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build a vector from a pointer.
|
/// Build a vector from a pointer.
|
||||||
/// @see gtc_type_ptr
|
/// @see gtc_type_ptr
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, defaultp> make_vec4(T const * const ptr)
|
GLM_FUNC_QUALIFIER vec<4, T, defaultp> make_vec4(T const * const ptr)
|
||||||
{
|
{
|
||||||
tvec4<T, defaultp> Result;
|
vec<4, T, defaultp> Result;
|
||||||
memcpy(value_ptr(Result), ptr, sizeof(tvec4<T, defaultp>));
|
memcpy(value_ptr(Result), ptr, sizeof(vec<4, T, defaultp>));
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace glm
|
|||||||
/// Minimum comparison between 2 variables and returns 2 associated variable values
|
/// Minimum comparison between 2 variables and returns 2 associated variable values
|
||||||
/// @see gtx_associated_min_max
|
/// @see gtx_associated_min_max
|
||||||
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
||||||
GLM_FUNC_DECL tvec2<U, P> associatedMin(
|
GLM_FUNC_DECL vec<2, U, P> associatedMin(
|
||||||
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
||||||
vecType<D, T, P> const & y, vecType<D, U, P> const & b);
|
vecType<D, T, P> const & y, vecType<D, U, P> const & b);
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ namespace glm
|
|||||||
/// Maximum comparison between 2 variables and returns 2 associated variable values
|
/// Maximum comparison between 2 variables and returns 2 associated variable values
|
||||||
/// @see gtx_associated_min_max
|
/// @see gtx_associated_min_max
|
||||||
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
||||||
GLM_FUNC_DECL tvec2<U, P> associatedMax(
|
GLM_FUNC_DECL vec<2, U, P> associatedMax(
|
||||||
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
||||||
vecType<D, T, P> const & y, vecType<D, U, P> const & b);
|
vecType<D, T, P> const & y, vecType<D, U, P> const & b);
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
||||||
GLM_FUNC_QUALIFIER tvec2<U, P> associatedMin
|
GLM_FUNC_QUALIFIER vec<2, U, P> associatedMin
|
||||||
(
|
(
|
||||||
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
||||||
vecType<D, T, P> const & y, vecType<D, U, P> const & b
|
vecType<D, T, P> const & y, vecType<D, U, P> const & b
|
||||||
@ -170,7 +170,7 @@ GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)
|
|||||||
|
|
||||||
// Max comparison between 2 variables
|
// Max comparison between 2 variables
|
||||||
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
template<int D, typename T, typename U, precision P, template <int, typename, precision> class vecType>
|
||||||
GLM_FUNC_QUALIFIER tvec2<U, P> associatedMax
|
GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax
|
||||||
(
|
(
|
||||||
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
vecType<D, T, P> const & x, vecType<D, U, P> const & a,
|
||||||
vecType<D, T, P> const & y, vecType<D, U, P> const & b
|
vecType<D, T, P> const & y, vecType<D, U, P> const & b
|
||||||
|
@ -31,17 +31,17 @@ namespace glm
|
|||||||
/// Find the point on a straight line which is the closet of a point.
|
/// Find the point on a straight line which is the closet of a point.
|
||||||
/// @see gtx_closest_point
|
/// @see gtx_closest_point
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> closestPointOnLine(
|
GLM_FUNC_DECL vec<3, T, P> closestPointOnLine(
|
||||||
tvec3<T, P> const & point,
|
vec<3, T, P> const & point,
|
||||||
tvec3<T, P> const & a,
|
vec<3, T, P> const & a,
|
||||||
tvec3<T, P> const & b);
|
vec<3, T, P> const & b);
|
||||||
|
|
||||||
/// 2d lines work as well
|
/// 2d lines work as well
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec2<T, P> closestPointOnLine(
|
GLM_FUNC_DECL vec<2, T, P> closestPointOnLine(
|
||||||
tvec2<T, P> const & point,
|
vec<2, T, P> const & point,
|
||||||
tvec2<T, P> const & a,
|
vec<2, T, P> const & a,
|
||||||
tvec2<T, P> const & b);
|
vec<2, T, P> const & b);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
@ -4,16 +4,16 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> closestPointOnLine
|
GLM_FUNC_QUALIFIER vec<3, T, P> closestPointOnLine
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & point,
|
vec<3, T, P> const & point,
|
||||||
tvec3<T, P> const & a,
|
vec<3, T, P> const & a,
|
||||||
tvec3<T, P> const & b
|
vec<3, T, P> const & b
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
T LineLength = distance(a, b);
|
T LineLength = distance(a, b);
|
||||||
tvec3<T, P> Vector = point - a;
|
vec<3, T, P> Vector = point - a;
|
||||||
tvec3<T, P> LineDirection = (b - a) / LineLength;
|
vec<3, T, P> LineDirection = (b - a) / LineLength;
|
||||||
|
|
||||||
// Project Vector to LineDirection to get the distance of point from a
|
// Project Vector to LineDirection to get the distance of point from a
|
||||||
T Distance = dot(Vector, LineDirection);
|
T Distance = dot(Vector, LineDirection);
|
||||||
@ -24,16 +24,16 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> closestPointOnLine
|
GLM_FUNC_QUALIFIER vec<2, T, P> closestPointOnLine
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & point,
|
vec<2, T, P> const & point,
|
||||||
tvec2<T, P> const & a,
|
vec<2, T, P> const & a,
|
||||||
tvec2<T, P> const & b
|
vec<2, T, P> const & b
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
T LineLength = distance(a, b);
|
T LineLength = distance(a, b);
|
||||||
tvec2<T, P> Vector = point - a;
|
vec<2, T, P> Vector = point - a;
|
||||||
tvec2<T, P> LineDirection = (b - a) / LineLength;
|
vec<2, T, P> LineDirection = (b - a) / LineLength;
|
||||||
|
|
||||||
// Project Vector to LineDirection to get the distance of point from a
|
// Project Vector to LineDirection to get the distance of point from a
|
||||||
T Distance = dot(Vector, LineDirection);
|
T Distance = dot(Vector, LineDirection);
|
||||||
|
@ -30,19 +30,19 @@ namespace glm
|
|||||||
|
|
||||||
/// Convert a linear sRGB color to D65 YUV.
|
/// Convert a linear sRGB color to D65 YUV.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> convertLinearSRGBToD65XYZ(tvec3<T, P> const& ColorLinearSRGB);
|
GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB);
|
||||||
|
|
||||||
/// Convert a linear sRGB color to D50 YUV.
|
/// Convert a linear sRGB color to D50 YUV.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> convertLinearSRGBToD50XYZ(tvec3<T, P> const& ColorLinearSRGB);
|
GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB);
|
||||||
|
|
||||||
/// Convert a D65 YUV color to linear sRGB.
|
/// Convert a D65 YUV color to linear sRGB.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> convertD65XYZToLinearSRGB(tvec3<T, P> const& ColorD65XYZ);
|
GLM_FUNC_DECL vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ);
|
||||||
|
|
||||||
/// Convert a D65 YUV color to D50 YUV.
|
/// Convert a D65 YUV color to D50 YUV.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> convertD65XYZToD50XYZ(tvec3<T, P> const& ColorD65XYZ);
|
GLM_FUNC_DECL vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
} //namespace glm
|
} //namespace glm
|
||||||
|
@ -4,41 +4,41 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> convertLinearSRGBToD65XYZ(tvec3<T, P> const& ColorLinearSRGB)
|
GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const M(0.490f, 0.17697f, 0.2f);
|
vec<3, T, P> const M(0.490f, 0.17697f, 0.2f);
|
||||||
tvec3<T, P> const N(0.31f, 0.8124f, 0.01063f);
|
vec<3, T, P> const N(0.31f, 0.8124f, 0.01063f);
|
||||||
tvec3<T, P> const O(0.490f, 0.01f, 0.99f);
|
vec<3, T, P> const O(0.490f, 0.01f, 0.99f);
|
||||||
|
|
||||||
return (M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB) * static_cast<T>(5.650675255693055f);
|
return (M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB) * static_cast<T>(5.650675255693055f);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> convertLinearSRGBToD50XYZ(tvec3<T, P> const& ColorLinearSRGB)
|
GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const M(0.436030342570117f, 0.222438466210245f, 0.013897440074263f);
|
vec<3, T, P> const M(0.436030342570117f, 0.222438466210245f, 0.013897440074263f);
|
||||||
tvec3<T, P> const N(0.385101860087134f, 0.716942745571917f, 0.097076381494207f);
|
vec<3, T, P> const N(0.385101860087134f, 0.716942745571917f, 0.097076381494207f);
|
||||||
tvec3<T, P> const O(0.143067806654203f, 0.060618777416563f, 0.713926257896652f);
|
vec<3, T, P> const O(0.143067806654203f, 0.060618777416563f, 0.713926257896652f);
|
||||||
|
|
||||||
return M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB;
|
return M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> convertD65XYZToLinearSRGB(tvec3<T, P> const& ColorD65XYZ)
|
GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const M(0.41847f, -0.091169f, 0.0009209f);
|
vec<3, T, P> const M(0.41847f, -0.091169f, 0.0009209f);
|
||||||
tvec3<T, P> const N(-0.15866f, 0.25243f, 0.015708f);
|
vec<3, T, P> const N(-0.15866f, 0.25243f, 0.015708f);
|
||||||
tvec3<T, P> const O(0.0009209f, -0.0025498f, 0.1786f);
|
vec<3, T, P> const O(0.0009209f, -0.0025498f, 0.1786f);
|
||||||
|
|
||||||
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
|
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> convertD65XYZToD50XYZ(tvec3<T, P> const& ColorD65XYZ)
|
GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const M(+1.047844353856414f, +0.029549007606644f, -0.009250984365223f);
|
vec<3, T, P> const M(+1.047844353856414f, +0.029549007606644f, -0.009250984365223f);
|
||||||
tvec3<T, P> const N(+0.022898981050086f, +0.990508028941971f, +0.015072338237051f);
|
vec<3, T, P> const N(+0.022898981050086f, +0.990508028941971f, +0.015072338237051f);
|
||||||
tvec3<T, P> const O(-0.050206647741605f, -0.017074711360960f, +0.751717835079977f);
|
vec<3, T, P> const O(-0.050206647741605f, -0.017074711360960f, +0.751717835079977f);
|
||||||
|
|
||||||
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
|
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
|
||||||
}
|
}
|
||||||
|
@ -31,14 +31,14 @@ namespace glm
|
|||||||
/// Converts a color from HSV color space to its color in RGB color space.
|
/// Converts a color from HSV color space to its color in RGB color space.
|
||||||
/// @see gtx_color_space
|
/// @see gtx_color_space
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> rgbColor(
|
GLM_FUNC_DECL vec<3, T, P> rgbColor(
|
||||||
tvec3<T, P> const & hsvValue);
|
vec<3, T, P> const & hsvValue);
|
||||||
|
|
||||||
/// Converts a color from RGB color space to its color in HSV color space.
|
/// Converts a color from RGB color space to its color in HSV color space.
|
||||||
/// @see gtx_color_space
|
/// @see gtx_color_space
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> hsvColor(
|
GLM_FUNC_DECL vec<3, T, P> hsvColor(
|
||||||
tvec3<T, P> const & rgbValue);
|
vec<3, T, P> const & rgbValue);
|
||||||
|
|
||||||
/// Build a saturation matrix.
|
/// Build a saturation matrix.
|
||||||
/// @see gtx_color_space
|
/// @see gtx_color_space
|
||||||
@ -49,22 +49,22 @@ namespace glm
|
|||||||
/// Modify the saturation of a color.
|
/// Modify the saturation of a color.
|
||||||
/// @see gtx_color_space
|
/// @see gtx_color_space
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> saturation(
|
GLM_FUNC_DECL vec<3, T, P> saturation(
|
||||||
T const s,
|
T const s,
|
||||||
tvec3<T, P> const & color);
|
vec<3, T, P> const & color);
|
||||||
|
|
||||||
/// Modify the saturation of a color.
|
/// Modify the saturation of a color.
|
||||||
/// @see gtx_color_space
|
/// @see gtx_color_space
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<T, P> saturation(
|
GLM_FUNC_DECL vec<4, T, P> saturation(
|
||||||
T const s,
|
T const s,
|
||||||
tvec4<T, P> const & color);
|
vec<4, T, P> const & color);
|
||||||
|
|
||||||
/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
|
/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
|
||||||
/// @see gtx_color_space
|
/// @see gtx_color_space
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL T luminosity(
|
GLM_FUNC_DECL T luminosity(
|
||||||
tvec3<T, P> const & color);
|
vec<3, T, P> const & color);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> rgbColor(const tvec3<T, P>& hsvColor)
|
GLM_FUNC_QUALIFIER vec<3, T, P> rgbColor(const vec<3, T, P>& hsvColor)
|
||||||
{
|
{
|
||||||
tvec3<T, P> hsv = hsvColor;
|
vec<3, T, P> hsv = hsvColor;
|
||||||
tvec3<T, P> rgbColor;
|
vec<3, T, P> rgbColor;
|
||||||
|
|
||||||
if(hsv.y == static_cast<T>(0))
|
if(hsv.y == static_cast<T>(0))
|
||||||
// achromatic (grey)
|
// achromatic (grey)
|
||||||
rgbColor = tvec3<T, P>(hsv.z);
|
rgbColor = vec<3, T, P>(hsv.z);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
T sector = floor(hsv.x * (T(1) / T(60)));
|
T sector = floor(hsv.x * (T(1) / T(60)));
|
||||||
@ -61,9 +61,9 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> hsvColor(const tvec3<T, P>& rgbColor)
|
GLM_FUNC_QUALIFIER vec<3, T, P> hsvColor(const vec<3, T, P>& rgbColor)
|
||||||
{
|
{
|
||||||
tvec3<T, P> hsv = rgbColor;
|
vec<3, T, P> hsv = rgbColor;
|
||||||
float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
|
float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b);
|
||||||
float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
|
float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
|
||||||
float Delta = Max - Min;
|
float Delta = Max - Min;
|
||||||
@ -103,7 +103,7 @@ namespace glm
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> saturation(T const s)
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> saturation(T const s)
|
||||||
{
|
{
|
||||||
tvec3<T, defaultp> rgbw = tvec3<T, defaultp>(T(0.2126), T(0.7152), T(0.0722));
|
vec<3, T, defaultp> rgbw = vec<3, T, defaultp>(T(0.2126), T(0.7152), T(0.0722));
|
||||||
|
|
||||||
T col0 = (T(1) - s) * rgbw.r;
|
T col0 = (T(1) - s) * rgbw.r;
|
||||||
T col1 = (T(1) - s) * rgbw.g;
|
T col1 = (T(1) - s) * rgbw.g;
|
||||||
@ -123,21 +123,21 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> saturation(const T s, const tvec3<T, P>& color)
|
GLM_FUNC_QUALIFIER vec<3, T, P> saturation(const T s, const vec<3, T, P>& color)
|
||||||
{
|
{
|
||||||
return tvec3<T, P>(saturation(s) * tvec4<T, P>(color, T(0)));
|
return vec<3, T, P>(saturation(s) * vec<4, T, P>(color, T(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> saturation(const T s, const tvec4<T, P>& color)
|
GLM_FUNC_QUALIFIER vec<4, T, P> saturation(const T s, const vec<4, T, P>& color)
|
||||||
{
|
{
|
||||||
return saturation(s) * color;
|
return saturation(s) * color;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T luminosity(const tvec3<T, P>& color)
|
GLM_FUNC_QUALIFIER T luminosity(const vec<3, T, P>& color)
|
||||||
{
|
{
|
||||||
const tvec3<T, P> tmp = tvec3<T, P>(0.33, 0.59, 0.11);
|
const vec<3, T, P> tmp = vec<3, T, P>(0.33, 0.59, 0.11);
|
||||||
return dot(color, tmp);
|
return dot(color, tmp);
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -31,28 +31,28 @@ namespace glm
|
|||||||
/// Convert a color from RGB color space to YCoCg color space.
|
/// Convert a color from RGB color space to YCoCg color space.
|
||||||
/// @see gtx_color_space_YCoCg
|
/// @see gtx_color_space_YCoCg
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> rgb2YCoCg(
|
GLM_FUNC_DECL vec<3, T, P> rgb2YCoCg(
|
||||||
tvec3<T, P> const & rgbColor);
|
vec<3, T, P> const & rgbColor);
|
||||||
|
|
||||||
/// Convert a color from YCoCg color space to RGB color space.
|
/// Convert a color from YCoCg color space to RGB color space.
|
||||||
/// @see gtx_color_space_YCoCg
|
/// @see gtx_color_space_YCoCg
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> YCoCg2rgb(
|
GLM_FUNC_DECL vec<3, T, P> YCoCg2rgb(
|
||||||
tvec3<T, P> const & YCoCgColor);
|
vec<3, T, P> const & YCoCgColor);
|
||||||
|
|
||||||
/// Convert a color from RGB color space to YCoCgR color space.
|
/// Convert a color from RGB color space to YCoCgR color space.
|
||||||
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||||
/// @see gtx_color_space_YCoCg
|
/// @see gtx_color_space_YCoCg
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> rgb2YCoCgR(
|
GLM_FUNC_DECL vec<3, T, P> rgb2YCoCgR(
|
||||||
tvec3<T, P> const & rgbColor);
|
vec<3, T, P> const & rgbColor);
|
||||||
|
|
||||||
/// Convert a color from YCoCgR color space to RGB color space.
|
/// Convert a color from YCoCgR color space to RGB color space.
|
||||||
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
/// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
|
||||||
/// @see gtx_color_space_YCoCg
|
/// @see gtx_color_space_YCoCg
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> YCoCgR2rgb(
|
GLM_FUNC_DECL vec<3, T, P> YCoCgR2rgb(
|
||||||
tvec3<T, P> const & YCoCgColor);
|
vec<3, T, P> const & YCoCgColor);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCg
|
GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCg
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & rgbColor
|
vec<3, T, P> const & rgbColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> result;
|
vec<3, T, P> result;
|
||||||
result.x/*Y */ = rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4);
|
result.x/*Y */ = rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4);
|
||||||
result.y/*Co*/ = rgbColor.r / T(2) + rgbColor.g * T(0) - rgbColor.b / T(2);
|
result.y/*Co*/ = rgbColor.r / T(2) + rgbColor.g * T(0) - rgbColor.b / T(2);
|
||||||
result.z/*Cg*/ = - rgbColor.r / T(4) + rgbColor.g / T(2) - rgbColor.b / T(4);
|
result.z/*Cg*/ = - rgbColor.r / T(4) + rgbColor.g / T(2) - rgbColor.b / T(4);
|
||||||
@ -17,12 +17,12 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> YCoCg2rgb
|
GLM_FUNC_QUALIFIER vec<3, T, P> YCoCg2rgb
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & YCoCgColor
|
vec<3, T, P> const & YCoCgColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> result;
|
vec<3, T, P> result;
|
||||||
result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z;
|
result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z;
|
||||||
result.g = YCoCgColor.x + YCoCgColor.z;
|
result.g = YCoCgColor.x + YCoCgColor.z;
|
||||||
result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z;
|
result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z;
|
||||||
@ -32,24 +32,24 @@ namespace glm
|
|||||||
template <typename T, precision P, bool isInteger>
|
template <typename T, precision P, bool isInteger>
|
||||||
class compute_YCoCgR {
|
class compute_YCoCgR {
|
||||||
public:
|
public:
|
||||||
static GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR
|
static GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & rgbColor
|
vec<3, T, P> const & rgbColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> result;
|
vec<3, T, P> result;
|
||||||
result.x/*Y */ = rgbColor.g * static_cast<T>(0.5) + (rgbColor.r + rgbColor.b) * static_cast<T>(0.25);
|
result.x/*Y */ = rgbColor.g * static_cast<T>(0.5) + (rgbColor.r + rgbColor.b) * static_cast<T>(0.25);
|
||||||
result.y/*Co*/ = rgbColor.r - rgbColor.b;
|
result.y/*Co*/ = rgbColor.r - rgbColor.b;
|
||||||
result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) * static_cast<T>(0.5);
|
result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) * static_cast<T>(0.5);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb
|
static GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & YCoCgRColor
|
vec<3, T, P> const & YCoCgRColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> result;
|
vec<3, T, P> result;
|
||||||
T tmp = YCoCgRColor.x - (YCoCgRColor.z * static_cast<T>(0.5));
|
T tmp = YCoCgRColor.x - (YCoCgRColor.z * static_cast<T>(0.5));
|
||||||
result.g = YCoCgRColor.z + tmp;
|
result.g = YCoCgRColor.z + tmp;
|
||||||
result.b = tmp - (YCoCgRColor.y * static_cast<T>(0.5));
|
result.b = tmp - (YCoCgRColor.y * static_cast<T>(0.5));
|
||||||
@ -61,12 +61,12 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
class compute_YCoCgR<T, P, true> {
|
class compute_YCoCgR<T, P, true> {
|
||||||
public:
|
public:
|
||||||
static GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR
|
static GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & rgbColor
|
vec<3, T, P> const & rgbColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> result;
|
vec<3, T, P> result;
|
||||||
result.y/*Co*/ = rgbColor.r - rgbColor.b;
|
result.y/*Co*/ = rgbColor.r - rgbColor.b;
|
||||||
T tmp = rgbColor.b + (result.y >> 1);
|
T tmp = rgbColor.b + (result.y >> 1);
|
||||||
result.z/*Cg*/ = rgbColor.g - tmp;
|
result.z/*Cg*/ = rgbColor.g - tmp;
|
||||||
@ -74,12 +74,12 @@ namespace glm
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb
|
static GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & YCoCgRColor
|
vec<3, T, P> const & YCoCgRColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec3<T, P> result;
|
vec<3, T, P> result;
|
||||||
T tmp = YCoCgRColor.x - (YCoCgRColor.z >> 1);
|
T tmp = YCoCgRColor.x - (YCoCgRColor.z >> 1);
|
||||||
result.g = YCoCgRColor.z + tmp;
|
result.g = YCoCgRColor.z + tmp;
|
||||||
result.b = tmp - (YCoCgRColor.y >> 1);
|
result.b = tmp - (YCoCgRColor.y >> 1);
|
||||||
@ -89,18 +89,18 @@ namespace glm
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> rgb2YCoCgR
|
GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & rgbColor
|
vec<3, T, P> const & rgbColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::rgb2YCoCgR(rgbColor);
|
return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::rgb2YCoCgR(rgbColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> YCoCgR2rgb
|
GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & YCoCgRColor
|
vec<3, T, P> const & YCoCgRColor
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::YCoCgR2rgb(YCoCgRColor);
|
return compute_YCoCgR<T, P, std::numeric_limits<T>::is_integer>::YCoCgR2rgb(YCoCgRColor);
|
||||||
|
@ -38,53 +38,53 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tvec1<T, P>::bool_type isdenormal
|
GLM_FUNC_QUALIFIER typename vec<1, T, P>::bool_type isdenormal
|
||||||
(
|
(
|
||||||
tvec1<T, P> const & x
|
vec<1, T, P> const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
||||||
|
|
||||||
return typename tvec1<T, P>::bool_type(
|
return typename vec<1, T, P>::bool_type(
|
||||||
isdenormal(x.x));
|
isdenormal(x.x));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tvec2<T, P>::bool_type isdenormal
|
GLM_FUNC_QUALIFIER typename vec<2, T, P>::bool_type isdenormal
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & x
|
vec<2, T, P> const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
||||||
|
|
||||||
return typename tvec2<T, P>::bool_type(
|
return typename vec<2, T, P>::bool_type(
|
||||||
isdenormal(x.x),
|
isdenormal(x.x),
|
||||||
isdenormal(x.y));
|
isdenormal(x.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tvec3<T, P>::bool_type isdenormal
|
GLM_FUNC_QUALIFIER typename vec<3, T, P>::bool_type isdenormal
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & x
|
vec<3, T, P> const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
||||||
|
|
||||||
return typename tvec3<T, P>::bool_type(
|
return typename vec<3, T, P>::bool_type(
|
||||||
isdenormal(x.x),
|
isdenormal(x.x),
|
||||||
isdenormal(x.y),
|
isdenormal(x.y),
|
||||||
isdenormal(x.z));
|
isdenormal(x.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER typename tvec4<T, P>::bool_type isdenormal
|
GLM_FUNC_QUALIFIER typename vec<4, T, P>::bool_type isdenormal
|
||||||
(
|
(
|
||||||
tvec4<T, P> const & x
|
vec<4, T, P> const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");
|
||||||
|
|
||||||
return typename tvec4<T, P>::bool_type(
|
return typename vec<4, T, P>::bool_type(
|
||||||
isdenormal(x.x),
|
isdenormal(x.x),
|
||||||
isdenormal(x.y),
|
isdenormal(x.y),
|
||||||
isdenormal(x.z),
|
isdenormal(x.z),
|
||||||
@ -95,7 +95,7 @@ namespace detail
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType fmod(genType x, genType y)
|
GLM_FUNC_QUALIFIER genType fmod(genType x, genType y)
|
||||||
{
|
{
|
||||||
return fmod(tvec1<genType>(x), y).x;
|
return fmod(vec<1, genType>(x), y).x;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
template <int D, typename T, precision P, template <int, typename, precision> class vecType>
|
||||||
|
@ -39,34 +39,34 @@ namespace glm
|
|||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<2, T, P> lerp(const vec<2, T, P>& x, const vec<2, T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<3, T, P> lerp(const vec<3, T, P>& x, const vec<3, T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<4, T, P> lerp(const vec<4, T, P>& x, const vec<4, T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> lerp(const tvec2<T, P>& x, const tvec2<T, P>& y, const tvec2<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<2, T, P> lerp(const vec<2, T, P>& x, const vec<2, T, P>& y, const vec<2, T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> lerp(const tvec3<T, P>& x, const tvec3<T, P>& y, const tvec3<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<3, T, P> lerp(const vec<3, T, P>& x, const vec<3, T, P>& y, const vec<3, T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> lerp(const tvec4<T, P>& x, const tvec4<T, P>& y, const tvec4<T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<4, T, P> lerp(const vec<4, T, P>& x, const vec<4, T, P>& y, const vec<4, T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> saturate(const tvec2<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<2, T, P> saturate(const vec<2, T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> saturate(const tvec3<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<3, T, P> saturate(const vec<3, T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> saturate(const tvec4<T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<4, T, P> saturate(const vec<4, T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec2<T, P> atan2(const tvec2<T, P>& x, const tvec2<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<2, T, P> atan2(const vec<2, T, P>& x, const vec<2, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> atan2(const tvec3<T, P>& x, const tvec3<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<3, T, P> atan2(const vec<3, T, P>& x, const vec<3, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> atan2(const tvec4<T, P>& x, const tvec4<T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_QUALIFIER vec<4, T, P> atan2(const vec<4, T, P>& x, const vec<4, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
template <typename genType> GLM_FUNC_DECL bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename genType> GLM_FUNC_DECL bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_DECL tvec1<bool, P> isfinite(const tvec1<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_DECL vec<1, bool, P> isfinite(const vec<1, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_DECL tvec2<bool, P> isfinite(const tvec2<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_DECL vec<2, bool, P> isfinite(const vec<2, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_DECL tvec3<bool, P> isfinite(const tvec3<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_DECL vec<3, bool, P> isfinite(const vec<3, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
template <typename T, precision P> GLM_FUNC_DECL tvec4<bool, P> isfinite(const tvec4<T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
template <typename T, precision P> GLM_FUNC_DECL vec<4, bool, P> isfinite(const vec<4, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)
|
||||||
|
|
||||||
typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension)
|
typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec2<bool, highp> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension)
|
typedef vec<2, bool, highp> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec3<bool, highp> bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension)
|
typedef vec<3, bool, highp> bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec4<bool, highp> bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension)
|
typedef vec<4, bool, highp> bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
|
typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tmat2x2<bool, highp> bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef tmat2x2<bool, highp> bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
@ -80,9 +80,9 @@ namespace glm
|
|||||||
typedef tmat4x4<bool, highp> bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef tmat4x4<bool, highp> bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension)
|
typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec2<int, highp> int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef vec<2, int, highp> int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec3<int, highp> int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension)
|
typedef vec<3, int, highp> int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec4<int, highp> int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension)
|
typedef vec<4, int, highp> int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)
|
typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tmat2x2<int, highp> int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef tmat2x2<int, highp> int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
@ -96,9 +96,9 @@ namespace glm
|
|||||||
typedef tmat4x4<int, highp> int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef tmat4x4<int, highp> int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec2<float, highp> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef vec<2, float, highp> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec3<float, highp> float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
typedef vec<3, float, highp> float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec4<float, highp> float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
typedef vec<4, float, highp> float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tmat2x2<float, highp> float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef tmat2x2<float, highp> float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
@ -112,9 +112,9 @@ namespace glm
|
|||||||
typedef tmat4x4<float, highp> float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
typedef tmat4x4<float, highp> float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec2<double, highp> double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
typedef vec<2, double, highp> double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec3<double, highp> double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
typedef vec<3, double, highp> double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)
|
||||||
typedef tvec4<double, highp> double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
typedef vec<4, double, highp> double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)
|
||||||
|
|
||||||
typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)
|
||||||
typedef tmat2x2<double, highp> double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
typedef tmat2x2<double, highp> double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)
|
||||||
|
@ -25,37 +25,37 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec1<bool, P> isfinite(
|
GLM_FUNC_QUALIFIER vec<1, bool, P> isfinite(
|
||||||
tvec1<T, P> const & x)
|
vec<1, T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec1<bool, P>(
|
return vec<1, bool, P>(
|
||||||
isfinite(x.x));
|
isfinite(x.x));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<bool, P> isfinite(
|
GLM_FUNC_QUALIFIER vec<2, bool, P> isfinite(
|
||||||
tvec2<T, P> const & x)
|
vec<2, T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec2<bool, P>(
|
return vec<2, bool, P>(
|
||||||
isfinite(x.x),
|
isfinite(x.x),
|
||||||
isfinite(x.y));
|
isfinite(x.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<bool, P> isfinite(
|
GLM_FUNC_QUALIFIER vec<3, bool, P> isfinite(
|
||||||
tvec3<T, P> const & x)
|
vec<3, T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec3<bool, P>(
|
return vec<3, bool, P>(
|
||||||
isfinite(x.x),
|
isfinite(x.x),
|
||||||
isfinite(x.y),
|
isfinite(x.y),
|
||||||
isfinite(x.z));
|
isfinite(x.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<bool, P> isfinite(
|
GLM_FUNC_QUALIFIER vec<4, bool, P> isfinite(
|
||||||
tvec4<T, P> const & x)
|
vec<4, T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec4<bool, P>(
|
return vec<4, bool, P>(
|
||||||
isfinite(x.x),
|
isfinite(x.x),
|
||||||
isfinite(x.y),
|
isfinite(x.y),
|
||||||
isfinite(x.z),
|
isfinite(x.z),
|
||||||
|
@ -65,7 +65,7 @@ namespace glm
|
|||||||
|
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tdualquat(ctor);
|
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 & real);
|
||||||
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & orientation, tvec3<T, P> const & translation);
|
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);
|
GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat<T, P> const & real, tquat<T, P> const & dual);
|
||||||
|
|
||||||
// -- Conversion constructors --
|
// -- Conversion constructors --
|
||||||
@ -105,16 +105,16 @@ namespace glm
|
|||||||
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, tdualquat<T, P> const & p);
|
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, tdualquat<T, P> const & p);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> operator*(tdualquat<T, P> const & q, tvec3<T, P> const & v);
|
GLM_FUNC_DECL vec<3, T, P> operator*(tdualquat<T, P> const & q, vec<3, T, P> const & v);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, tdualquat<T, P> const & q);
|
GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tdualquat<T, P> const & q);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<T, P> operator*(tdualquat<T, P> const & q, tvec4<T, P> const & v);
|
GLM_FUNC_DECL vec<4, T, P> operator*(tdualquat<T, P> const & q, vec<4, T, P> const & v);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, tdualquat<T, P> const & q);
|
GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tdualquat<T, P> const & q);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, T const & s);
|
GLM_FUNC_DECL tdualquat<T, P> operator*(tdualquat<T, P> const & q, T const & s);
|
||||||
|
@ -61,7 +61,7 @@ namespace glm
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat(tquat<T, P> const & q, tvec3<T, P> const& p)
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat<T, P>::tdualquat(tquat<T, P> const & q, vec<3, T, P> const& p)
|
||||||
: real(q), dual(
|
: real(q), dual(
|
||||||
T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z),
|
T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z),
|
||||||
T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y),
|
T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y),
|
||||||
@ -163,27 +163,27 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tdualquat<T, P> const & q, tvec3<T, P> const & v)
|
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tdualquat<T, P> const & q, vec<3, T, P> const & v)
|
||||||
{
|
{
|
||||||
tvec3<T, P> const real_v3(q.real.x,q.real.y,q.real.z);
|
vec<3, T, P> const real_v3(q.real.x,q.real.y,q.real.z);
|
||||||
tvec3<T, P> const dual_v3(q.dual.x,q.dual.y,q.dual.z);
|
vec<3, T, P> const dual_v3(q.dual.x,q.dual.y,q.dual.z);
|
||||||
return (cross(real_v3, cross(real_v3,v) + v * q.real.w + dual_v3) + dual_v3 * q.real.w - real_v3 * q.dual.w) * T(2) + v;
|
return (cross(real_v3, cross(real_v3,v) + v * q.real.w + dual_v3) + dual_v3 * q.real.w - real_v3 * q.dual.w) * T(2) + v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> operator*(tvec3<T, P> const & v, tdualquat<T, P> const & q)
|
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tdualquat<T, P> const & q)
|
||||||
{
|
{
|
||||||
return glm::inverse(q) * v;
|
return glm::inverse(q) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tdualquat<T, P> const & q, tvec4<T, P> const & v)
|
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tdualquat<T, P> const & q, vec<4, T, P> const & v)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(q * tvec3<T, P>(v), v.w);
|
return vec<4, T, P>(q * vec<3, T, P>(v), v.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, tdualquat<T, P> const & q)
|
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tdualquat<T, P> const & q)
|
||||||
{
|
{
|
||||||
return glm::inverse(q) * v;
|
return glm::inverse(q) * v;
|
||||||
}
|
}
|
||||||
@ -269,19 +269,19 @@ namespace glm
|
|||||||
T const wy = r.w * x.real.y;
|
T const wy = r.w * x.real.y;
|
||||||
T const wz = r.w * x.real.z;
|
T const wz = r.w * x.real.z;
|
||||||
|
|
||||||
tvec4<T, P> const a(
|
vec<4, T, P> const a(
|
||||||
rr.w + rr.x - rr.y - rr.z,
|
rr.w + rr.x - rr.y - rr.z,
|
||||||
xy - wz,
|
xy - wz,
|
||||||
xz + wy,
|
xz + wy,
|
||||||
-(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y));
|
-(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y));
|
||||||
|
|
||||||
tvec4<T, P> const b(
|
vec<4, T, P> const b(
|
||||||
xy + wz,
|
xy + wz,
|
||||||
rr.w + rr.y - rr.x - rr.z,
|
rr.w + rr.y - rr.x - rr.z,
|
||||||
yz - wx,
|
yz - wx,
|
||||||
-(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x));
|
-(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x));
|
||||||
|
|
||||||
tvec4<T, P> const c(
|
vec<4, T, P> const c(
|
||||||
xz - wy,
|
xz - wy,
|
||||||
yz + wx,
|
yz + wx,
|
||||||
rr.w + rr.z - rr.x - rr.y,
|
rr.w + rr.z - rr.x - rr.y,
|
||||||
|
@ -125,12 +125,12 @@ namespace glm
|
|||||||
/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
|
/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
|
||||||
/// @see gtx_euler_angles
|
/// @see gtx_euler_angles
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> orientate3(tvec3<T, P> const & angles);
|
GLM_FUNC_DECL tmat3x3<T, P> orientate3(vec<3, T, P> const & angles);
|
||||||
|
|
||||||
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
|
||||||
/// @see gtx_euler_angles
|
/// @see gtx_euler_angles
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> orientate4(tvec3<T, P> const & angles);
|
GLM_FUNC_DECL tmat4x4<T, P> orientate4(vec<3, T, P> const & angles);
|
||||||
|
|
||||||
/// Extracts the (X * Y * Z) Euler angles from the rotation matrix M
|
/// Extracts the (X * Y * Z) Euler angles from the rotation matrix M
|
||||||
/// @see gtx_euler_angles
|
/// @see gtx_euler_angles
|
||||||
|
@ -278,7 +278,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> orientate3
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> orientate3
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & angles
|
vec<3, T, P> const & angles
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return tmat3x3<T, P>(yawPitchRoll(angles.z, angles.x, angles.y));
|
return tmat3x3<T, P>(yawPitchRoll(angles.z, angles.x, angles.y));
|
||||||
@ -287,7 +287,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> orientate4
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> orientate4
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & angles
|
vec<3, T, P> const & angles
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return yawPitchRoll(angles.z, angles.x, angles.y);
|
return yawPitchRoll(angles.z, angles.x, angles.y);
|
||||||
|
@ -15,10 +15,10 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> extend
|
GLM_FUNC_QUALIFIER vec<2, T, P> extend
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & Origin,
|
vec<2, T, P> const & Origin,
|
||||||
tvec2<T, P> const & Source,
|
vec<2, T, P> const & Source,
|
||||||
T const & Distance
|
T const & Distance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -26,10 +26,10 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> extend
|
GLM_FUNC_QUALIFIER vec<3, T, P> extend
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & Origin,
|
vec<3, T, P> const & Origin,
|
||||||
tvec3<T, P> const & Source,
|
vec<3, T, P> const & Source,
|
||||||
T const & Distance
|
T const & Distance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -37,10 +37,10 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> extend
|
GLM_FUNC_QUALIFIER vec<4, T, P> extend
|
||||||
(
|
(
|
||||||
tvec4<T, P> const & Origin,
|
vec<4, T, P> const & Origin,
|
||||||
tvec4<T, P> const & Source,
|
vec<4, T, P> const & Source,
|
||||||
T const & Distance
|
T const & Distance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -23,10 +23,10 @@ namespace glm
|
|||||||
GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x)
|
GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x)
|
||||||
{
|
{
|
||||||
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
|
# ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6
|
||||||
tvec1<T, P> tmp(detail::compute_inversesqrt<tvec1, genType, lowp, detail::is_aligned<lowp>::value>::call(tvec1<genType, lowp>(x)));
|
vec<1, T, P> tmp(detail::compute_inversesqrt<tvec1, genType, lowp, detail::is_aligned<lowp>::value>::call(vec<1, genType, lowp>(x)));
|
||||||
return tmp.x;
|
return tmp.x;
|
||||||
# else
|
# else
|
||||||
return detail::compute_inversesqrt<1, genType, highp, detail::is_aligned<highp>::value>::call(tvec1<genType, lowp>(x)).x;
|
return detail::compute_inversesqrt<1, genType, highp, detail::is_aligned<highp>::value>::call(vec<1, genType, lowp>(x)).x;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,18 +33,18 @@ namespace glm
|
|||||||
/// @see - gtx_gradient_paint
|
/// @see - gtx_gradient_paint
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL T radialGradient(
|
GLM_FUNC_DECL T radialGradient(
|
||||||
tvec2<T, P> const & Center,
|
vec<2, T, P> const & Center,
|
||||||
T const & Radius,
|
T const & Radius,
|
||||||
tvec2<T, P> const & Focal,
|
vec<2, T, P> const & Focal,
|
||||||
tvec2<T, P> const & Position);
|
vec<2, T, P> const & Position);
|
||||||
|
|
||||||
/// Return a color from a linear gradient.
|
/// Return a color from a linear gradient.
|
||||||
/// @see - gtx_gradient_paint
|
/// @see - gtx_gradient_paint
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL T linearGradient(
|
GLM_FUNC_DECL T linearGradient(
|
||||||
tvec2<T, P> const & Point0,
|
vec<2, T, P> const & Point0,
|
||||||
tvec2<T, P> const & Point1,
|
vec<2, T, P> const & Point1,
|
||||||
tvec2<T, P> const & Position);
|
vec<2, T, P> const & Position);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
@ -6,14 +6,14 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T radialGradient
|
GLM_FUNC_QUALIFIER T radialGradient
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & Center,
|
vec<2, T, P> const & Center,
|
||||||
T const & Radius,
|
T const & Radius,
|
||||||
tvec2<T, P> const & Focal,
|
vec<2, T, P> const & Focal,
|
||||||
tvec2<T, P> const & Position
|
vec<2, T, P> const & Position
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec2<T, P> F = Focal - Center;
|
vec<2, T, P> F = Focal - Center;
|
||||||
tvec2<T, P> D = Position - Focal;
|
vec<2, T, P> D = Position - Focal;
|
||||||
T Radius2 = pow2(Radius);
|
T Radius2 = pow2(Radius);
|
||||||
T Fx2 = pow2(F.x);
|
T Fx2 = pow2(F.x);
|
||||||
T Fy2 = pow2(F.y);
|
T Fy2 = pow2(F.y);
|
||||||
@ -26,12 +26,12 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T linearGradient
|
GLM_FUNC_QUALIFIER T linearGradient
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & Point0,
|
vec<2, T, P> const & Point0,
|
||||||
tvec2<T, P> const & Point1,
|
vec<2, T, P> const & Point1,
|
||||||
tvec2<T, P> const & Position
|
vec<2, T, P> const & Position
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec2<T, P> Dist = Point1 - Point0;
|
vec<2, T, P> Dist = Point1 - Point0;
|
||||||
return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
|
return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -32,17 +32,17 @@ namespace glm
|
|||||||
//! From GLM_GTX_handed_coordinate_space extension.
|
//! From GLM_GTX_handed_coordinate_space extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL bool rightHanded(
|
GLM_FUNC_DECL bool rightHanded(
|
||||||
tvec3<T, P> const & tangent,
|
vec<3, T, P> const & tangent,
|
||||||
tvec3<T, P> const & binormal,
|
vec<3, T, P> const & binormal,
|
||||||
tvec3<T, P> const & normal);
|
vec<3, T, P> const & normal);
|
||||||
|
|
||||||
//! Return if a trihedron left handed or not.
|
//! Return if a trihedron left handed or not.
|
||||||
//! From GLM_GTX_handed_coordinate_space extension.
|
//! From GLM_GTX_handed_coordinate_space extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL bool leftHanded(
|
GLM_FUNC_DECL bool leftHanded(
|
||||||
tvec3<T, P> const & tangent,
|
vec<3, T, P> const & tangent,
|
||||||
tvec3<T, P> const & binormal,
|
vec<3, T, P> const & binormal,
|
||||||
tvec3<T, P> const & normal);
|
vec<3, T, P> const & normal);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}// namespace glm
|
}// namespace glm
|
||||||
|
@ -6,9 +6,9 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER bool rightHanded
|
GLM_FUNC_QUALIFIER bool rightHanded
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & tangent,
|
vec<3, T, P> const & tangent,
|
||||||
tvec3<T, P> const & binormal,
|
vec<3, T, P> const & binormal,
|
||||||
tvec3<T, P> const & normal
|
vec<3, T, P> const & normal
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return dot(cross(normal, tangent), binormal) > T(0);
|
return dot(cross(normal, tangent), binormal) > T(0);
|
||||||
@ -17,9 +17,9 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER bool leftHanded
|
GLM_FUNC_QUALIFIER bool leftHanded
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & tangent,
|
vec<3, T, P> const & tangent,
|
||||||
tvec3<T, P> const & binormal,
|
vec<3, T, P> const & binormal,
|
||||||
tvec3<T, P> const & normal
|
vec<3, T, P> const & normal
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return dot(cross(normal, tangent), binormal) < T(0);
|
return dot(cross(normal, tangent), binormal) < T(0);
|
||||||
|
@ -45,27 +45,27 @@
|
|||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
struct hash<glm::tvec1<T,P> >
|
struct hash<glm::vec<1, T,P> >
|
||||||
{
|
{
|
||||||
GLM_FUNC_DECL size_t operator()(glm::tvec1<T, P> const & v) const;
|
GLM_FUNC_DECL size_t operator()(glm::vec<1, T, P> const & v) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
struct hash<glm::tvec2<T,P> >
|
struct hash<glm::vec<2, T,P> >
|
||||||
{
|
{
|
||||||
GLM_FUNC_DECL size_t operator()(glm::tvec2<T, P> const & v) const;
|
GLM_FUNC_DECL size_t operator()(glm::vec<2, T, P> const & v) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
struct hash<glm::tvec3<T,P> >
|
struct hash<glm::vec<3, T,P> >
|
||||||
{
|
{
|
||||||
GLM_FUNC_DECL size_t operator()(glm::tvec3<T, P> const & v) const;
|
GLM_FUNC_DECL size_t operator()(glm::vec<3, T, P> const & v) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
struct hash<glm::tvec4<T,P> >
|
struct hash<glm::vec<4, T,P> >
|
||||||
{
|
{
|
||||||
GLM_FUNC_DECL size_t operator()(glm::tvec4<T, P> const & v) const;
|
GLM_FUNC_DECL size_t operator()(glm::vec<4, T, P> const & v) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
|
@ -23,14 +23,14 @@ namespace detail
|
|||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tvec1<T, P>>::operator()(glm::tvec1<T, P> const & v) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::vec<1, T, P>>::operator()(glm::vec<1, T, P> const & v) const
|
||||||
{
|
{
|
||||||
hash<T> hasher;
|
hash<T> hasher;
|
||||||
return hasher(v.x);
|
return hasher(v.x);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tvec2<T, P>>::operator()(glm::tvec2<T, P> const & v) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::vec<2, T, P>>::operator()(glm::vec<2, T, P> const & v) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<T> hasher;
|
hash<T> hasher;
|
||||||
@ -40,7 +40,7 @@ namespace std
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tvec3<T, P>>::operator()(glm::tvec3<T, P> const & v) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::vec<3, T, P>>::operator()(glm::vec<3, T, P> const & v) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<T> hasher;
|
hash<T> hasher;
|
||||||
@ -51,7 +51,7 @@ namespace std
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, glm::precision P>
|
template <typename T, glm::precision P>
|
||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tvec4<T, P>>::operator()(glm::tvec4<T, P> const & v) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::vec<4, T, P>>::operator()(glm::vec<4, T, P> const & v) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<T> hasher;
|
hash<T> hasher;
|
||||||
@ -88,7 +88,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x2<T, P>>::operator()(glm::tmat2x2<T, P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x2<T, P>>::operator()(glm::tmat2x2<T, P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec2<T, P>> hasher;
|
hash<glm::vec<2, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
return seed;
|
return seed;
|
||||||
@ -98,7 +98,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x3<T, P>>::operator()(glm::tmat2x3<T, P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x3<T, P>>::operator()(glm::tmat2x3<T, P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec3<T, P>> hasher;
|
hash<glm::vec<3, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
return seed;
|
return seed;
|
||||||
@ -108,7 +108,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x4<T, P>>::operator()(glm::tmat2x4<T, P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat2x4<T, P>>::operator()(glm::tmat2x4<T, P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec4<T, P>> hasher;
|
hash<glm::vec<4, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
return seed;
|
return seed;
|
||||||
@ -118,7 +118,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x2<T, P>>::operator()(glm::tmat3x2<T, P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x2<T, P>>::operator()(glm::tmat3x2<T, P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec2<T, P>> hasher;
|
hash<glm::vec<2, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||||
@ -129,7 +129,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x3<T, P>>::operator()(glm::tmat3x3<T, P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x3<T, P>>::operator()(glm::tmat3x3<T, P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec3<T, P>> hasher;
|
hash<glm::vec<3, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||||
@ -140,7 +140,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x4<T, P>>::operator()(glm::tmat3x4<T, P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat3x4<T, P>>::operator()(glm::tmat3x4<T, P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec4<T, P>> hasher;
|
hash<glm::vec<4, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||||
@ -151,7 +151,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x2<T,P>>::operator()(glm::tmat4x2<T,P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x2<T,P>>::operator()(glm::tmat4x2<T,P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec2<T, P>> hasher;
|
hash<glm::vec<2, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||||
@ -163,7 +163,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x3<T,P>>::operator()(glm::tmat4x3<T,P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x3<T,P>>::operator()(glm::tmat4x3<T,P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec3<T, P>> hasher;
|
hash<glm::vec<3, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||||
@ -175,7 +175,7 @@ namespace std
|
|||||||
GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x4<T,P>>::operator()(glm::tmat4x4<T, P> const & m) const
|
GLM_FUNC_QUALIFIER size_t hash<glm::tmat4x4<T,P>>::operator()(glm::tmat4x4<T, P> const & m) const
|
||||||
{
|
{
|
||||||
size_t seed = 0;
|
size_t seed = 0;
|
||||||
hash<glm::tvec4<T, P>> hasher;
|
hash<glm::vec<4, T, P>> hasher;
|
||||||
glm::detail::hash_combine(seed, hasher(m[0]));
|
glm::detail::hash_combine(seed, hasher(m[0]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[1]));
|
glm::detail::hash_combine(seed, hasher(m[1]));
|
||||||
glm::detail::hash_combine(seed, hasher(m[2]));
|
glm::detail::hash_combine(seed, hasher(m[2]));
|
||||||
|
@ -80,29 +80,29 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> factorial(
|
GLM_FUNC_QUALIFIER vec<2, T, P> factorial(
|
||||||
tvec2<T, P> const & x)
|
vec<2, T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec2<T, P>(
|
return vec<2, T, P>(
|
||||||
factorial(x.x),
|
factorial(x.x),
|
||||||
factorial(x.y));
|
factorial(x.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> factorial(
|
GLM_FUNC_QUALIFIER vec<3, T, P> factorial(
|
||||||
tvec3<T, P> const & x)
|
vec<3, T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec3<T, P>(
|
return vec<3, T, P>(
|
||||||
factorial(x.x),
|
factorial(x.x),
|
||||||
factorial(x.y),
|
factorial(x.y),
|
||||||
factorial(x.z));
|
factorial(x.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> factorial(
|
GLM_FUNC_QUALIFIER vec<4, T, P> factorial(
|
||||||
tvec4<T, P> const & x)
|
vec<4, T, P> const & x)
|
||||||
{
|
{
|
||||||
return tvec4<T, P>(
|
return vec<4, T, P>(
|
||||||
factorial(x.x),
|
factorial(x.x),
|
||||||
factorial(x.y),
|
factorial(x.y),
|
||||||
factorial(x.z),
|
factorial(x.z),
|
||||||
|
@ -48,9 +48,9 @@ namespace glm
|
|||||||
//! From GLM_GTX_intersect extension.
|
//! From GLM_GTX_intersect extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL bool intersectRayTriangle(
|
GLM_FUNC_DECL bool intersectRayTriangle(
|
||||||
tvec3<T, P> const& orig, tvec3<T, P> const& dir,
|
vec<3, T, P> const& orig, vec<3, T, P> const& dir,
|
||||||
tvec3<T, P> const& v0, tvec3<T, P> const& v1, tvec3<T, P> const& v2,
|
vec<3, T, P> const& v0, vec<3, T, P> const& v1, vec<3, T, P> const& v2,
|
||||||
tvec3<T, P>& baryPosition, T& distance);
|
vec<3, T, P>& baryPosition, T& distance);
|
||||||
|
|
||||||
//! Compute the intersection of a line and a triangle.
|
//! Compute the intersection of a line and a triangle.
|
||||||
//! From GLM_GTX_intersect extension.
|
//! From GLM_GTX_intersect extension.
|
||||||
|
@ -26,27 +26,27 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER bool intersectRayTriangle
|
GLM_FUNC_QUALIFIER bool intersectRayTriangle
|
||||||
(
|
(
|
||||||
tvec3<T, P> const& orig, tvec3<T, P> const& dir,
|
vec<3, T, P> const& orig, vec<3, T, P> const& dir,
|
||||||
tvec3<T, P> const& vert0, tvec3<T, P> const& vert1, tvec3<T, P> const& vert2,
|
vec<3, T, P> const& vert0, vec<3, T, P> const& vert1, vec<3, T, P> const& vert2,
|
||||||
tvec2<T, P>& baryPosition, T& distance
|
vec<2, T, P>& baryPosition, T& distance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// find vectors for two edges sharing vert0
|
// find vectors for two edges sharing vert0
|
||||||
tvec3<T, P> const edge1 = vert1 - vert0;
|
vec<3, T, P> const edge1 = vert1 - vert0;
|
||||||
tvec3<T, P> const edge2 = vert2 - vert0;
|
vec<3, T, P> const edge2 = vert2 - vert0;
|
||||||
|
|
||||||
// begin calculating determinant - also used to calculate U parameter
|
// begin calculating determinant - also used to calculate U parameter
|
||||||
tvec3<T, P> const p = glm::cross(dir, edge2);
|
vec<3, T, P> const p = glm::cross(dir, edge2);
|
||||||
|
|
||||||
// if determinant is near zero, ray lies in plane of triangle
|
// if determinant is near zero, ray lies in plane of triangle
|
||||||
T const det = glm::dot(edge1, p);
|
T const det = glm::dot(edge1, p);
|
||||||
|
|
||||||
tvec3<T, P> qvec;
|
vec<3, T, P> qvec;
|
||||||
|
|
||||||
if(det > std::numeric_limits<T>::epsilon())
|
if(det > std::numeric_limits<T>::epsilon())
|
||||||
{
|
{
|
||||||
// calculate distance from vert0 to ray origin
|
// calculate distance from vert0 to ray origin
|
||||||
tvec3<T, P> const tvec = orig - vert0;
|
vec<3, T, P> const tvec = orig - vert0;
|
||||||
|
|
||||||
// calculate U parameter and test bounds
|
// calculate U parameter and test bounds
|
||||||
baryPosition.x = glm::dot(tvec, p);
|
baryPosition.x = glm::dot(tvec, p);
|
||||||
@ -64,7 +64,7 @@ namespace glm
|
|||||||
else if(det < -std::numeric_limits<T>::epsilon())
|
else if(det < -std::numeric_limits<T>::epsilon())
|
||||||
{
|
{
|
||||||
// calculate distance from vert0 to ray origin
|
// calculate distance from vert0 to ray origin
|
||||||
tvec3<T, P> const tvec = orig - vert0;
|
vec<3, T, P> const tvec = orig - vert0;
|
||||||
|
|
||||||
// calculate U parameter and test bounds
|
// calculate U parameter and test bounds
|
||||||
baryPosition.x = glm::dot(tvec, p);
|
baryPosition.x = glm::dot(tvec, p);
|
||||||
|
@ -165,13 +165,13 @@ namespace glm
|
|||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&);
|
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&);
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec1<T,P> const&);
|
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<1, T,P> const&);
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec2<T,P> const&);
|
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<2, T,P> const&);
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec3<T,P> const&);
|
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<3, T,P> const&);
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec4<T,P> const&);
|
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, vec<4, T,P> const&);
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);
|
GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
|
@ -202,25 +202,25 @@ namespace detail
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec1<T,P> const& a)
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<1, T,P> const& a)
|
||||||
{
|
{
|
||||||
return detail::print_vector_on(os, a);
|
return detail::print_vector_on(os, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a)
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<2, T,P> const& a)
|
||||||
{
|
{
|
||||||
return detail::print_vector_on(os, a);
|
return detail::print_vector_on(os, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a)
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<3, T,P> const& a)
|
||||||
{
|
{
|
||||||
return detail::print_vector_on(os, a);
|
return detail::print_vector_on(os, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename CTy, typename CTr, typename T, precision P>
|
template <typename CTy, typename CTr, typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a)
|
GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<4, T,P> const& a)
|
||||||
{
|
{
|
||||||
return detail::print_vector_on(os, a);
|
return detail::print_vector_on(os, a);
|
||||||
}
|
}
|
||||||
|
@ -33,13 +33,13 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_cross_product extension.
|
//! From GLM_GTX_matrix_cross_product extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> matrixCross3(
|
GLM_FUNC_DECL tmat3x3<T, P> matrixCross3(
|
||||||
tvec3<T, P> const & x);
|
vec<3, T, P> const & x);
|
||||||
|
|
||||||
//! Build a cross product matrix.
|
//! Build a cross product matrix.
|
||||||
//! From GLM_GTX_matrix_cross_product extension.
|
//! From GLM_GTX_matrix_cross_product extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> matrixCross4(
|
GLM_FUNC_DECL tmat4x4<T, P> matrixCross4(
|
||||||
tvec3<T, P> const & x);
|
vec<3, T, P> const & x);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -6,7 +6,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> matrixCross3
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> matrixCross3
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & x
|
vec<3, T, P> const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat3x3<T, P> Result(T(0));
|
tmat3x3<T, P> Result(T(0));
|
||||||
@ -22,7 +22,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> matrixCross4
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> matrixCross4
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & x
|
vec<3, T, P> const & x
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(T(0));
|
tmat4x4<T, P> Result(T(0));
|
||||||
|
@ -38,7 +38,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL bool decompose(
|
GLM_FUNC_DECL bool decompose(
|
||||||
tmat4x4<T, P> const & modelMatrix,
|
tmat4x4<T, P> const & modelMatrix,
|
||||||
tvec3<T, P> & scale, tquat<T, P> & orientation, tvec3<T, P> & translation, tvec3<T, P> & skew, tvec4<T, P> & perspective);
|
vec<3, T, P> & scale, tquat<T, P> & orientation, vec<3, T, P> & translation, vec<3, T, P> & skew, vec<4, T, P> & perspective);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -7,16 +7,16 @@ namespace detail
|
|||||||
/// Make a linear combination of two vectors and return the result.
|
/// Make a linear combination of two vectors and return the result.
|
||||||
// result = (a * ascl) + (b * bscl)
|
// result = (a * ascl) + (b * bscl)
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> combine(
|
GLM_FUNC_QUALIFIER vec<3, T, P> combine(
|
||||||
tvec3<T, P> const & a,
|
vec<3, T, P> const & a,
|
||||||
tvec3<T, P> const & b,
|
vec<3, T, P> const & b,
|
||||||
T ascl, T bscl)
|
T ascl, T bscl)
|
||||||
{
|
{
|
||||||
return (a * ascl) + (b * bscl);
|
return (a * ascl) + (b * bscl);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> scale(tvec3<T, P> const& v, T desiredLength)
|
GLM_FUNC_QUALIFIER vec<3, T, P> scale(vec<3, T, P> const& v, T desiredLength)
|
||||||
{
|
{
|
||||||
return v * desiredLength / length(v);
|
return v * desiredLength / length(v);
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ namespace detail
|
|||||||
// Decomposes the mode matrix to translations,rotation scale components
|
// Decomposes the mode matrix to translations,rotation scale components
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER bool decompose(tmat4x4<T, P> const & ModelMatrix, tvec3<T, P> & Scale, tquat<T, P> & Orientation, tvec3<T, P> & Translation, tvec3<T, P> & Skew, tvec4<T, P> & Perspective)
|
GLM_FUNC_QUALIFIER bool decompose(tmat4x4<T, P> const & ModelMatrix, vec<3, T, P> & Scale, tquat<T, P> & Orientation, vec<3, T, P> & Translation, vec<3, T, P> & Skew, vec<4, T, P> & Perspective)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> LocalMatrix(ModelMatrix);
|
tmat4x4<T, P> LocalMatrix(ModelMatrix);
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ namespace detail
|
|||||||
if(LocalMatrix[0][3] != static_cast<T>(0) || LocalMatrix[1][3] != static_cast<T>(0) || LocalMatrix[2][3] != static_cast<T>(0))
|
if(LocalMatrix[0][3] != static_cast<T>(0) || LocalMatrix[1][3] != static_cast<T>(0) || LocalMatrix[2][3] != static_cast<T>(0))
|
||||||
{
|
{
|
||||||
// rightHandSide is the right hand side of the equation.
|
// rightHandSide is the right hand side of the equation.
|
||||||
tvec4<T, P> RightHandSide;
|
vec<4, T, P> RightHandSide;
|
||||||
RightHandSide[0] = LocalMatrix[0][3];
|
RightHandSide[0] = LocalMatrix[0][3];
|
||||||
RightHandSide[1] = LocalMatrix[1][3];
|
RightHandSide[1] = LocalMatrix[1][3];
|
||||||
RightHandSide[2] = LocalMatrix[2][3];
|
RightHandSide[2] = LocalMatrix[2][3];
|
||||||
@ -77,14 +77,14 @@ namespace detail
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No perspective.
|
// No perspective.
|
||||||
Perspective = tvec4<T, P>(0, 0, 0, 1);
|
Perspective = vec<4, T, P>(0, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next take care of translation (easy).
|
// Next take care of translation (easy).
|
||||||
Translation = tvec3<T, P>(LocalMatrix[3]);
|
Translation = vec<3, T, P>(LocalMatrix[3]);
|
||||||
LocalMatrix[3] = tvec4<T, P>(0, 0, 0, LocalMatrix[3].w);
|
LocalMatrix[3] = vec<4, T, P>(0, 0, 0, LocalMatrix[3].w);
|
||||||
|
|
||||||
tvec3<T, P> Row[3], Pdum3;
|
vec<3, T, P> Row[3], Pdum3;
|
||||||
|
|
||||||
// Now get scale and shear.
|
// Now get scale and shear.
|
||||||
for(length_t i = 0; i < 3; ++i)
|
for(length_t i = 0; i < 3; ++i)
|
||||||
|
@ -34,14 +34,14 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL void axisAngle(
|
GLM_FUNC_DECL void axisAngle(
|
||||||
tmat4x4<T, P> const & mat,
|
tmat4x4<T, P> const & mat,
|
||||||
tvec3<T, P> & axis,
|
vec<3, T, P> & axis,
|
||||||
T & angle);
|
T & angle);
|
||||||
|
|
||||||
/// Build a matrix from axis and angle.
|
/// Build a matrix from axis and angle.
|
||||||
/// From GLM_GTX_matrix_interpolation extension.
|
/// From GLM_GTX_matrix_interpolation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> axisAngleMatrix(
|
GLM_FUNC_DECL tmat4x4<T, P> axisAngleMatrix(
|
||||||
tvec3<T, P> const & axis,
|
vec<3, T, P> const & axis,
|
||||||
T const angle);
|
T const angle);
|
||||||
|
|
||||||
/// Extracts the rotation part of a matrix.
|
/// Extracts the rotation part of a matrix.
|
||||||
|
@ -7,7 +7,7 @@ namespace glm
|
|||||||
GLM_FUNC_QUALIFIER void axisAngle
|
GLM_FUNC_QUALIFIER void axisAngle
|
||||||
(
|
(
|
||||||
tmat4x4<T, P> const & mat,
|
tmat4x4<T, P> const & mat,
|
||||||
tvec3<T, P> & axis,
|
vec<3, T, P> & axis,
|
||||||
T & angle
|
T & angle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -81,14 +81,14 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> axisAngleMatrix
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> axisAngleMatrix
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & axis,
|
vec<3, T, P> const & axis,
|
||||||
T const angle
|
T const angle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
T c = cos(angle);
|
T c = cos(angle);
|
||||||
T s = sin(angle);
|
T s = sin(angle);
|
||||||
T t = static_cast<T>(1) - c;
|
T t = static_cast<T>(1) - c;
|
||||||
tvec3<T, P> n = normalize(axis);
|
vec<3, T, P> n = normalize(axis);
|
||||||
|
|
||||||
return tmat4x4<T, P>(
|
return tmat4x4<T, P>(
|
||||||
t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0),
|
t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0),
|
||||||
@ -122,7 +122,7 @@ namespace glm
|
|||||||
{
|
{
|
||||||
tmat4x4<T, P> m1rot = extractMatrixRotation(m1);
|
tmat4x4<T, P> m1rot = extractMatrixRotation(m1);
|
||||||
tmat4x4<T, P> dltRotation = m2 * transpose(m1rot);
|
tmat4x4<T, P> dltRotation = m2 * transpose(m1rot);
|
||||||
tvec3<T, P> dltAxis;
|
vec<3, T, P> dltAxis;
|
||||||
T dltAngle;
|
T dltAngle;
|
||||||
axisAngle(dltRotation, dltAxis, dltAngle);
|
axisAngle(dltRotation, dltAxis, dltAngle);
|
||||||
tmat4x4<T, P> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;
|
tmat4x4<T, P> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;
|
||||||
|
@ -33,8 +33,8 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
|
GLM_FUNC_DECL tmat2x2<T, P> rowMajor2(
|
||||||
tvec2<T, P> const & v1,
|
vec<2, T, P> const & v1,
|
||||||
tvec2<T, P> const & v2);
|
vec<2, T, P> const & v2);
|
||||||
|
|
||||||
//! Build a row major matrix from other matrix.
|
//! Build a row major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
@ -46,9 +46,9 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
|
GLM_FUNC_DECL tmat3x3<T, P> rowMajor3(
|
||||||
tvec3<T, P> const & v1,
|
vec<3, T, P> const & v1,
|
||||||
tvec3<T, P> const & v2,
|
vec<3, T, P> const & v2,
|
||||||
tvec3<T, P> const & v3);
|
vec<3, T, P> const & v3);
|
||||||
|
|
||||||
//! Build a row major matrix from other matrix.
|
//! Build a row major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
@ -60,10 +60,10 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> rowMajor4(
|
GLM_FUNC_DECL tmat4x4<T, P> rowMajor4(
|
||||||
tvec4<T, P> const & v1,
|
vec<4, T, P> const & v1,
|
||||||
tvec4<T, P> const & v2,
|
vec<4, T, P> const & v2,
|
||||||
tvec4<T, P> const & v3,
|
vec<4, T, P> const & v3,
|
||||||
tvec4<T, P> const & v4);
|
vec<4, T, P> const & v4);
|
||||||
|
|
||||||
//! Build a row major matrix from other matrix.
|
//! Build a row major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
@ -75,8 +75,8 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
|
GLM_FUNC_DECL tmat2x2<T, P> colMajor2(
|
||||||
tvec2<T, P> const & v1,
|
vec<2, T, P> const & v1,
|
||||||
tvec2<T, P> const & v2);
|
vec<2, T, P> const & v2);
|
||||||
|
|
||||||
//! Build a column major matrix from other matrix.
|
//! Build a column major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
@ -88,9 +88,9 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
|
GLM_FUNC_DECL tmat3x3<T, P> colMajor3(
|
||||||
tvec3<T, P> const & v1,
|
vec<3, T, P> const & v1,
|
||||||
tvec3<T, P> const & v2,
|
vec<3, T, P> const & v2,
|
||||||
tvec3<T, P> const & v3);
|
vec<3, T, P> const & v3);
|
||||||
|
|
||||||
//! Build a column major matrix from other matrix.
|
//! Build a column major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
@ -102,10 +102,10 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> colMajor4(
|
GLM_FUNC_DECL tmat4x4<T, P> colMajor4(
|
||||||
tvec4<T, P> const & v1,
|
vec<4, T, P> const & v1,
|
||||||
tvec4<T, P> const & v2,
|
vec<4, T, P> const & v2,
|
||||||
tvec4<T, P> const & v3,
|
vec<4, T, P> const & v3,
|
||||||
tvec4<T, P> const & v4);
|
vec<4, T, P> const & v4);
|
||||||
|
|
||||||
//! Build a column major matrix from other matrix.
|
//! Build a column major matrix from other matrix.
|
||||||
//! From GLM_GTX_matrix_major_storage extension.
|
//! From GLM_GTX_matrix_major_storage extension.
|
||||||
|
@ -6,8 +6,8 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2
|
GLM_FUNC_QUALIFIER tmat2x2<T, P> rowMajor2
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & v1,
|
vec<2, T, P> const & v1,
|
||||||
tvec2<T, P> const & v2
|
vec<2, T, P> const & v2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat2x2<T, P> Result;
|
tmat2x2<T, P> Result;
|
||||||
@ -32,9 +32,9 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> rowMajor3(
|
||||||
const tvec3<T, P>& v1,
|
const vec<3, T, P>& v1,
|
||||||
const tvec3<T, P>& v2,
|
const vec<3, T, P>& v2,
|
||||||
const tvec3<T, P>& v3)
|
const vec<3, T, P>& v3)
|
||||||
{
|
{
|
||||||
tmat3x3<T, P> Result;
|
tmat3x3<T, P> Result;
|
||||||
Result[0][0] = v1.x;
|
Result[0][0] = v1.x;
|
||||||
@ -68,10 +68,10 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> rowMajor4(
|
||||||
const tvec4<T, P>& v1,
|
const vec<4, T, P>& v1,
|
||||||
const tvec4<T, P>& v2,
|
const vec<4, T, P>& v2,
|
||||||
const tvec4<T, P>& v3,
|
const vec<4, T, P>& v3,
|
||||||
const tvec4<T, P>& v4)
|
const vec<4, T, P>& v4)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result;
|
tmat4x4<T, P> Result;
|
||||||
Result[0][0] = v1.x;
|
Result[0][0] = v1.x;
|
||||||
@ -119,8 +119,8 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
|
GLM_FUNC_QUALIFIER tmat2x2<T, P> colMajor2(
|
||||||
const tvec2<T, P>& v1,
|
const vec<2, T, P>& v1,
|
||||||
const tvec2<T, P>& v2)
|
const vec<2, T, P>& v2)
|
||||||
{
|
{
|
||||||
return tmat2x2<T, P>(v1, v2);
|
return tmat2x2<T, P>(v1, v2);
|
||||||
}
|
}
|
||||||
@ -134,9 +134,9 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> colMajor3(
|
||||||
const tvec3<T, P>& v1,
|
const vec<3, T, P>& v1,
|
||||||
const tvec3<T, P>& v2,
|
const vec<3, T, P>& v2,
|
||||||
const tvec3<T, P>& v3)
|
const vec<3, T, P>& v3)
|
||||||
{
|
{
|
||||||
return tmat3x3<T, P>(v1, v2, v3);
|
return tmat3x3<T, P>(v1, v2, v3);
|
||||||
}
|
}
|
||||||
@ -150,10 +150,10 @@ namespace glm
|
|||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> colMajor4(
|
||||||
const tvec4<T, P>& v1,
|
const vec<4, T, P>& v1,
|
||||||
const tvec4<T, P>& v2,
|
const vec<4, T, P>& v2,
|
||||||
const tvec4<T, P>& v3,
|
const vec<4, T, P>& v3,
|
||||||
const tvec4<T, P>& v4)
|
const vec<4, T, P>& v4)
|
||||||
{
|
{
|
||||||
return tmat4x4<T, P>(v1, v2, v3, v4);
|
return tmat4x4<T, P>(v1, v2, v3, v4);
|
||||||
}
|
}
|
||||||
|
@ -32,55 +32,55 @@ namespace glm
|
|||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x2<T, P> diagonal2x2(
|
GLM_FUNC_DECL tmat2x2<T, P> diagonal2x2(
|
||||||
tvec2<T, P> const & v);
|
vec<2, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> diagonal2x3(
|
GLM_FUNC_DECL tmat2x3<T, P> diagonal2x3(
|
||||||
tvec2<T, P> const & v);
|
vec<2, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> diagonal2x4(
|
GLM_FUNC_DECL tmat2x4<T, P> diagonal2x4(
|
||||||
tvec2<T, P> const & v);
|
vec<2, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> diagonal3x2(
|
GLM_FUNC_DECL tmat3x2<T, P> diagonal3x2(
|
||||||
tvec2<T, P> const & v);
|
vec<2, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> diagonal3x3(
|
GLM_FUNC_DECL tmat3x3<T, P> diagonal3x3(
|
||||||
tvec3<T, P> const & v);
|
vec<3, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x4<T, P> diagonal3x4(
|
GLM_FUNC_DECL tmat3x4<T, P> diagonal3x4(
|
||||||
tvec3<T, P> const & v);
|
vec<3, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P> diagonal4x2(
|
GLM_FUNC_DECL tmat4x2<T, P> diagonal4x2(
|
||||||
tvec2<T, P> const & v);
|
vec<2, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x3<T, P> diagonal4x3(
|
GLM_FUNC_DECL tmat4x3<T, P> diagonal4x3(
|
||||||
tvec3<T, P> const & v);
|
vec<3, T, P> const & v);
|
||||||
|
|
||||||
//! Build a diagonal matrix.
|
//! Build a diagonal matrix.
|
||||||
//! From GLM_GTX_matrix_operation extension.
|
//! From GLM_GTX_matrix_operation extension.
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> diagonal4x4(
|
GLM_FUNC_DECL tmat4x4<T, P> diagonal4x4(
|
||||||
tvec4<T, P> const & v);
|
vec<4, T, P> const & v);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -6,7 +6,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> diagonal2x2
|
GLM_FUNC_QUALIFIER tmat2x2<T, P> diagonal2x2
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & v
|
vec<2, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat2x2<T, P> Result(static_cast<T>(1));
|
tmat2x2<T, P> Result(static_cast<T>(1));
|
||||||
@ -18,7 +18,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat2x3<T, P> diagonal2x3
|
GLM_FUNC_QUALIFIER tmat2x3<T, P> diagonal2x3
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & v
|
vec<2, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat2x3<T, P> Result(static_cast<T>(1));
|
tmat2x3<T, P> Result(static_cast<T>(1));
|
||||||
@ -30,7 +30,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat2x4<T, P> diagonal2x4
|
GLM_FUNC_QUALIFIER tmat2x4<T, P> diagonal2x4
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & v
|
vec<2, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat2x4<T, P> Result(static_cast<T>(1));
|
tmat2x4<T, P> Result(static_cast<T>(1));
|
||||||
@ -42,7 +42,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x2<T, P> diagonal3x2
|
GLM_FUNC_QUALIFIER tmat3x2<T, P> diagonal3x2
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & v
|
vec<2, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat3x2<T, P> Result(static_cast<T>(1));
|
tmat3x2<T, P> Result(static_cast<T>(1));
|
||||||
@ -54,7 +54,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> diagonal3x3
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> diagonal3x3
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & v
|
vec<3, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat3x3<T, P> Result(static_cast<T>(1));
|
tmat3x3<T, P> Result(static_cast<T>(1));
|
||||||
@ -67,7 +67,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x4<T, P> diagonal3x4
|
GLM_FUNC_QUALIFIER tmat3x4<T, P> diagonal3x4
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & v
|
vec<3, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat3x4<T, P> Result(static_cast<T>(1));
|
tmat3x4<T, P> Result(static_cast<T>(1));
|
||||||
@ -80,7 +80,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> diagonal4x4
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> diagonal4x4
|
||||||
(
|
(
|
||||||
tvec4<T, P> const & v
|
vec<4, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(static_cast<T>(1));
|
tmat4x4<T, P> Result(static_cast<T>(1));
|
||||||
@ -94,7 +94,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> diagonal4x3
|
GLM_FUNC_QUALIFIER tmat4x3<T, P> diagonal4x3
|
||||||
(
|
(
|
||||||
tvec3<T, P> const & v
|
vec<3, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat4x3<T, P> Result(static_cast<T>(1));
|
tmat4x3<T, P> Result(static_cast<T>(1));
|
||||||
@ -107,7 +107,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x2<T, P> diagonal4x2
|
GLM_FUNC_QUALIFIER tmat4x2<T, P> diagonal4x2
|
||||||
(
|
(
|
||||||
tvec2<T, P> const & v
|
vec<2, T, P> const & v
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmat4x2<T, P> Result(static_cast<T>(1));
|
tmat4x2<T, P> Result(static_cast<T>(1));
|
||||||
|
@ -37,7 +37,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> translate(
|
||||||
tmat3x3<T, P> const & m,
|
tmat3x3<T, P> const & m,
|
||||||
tvec2<T, P> const & v);
|
vec<2, T, P> const & v);
|
||||||
|
|
||||||
/// Builds a rotation 3 * 3 matrix created from an angle.
|
/// Builds a rotation 3 * 3 matrix created from an angle.
|
||||||
///
|
///
|
||||||
@ -55,7 +55,7 @@ namespace glm
|
|||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> scale(
|
||||||
tmat3x3<T, P> const & m,
|
tmat3x3<T, P> const & m,
|
||||||
tvec2<T, P> const & v);
|
vec<2, T, P> const & v);
|
||||||
|
|
||||||
/// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix.
|
/// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix.
|
||||||
///
|
///
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user