diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 00e1d7af..08649a3e 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -57,11 +57,12 @@ namespace detail typedef tvec2 type; typedef tvec2 bool_type; typedef T value_type; + typedef int size_type; ////////////////////////////////////// // Helper - GLM_FUNC_DECL GLM_CONSTEXPR int length() const; + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; ////////////////////////////////////// // Data diff --git a/glm/core/type_vec2.inl b/glm/core/type_vec2.inl index 3c95d5eb..d690e39b 100644 --- a/glm/core/type_vec2.inl +++ b/glm/core/type_vec2.inl @@ -30,7 +30,7 @@ namespace glm{ namespace detail { template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR int tvec2::length() const + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2::size_type tvec2::length() const { return 2; } diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index cd48a6ed..40343504 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -57,11 +57,12 @@ namespace detail typedef tvec3 type; typedef tvec3 bool_type; typedef T value_type; + typedef int size_type; ////////////////////////////////////// // Helper - GLM_FUNC_DECL GLM_CONSTEXPR int length() const; + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; ////////////////////////////////////// // Data diff --git a/glm/core/type_vec3.inl b/glm/core/type_vec3.inl index 8a0babb7..a61b075b 100644 --- a/glm/core/type_vec3.inl +++ b/glm/core/type_vec3.inl @@ -30,7 +30,7 @@ namespace glm{ namespace detail { template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR int tvec3::length() const + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3::size_type tvec3::length() const { return 3; } diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index 354a5102..e044b807 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -58,11 +58,12 @@ namespace detail typedef tvec4 type; typedef tvec4 bool_type; typedef T value_type; + typedef int size_type; ////////////////////////////////////// // Helper - GLM_FUNC_DECL GLM_CONSTEXPR int length() const; + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; ////////////////////////////////////// // Data diff --git a/glm/core/type_vec4.inl b/glm/core/type_vec4.inl index 71371d75..69186722 100644 --- a/glm/core/type_vec4.inl +++ b/glm/core/type_vec4.inl @@ -30,7 +30,7 @@ namespace glm{ namespace detail { template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR int tvec4::length() const + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::size_type tvec4::length() const { return 4; } diff --git a/glm/gtc/ulp.inl b/glm/gtc/ulp.inl index 97d0b271..80e070e7 100644 --- a/glm/gtc/ulp.inl +++ b/glm/gtc/ulp.inl @@ -284,7 +284,7 @@ namespace glm if(x < y) { T temp = x; - while(temp != y && ulp < std::numeric_limits::max()) + while(temp != y)// && ulp < std::numeric_limits::max()) { ++ulp; temp = next_float(temp); @@ -293,7 +293,7 @@ namespace glm else if(y < x) { T temp = y; - while(temp != x && ulp < std::numeric_limits::max()) + while(temp != x)// && ulp < std::numeric_limits::max()) { ++ulp; temp = next_float(temp); diff --git a/glm/gtx/associated_min_max.inl b/glm/gtx/associated_min_max.inl index 3a4640fe..3ed3d59f 100644 --- a/glm/gtx/associated_min_max.inl +++ b/glm/gtx/associated_min_max.inl @@ -10,127 +10,127 @@ namespace glm{ // Min comparison between 2 variables -template +template GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) { return x < y ? a : b; } -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin ( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b ) { - detail::tvec2 Result; + detail::tvec2 Result; //Result.x = x[0] < y[0] ? a[0] : b[0]; //Result.y = x[1] < y[1] ? a[1] : b[1]; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? a[i] : b[i]; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin ( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? a[i] : b[i]; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin ( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? a[i] : b[i]; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin ( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b + T x, const detail::tvec2& a, + T y, const detail::tvec2& b ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x < y ? a[i] : b[i]; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin ( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b + T x, const detail::tvec3& a, + T y, const detail::tvec3& b ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x < y ? a[i] : b[i]; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin ( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b + T x, const detail::tvec4& a, + T y, const detail::tvec4& b ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x < y ? a[i] : b[i]; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin ( - const detail::tvec2& x, U a, - const detail::tvec2& y, U b + detail::tvec2 const & x, U a, + detail::tvec2 const & y, U b ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? a : b; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin ( const detail::tvec3& x, U a, const detail::tvec3& y, U b ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? a : b; return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin ( const detail::tvec4& x, U a, const detail::tvec4& y, U b ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? a : b; return Result; } @@ -148,44 +148,44 @@ GLM_FUNC_QUALIFIER U associatedMin return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin ( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin ( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); return Result; } -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin ( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); return Result; } @@ -209,17 +209,17 @@ GLM_FUNC_QUALIFIER U associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin ( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c, - const detail::tvec2& w, const detail::tvec2& d + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c, + const detail::tvec2& w, const detail::tvec2& d ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) { T Test1 = min(x[i], y[i]); T Test2 = min(z[i], w[i]); @@ -231,17 +231,17 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin ( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c, - const detail::tvec3& w, const detail::tvec3& d + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c, + const detail::tvec3& w, const detail::tvec3& d ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) { T Test1 = min(x[i], y[i]); T Test2 = min(z[i], w[i]); @@ -253,17 +253,17 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin ( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c, - const detail::tvec4& w, const detail::tvec4& d + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c, + const detail::tvec4& w, const detail::tvec4& d ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) { T Test1 = min(x[i], y[i]); T Test2 = min(z[i], w[i]); @@ -275,20 +275,20 @@ GLM_FUNC_QUALIFIER detail::tvec4 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin ( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b, - T z, const detail::tvec2& c, - T w, const detail::tvec2& d + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c, + T w, const detail::tvec2& d ) { T Test1 = min(x, y); T Test2 = min(z, w); - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) { U Result1 = x < y ? a[i] : b[i]; U Result2 = z < w ? c[i] : d[i]; @@ -298,20 +298,20 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin ( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b, - T z, const detail::tvec3& c, - T w, const detail::tvec3& d + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c, + T w, const detail::tvec3& d ) { T Test1 = min(x, y); T Test2 = min(z, w); - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) { U Result1 = x < y ? a[i] : b[i]; U Result2 = z < w ? c[i] : d[i]; @@ -321,20 +321,20 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin ( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b, - T z, const detail::tvec4& c, - T w, const detail::tvec4& d + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c, + T w, const detail::tvec4& d ) { T Test1 = min(x, y); T Test2 = min(z, w); - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) { U Result1 = x < y ? a[i] : b[i]; U Result2 = z < w ? c[i] : d[i]; @@ -344,8 +344,8 @@ GLM_FUNC_QUALIFIER detail::tvec4 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin ( const detail::tvec2& x, U a, const detail::tvec2& y, U b, @@ -353,7 +353,7 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMin const detail::tvec2& w, U d ) { - detail::tvec2 Result; + detail::tvec2 Result; for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) { T Test1 = min(x[i], y[i]); @@ -366,8 +366,8 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin ( const detail::tvec3& x, U a, const detail::tvec3& y, U b, @@ -375,7 +375,7 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMin const detail::tvec3& w, U d ) { - detail::tvec3 Result; + detail::tvec3 Result; for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) { T Test1 = min(x[i], y[i]); @@ -388,8 +388,8 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMin } // Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin ( const detail::tvec4& x, U a, const detail::tvec4& y, U b, @@ -397,7 +397,7 @@ GLM_FUNC_QUALIFIER detail::tvec4 associatedMin const detail::tvec4& w, U d ) { - detail::tvec4 Result; + detail::tvec4 Result; for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) { T Test1 = min(x[i], y[i]); @@ -417,127 +417,127 @@ GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? a[i] : b[i]; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? a[i] : b[i]; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? a[i] : b[i]; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b + T x, const detail::tvec2& a, + T y, const detail::tvec2& b ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x > y ? a[i] : b[i]; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b + T x, const detail::tvec3& a, + T y, const detail::tvec3& b ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x > y ? a[i] : b[i]; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b + T x, const detail::tvec4& a, + T y, const detail::tvec4& b ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x > y ? a[i] : b[i]; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( const detail::tvec2& x, U a, const detail::tvec2& y, U b ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? a : b; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( const detail::tvec3& x, U a, const detail::tvec3& y, U b ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? a : b; return Result; } // Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( const detail::tvec4& x, U a, const detail::tvec4& y, U b ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? a : b; return Result; } @@ -556,136 +556,136 @@ GLM_FUNC_QUALIFIER U associatedMax } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b, - T z, const detail::tvec2& c + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b, - T z, const detail::tvec3& c + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b, - T z, const detail::tvec4& c + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( const detail::tvec2& x, U a, const detail::tvec2& y, U b, const detail::tvec2& z, U c ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( const detail::tvec3& x, U a, const detail::tvec3& y, U b, const detail::tvec3& z, U c ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); return Result; } // Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( const detail::tvec4& x, U a, const detail::tvec4& y, U b, const detail::tvec4& z, U c ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); return Result; } @@ -709,17 +709,17 @@ GLM_FUNC_QUALIFIER U associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c, - const detail::tvec2& w, const detail::tvec2& d + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c, + const detail::tvec2& w, const detail::tvec2& d ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) { T Test1 = max(x[i], y[i]); T Test2 = max(z[i], w[i]); @@ -731,17 +731,17 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c, - const detail::tvec3& w, const detail::tvec3& d + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c, + const detail::tvec3& w, const detail::tvec3& d ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) { T Test1 = max(x[i], y[i]); T Test2 = max(z[i], w[i]); @@ -753,17 +753,17 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c, - const detail::tvec4& w, const detail::tvec4& d + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c, + const detail::tvec4& w, const detail::tvec4& d ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) { T Test1 = max(x[i], y[i]); T Test2 = max(z[i], w[i]); @@ -775,20 +775,20 @@ GLM_FUNC_QUALIFIER detail::tvec4 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b, - T z, const detail::tvec2& c, - T w, const detail::tvec2& d + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c, + T w, const detail::tvec2& d ) { T Test1 = max(x, y); T Test2 = max(z, w); - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) { U Result1 = x > y ? a[i] : b[i]; U Result2 = z > w ? c[i] : d[i]; @@ -798,20 +798,20 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b, - T z, const detail::tvec3& c, - T w, const detail::tvec3& d + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c, + T w, const detail::tvec3& d ) { T Test1 = max(x, y); T Test2 = max(z, w); - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) { U Result1 = x > y ? a[i] : b[i]; U Result2 = z > w ? c[i] : d[i]; @@ -821,20 +821,20 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b, - T z, const detail::tvec4& c, - T w, const detail::tvec4& d + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c, + T w, const detail::tvec4& d ) { T Test1 = max(x, y); T Test2 = max(z, w); - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) { U Result1 = x > y ? a[i] : b[i]; U Result2 = z > w ? c[i] : d[i]; @@ -844,8 +844,8 @@ GLM_FUNC_QUALIFIER detail::tvec4 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax ( const detail::tvec2& x, U a, const detail::tvec2& y, U b, @@ -853,8 +853,8 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMax const detail::tvec2& w, U d ) { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < Result.length(); ++i) { T Test1 = max(x[i], y[i]); T Test2 = max(z[i], w[i]);; @@ -866,8 +866,8 @@ GLM_FUNC_QUALIFIER detail::tvec2 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax ( const detail::tvec3& x, U a, const detail::tvec3& y, U b, @@ -875,8 +875,8 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMax const detail::tvec3& w, U d ) { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < Result.length(); ++i) { T Test1 = max(x[i], y[i]); T Test2 = max(z[i], w[i]);; @@ -888,8 +888,8 @@ GLM_FUNC_QUALIFIER detail::tvec3 associatedMax } // Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax ( const detail::tvec4& x, U a, const detail::tvec4& y, U b, @@ -897,8 +897,8 @@ GLM_FUNC_QUALIFIER detail::tvec4 associatedMax const detail::tvec4& w, U d ) { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < Result.length(); ++i) { T Test1 = max(x[i], y[i]); T Test2 = max(z[i], w[i]);; diff --git a/glm/gtx/color_cast.hpp b/glm/gtx/color_cast.hpp deleted file mode 100644 index e3beca7b..00000000 --- a/glm/gtx/color_cast.hpp +++ /dev/null @@ -1,143 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_color_cast -/// @file glm/gtx/color_cast.hpp -/// @date 2007-06-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_number_precision (dependence) -/// -/// @defgroup gtx_color_cast GLM_GTX_color_cast -/// @ingroup gtx -/// -/// @brief Conversion between two color types. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_color_cast -#define GLM_GTX_color_cast GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/number_precision.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_color_cast extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_color_cast - /// @{ - - //! Conversion of a floating value into a 8bit unsigned int value. - /// @see gtx_color_cast - template - GLM_DEPRECATED uint8 u8channel_cast(valType a); - - template - GLM_DEPRECATED uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED f32 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED f64 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - - template - GLM_DEPRECATED f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template - GLM_DEPRECATED f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - - /// @} -}//namespace glm - -#include "color_cast.inl" - -#endif//GLM_GTX_color_cast diff --git a/glm/gtx/color_cast.inl b/glm/gtx/color_cast.inl deleted file mode 100644 index 3af7aff3..00000000 --- a/glm/gtx/color_cast.inl +++ /dev/null @@ -1,733 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-06-21 -// Updated : 2007-08-03 -// Licence : This source is under MIT License -// File : glm/gtx/color_cast.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER uint8 u8channel_cast(T a) - { - return static_cast(a * T(255)); - } - - template - GLM_FUNC_QUALIFIER uint16 u16channel_cast(T a) - { - return static_cast(a * T(65535)); - } - - template - GLM_FUNC_QUALIFIER uint32 u32_rgbx_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 0; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 16; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_xrgb_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 24; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_bgrx_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 16; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_xbgr_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 24; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.w * detail::tvec3::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_rgba_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 0; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_argb_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 24; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_bgra_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 0; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_abgr_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 24; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_rgbx_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 0; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 32; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u32_xrgb_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 48; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u32_bgrx_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 32; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u32_xbgr_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 48; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.w * detail::tvec3::value_type(65535)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_rgba_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 0; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_argb_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 48; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_bgra_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 0; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_abgr_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 48; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16 f16_channel_cast(uint32 color) - { - return f16(static_cast(color >> 0) / static_cast(255)); - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_rgbx_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_xrgb_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_bgrx_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_xbgr_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_rgba_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_argb_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_bgra_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_abgr_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER float f32_channel_cast(uint8 color) - { - return static_cast(color >> 0) / static_cast(255); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER double f64_channel_cast(uint8 color) - { - return static_cast(color >> 0) / static_cast(255); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::half f16_channel_cast(uint16 color) - { - return detail::half(static_cast(color >> 0) / static_cast(65535)); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_rgbx_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_xrgb_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_bgrx_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_xbgr_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_rgba_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_argb_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_bgra_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_abgr_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER float f32_channel_cast(uint16 color) - { - return static_cast(color >> 0) / static_cast(65535); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER double f64_channel_cast(uint16 color) - { - return static_cast(color >> 0) / static_cast(65535); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } -}//namespace glm diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index 73b42d04..6c32cfb9 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -52,41 +52,41 @@ namespace glm /// Converts a color from HSV color space to its color in RGB color space. /// @see gtx_color_space - template - detail::tvec3 rgbColor( - detail::tvec3 const & hsvValue); + template + detail::tvec3 rgbColor( + detail::tvec3 const & hsvValue); /// Converts a color from RGB color space to its color in HSV color space. /// @see gtx_color_space - template - detail::tvec3 hsvColor( - detail::tvec3 const & rgbValue); + template + detail::tvec3 hsvColor( + detail::tvec3 const & rgbValue); /// Build a saturation matrix. /// @see gtx_color_space - template - detail::tmat4x4 saturation( - valType const s); + template + detail::tmat4x4 saturation( + T const s); /// Modify the saturation of a color. /// @see gtx_color_space - template - detail::tvec3 saturation( - valType const s, - detail::tvec3 const & color); + template + detail::tvec3 saturation( + T const s, + detail::tvec3 const & color); /// Modify the saturation of a color. /// @see gtx_color_space - template - detail::tvec4 saturation( - valType const s, - detail::tvec4 const & color); + template + detail::tvec4 saturation( + T const s, + detail::tvec4 const & color); /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. /// @see gtx_color_space - template - valType luminosity( - detail::tvec3 const & color); + template + T luminosity( + detail::tvec3 const & color); /// @} }//namespace glm diff --git a/glm/gtx/color_space.inl b/glm/gtx/color_space.inl index 03aeaf0d..8e817d7f 100644 --- a/glm/gtx/color_space.inl +++ b/glm/gtx/color_space.inl @@ -9,7 +9,7 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER detail::tvec3 rgbColor(const detail::tvec3& hsvColor) { detail::tvec3 hsv = hsvColor; @@ -66,7 +66,7 @@ namespace glm return rgbColor; } - template + template GLM_FUNC_QUALIFIER detail::tvec3 hsvColor(const detail::tvec3& rgbColor) { detail::tvec3 hsv = rgbColor; @@ -75,7 +75,7 @@ namespace glm float Delta = Max - Min; hsv.z = Max; - + if(Max != static_cast(0)) { hsv.y = Delta / hsv.z; @@ -90,7 +90,7 @@ namespace glm else // between magenta & cyan h = static_cast(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta; - + if(h < T(0)) hsv.x = h + T(360); else @@ -106,7 +106,7 @@ namespace glm return hsv; } - template + template GLM_FUNC_QUALIFIER detail::tmat4x4 saturation(const T s) { detail::tvec3 rgbw = detail::tvec3(T(0.2126), T(0.7152), T(0.0722)); @@ -128,19 +128,19 @@ namespace glm return result; } - template + template GLM_FUNC_QUALIFIER detail::tvec3 saturation(const T s, const detail::tvec3& color) { return detail::tvec3(saturation(s) * detail::tvec4(color, T(0))); } - template + template GLM_FUNC_QUALIFIER detail::tvec4 saturation(const T s, const detail::tvec4& color) { return saturation(s) * color; } - template + template GLM_FUNC_QUALIFIER T luminosity(const detail::tvec3& color) { const detail::tvec3 tmp = detail::tvec3(0.33, 0.59, 0.11); diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index a4fecb91..1ab96149 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -52,29 +52,29 @@ namespace glm /// Convert a color from RGB color space to YCoCg color space. /// @see gtx_color_space_YCoCg - template - detail::tvec3 rgb2YCoCg( - detail::tvec3 const & rgbColor); + template + detail::tvec3 rgb2YCoCg( + detail::tvec3 const & rgbColor); /// Convert a color from YCoCg color space to RGB color space. /// @see gtx_color_space_YCoCg - template - detail::tvec3 YCoCg2rgb( - detail::tvec3 const & YCoCgColor); + template + detail::tvec3 YCoCg2rgb( + detail::tvec3 const & YCoCgColor); /// 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 gtx_color_space_YCoCg - template - detail::tvec3 rgb2YCoCgR( - detail::tvec3 const & rgbColor); + template + detail::tvec3 rgb2YCoCgR( + detail::tvec3 const & rgbColor); /// 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 gtx_color_space_YCoCg - template - detail::tvec3 YCoCgR2rgb( - detail::tvec3 const & YCoCgColor); + template + detail::tvec3 YCoCgR2rgb( + detail::tvec3 const & YCoCgColor); /// @} }//namespace glm diff --git a/glm/gtx/color_space_YCoCg.inl b/glm/gtx/color_space_YCoCg.inl index 08d84407..ce578374 100644 --- a/glm/gtx/color_space_YCoCg.inl +++ b/glm/gtx/color_space_YCoCg.inl @@ -9,55 +9,55 @@ namespace glm { - template - GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCg + template + GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCg ( - detail::tvec3 const & rgbColor + detail::tvec3 const & rgbColor ) { - detail::tvec3 result; - result.x/*Y */ = rgbColor.r / valType(4) + rgbColor.g / valType(2) + rgbColor.b / valType(4); - result.y/*Co*/ = rgbColor.r / valType(2) + rgbColor.g * valType(0) - rgbColor.b / valType(2); - result.z/*Cg*/ = - rgbColor.r / valType(4) + rgbColor.g / valType(2) - rgbColor.b / valType(4); + detail::tvec3 result; + 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.z/*Cg*/ = - rgbColor.r / T(4) + rgbColor.g / T(2) - rgbColor.b / T(4); return result; } - template - GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCgR + template + GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCgR ( - detail::tvec3 const & rgbColor + detail::tvec3 const & rgbColor ) { - detail::tvec3 result; - result.x/*Y */ = rgbColor.g / valType(2) + (rgbColor.r + rgbColor.b) / valType(4); + detail::tvec3 result; + result.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4); result.y/*Co*/ = rgbColor.r - rgbColor.b; - result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / valType(2); + result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / T(2); return result; } - template - GLM_FUNC_QUALIFIER detail::tvec3 YCoCg2rgb + template + GLM_FUNC_QUALIFIER detail::tvec3 YCoCg2rgb ( - detail::tvec3 const & YCoCgColor + detail::tvec3 const & YCoCgColor ) { - detail::tvec3 result; + detail::tvec3 result; result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; result.g = YCoCgColor.x + YCoCgColor.z; result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z; return result; } - template - GLM_FUNC_QUALIFIER detail::tvec3 YCoCgR2rgb + template + GLM_FUNC_QUALIFIER detail::tvec3 YCoCgR2rgb ( - detail::tvec3 const & YCoCgRColor + detail::tvec3 const & YCoCgRColor ) { - detail::tvec3 result; - valType tmp = YCoCgRColor.x - (YCoCgRColor.z / valType(2)); + detail::tvec3 result; + T tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2)); result.g = YCoCgRColor.z + tmp; - result.b = tmp - (YCoCgRColor.y / valType(2)); + result.b = tmp - (YCoCgRColor.y / T(2)); result.r = result.b + YCoCgRColor.y; return result; } diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 68dadccc..8b4aaa3b 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -62,29 +62,29 @@ namespace glm /// @{ template 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 GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& 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 GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& 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 GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& 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 GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& 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 GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::tvec3& 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 GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::tvec4& 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 GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& 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 GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& 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 GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& 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 GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& 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 GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::tvec3& 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 GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::tvec4& 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 GLM_FUNC_QUALIFIER T slerp(detail::tquat const & x, detail::tquat const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions. + template GLM_FUNC_QUALIFIER T slerp(detail::tquat const & x, detail::tquat const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions. - template 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 GLM_FUNC_QUALIFIER detail::tvec2 saturate(const detail::tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 saturate(const detail::tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 saturate(const detail::tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template 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 GLM_FUNC_QUALIFIER detail::tvec2 saturate(const detail::tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 saturate(const detail::tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 saturate(const detail::tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template 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 GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& 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 GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& 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 GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& 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 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 GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& 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 GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& 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 GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& 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 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 detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec4 isfinite(const detail::tvec4& 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 detail::tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) diff --git a/glm/gtx/compatibility.inl b/glm/gtx/compatibility.inl index 073c6941..b01defcf 100644 --- a/glm/gtx/compatibility.inl +++ b/glm/gtx/compatibility.inl @@ -27,30 +27,30 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER detail::tvec2 isfinite( - detail::tvec2 const & x) + template + GLM_FUNC_QUALIFIER detail::tvec2 isfinite( + detail::tvec2 const & x) { - return detail::tvec2( + return detail::tvec2( isfinite(x.x), isfinite(x.y)); } - template - GLM_FUNC_QUALIFIER detail::tvec3 isfinite( - detail::tvec3 const & x) + template + GLM_FUNC_QUALIFIER detail::tvec3 isfinite( + detail::tvec3 const & x) { - return detail::tvec3( + return detail::tvec3( isfinite(x.x), isfinite(x.y), isfinite(x.z)); } - template - GLM_FUNC_QUALIFIER detail::tvec4 isfinite( - detail::tvec4 const & x) + template + GLM_FUNC_QUALIFIER detail::tvec4 isfinite( + detail::tvec4 const & x) { - return detail::tvec4( + return detail::tvec4( isfinite(x.x), isfinite(x.y), isfinite(x.z), diff --git a/glm/gtx/extend.inl b/glm/gtx/extend.inl index e159987c..987788f7 100644 --- a/glm/gtx/extend.inl +++ b/glm/gtx/extend.inl @@ -20,34 +20,34 @@ namespace glm return Origin + (Source - Origin) * Distance; } - template - GLM_FUNC_QUALIFIER detail::tvec2 extend + template + GLM_FUNC_QUALIFIER detail::tvec2 extend ( - detail::tvec2 const & Origin, - detail::tvec2 const & Source, - valType const & Distance + detail::tvec2 const & Origin, + detail::tvec2 const & Source, + T const & Distance ) { return Origin + (Source - Origin) * Distance; } - template - GLM_FUNC_QUALIFIER detail::tvec3 extend + template + GLM_FUNC_QUALIFIER detail::tvec3 extend ( - detail::tvec3 const & Origin, - detail::tvec3 const & Source, - valType const & Distance + detail::tvec3 const & Origin, + detail::tvec3 const & Source, + T const & Distance ) { return Origin + (Source - Origin) * Distance; } - template - GLM_FUNC_QUALIFIER detail::tvec4 extend + template + GLM_FUNC_QUALIFIER detail::tvec4 extend ( - detail::tvec4 const & Origin, - detail::tvec4 const & Source, - valType const & Distance + detail::tvec4 const & Origin, + detail::tvec4 const & Source, + T const & Distance ) { return Origin + (Source - Origin) * Distance; diff --git a/test/gtx/CMakeLists.txt b/test/gtx/CMakeLists.txt index ce0ef6f8..0c48ccbe 100644 --- a/test/gtx/CMakeLists.txt +++ b/test/gtx/CMakeLists.txt @@ -1,10 +1,37 @@ +glmCreateTestGTC(gtx_associated_min_max) glmCreateTestGTC(gtx_bit) +glmCreateTestGTC(gtx_closest_point) +glmCreateTestGTC(gtx_color_space_YCoCg) +glmCreateTestGTC(gtx_color_space) +glmCreateTestGTC(gtx_compatibility) +glmCreateTestGTC(gtx_component_wise) glmCreateTestGTC(gtx_euler_angle) +glmCreateTestGTC(gtx_extend) +glmCreateTestGTC(gtx_extented_min_max) +glmCreateTestGTC(gtx_fast_exponential) +glmCreateTestGTC(gtx_fast_square_root) +glmCreateTestGTC(gtx_fast_trigonometry) glmCreateTestGTC(gtx_gradient_paint) +glmCreateTestGTC(gtx_handed_coordinate_space) +glmCreateTestGTC(gtx_inertia) glmCreateTestGTC(gtx_integer) +glmCreateTestGTC(gtx_intersect) +glmCreateTestGTC(gtx_log_base) +glmCreateTestGTC(gtx_matrix_cross_product) glmCreateTestGTC(gtx_matrix_interpolation) +glmCreateTestGTC(gtx_matrix_major_storage) +glmCreateTestGTC(gtx_matrix_operation) glmCreateTestGTC(gtx_matrix_query) glmCreateTestGTC(gtx_multiple) +glmCreateTestGTC(gtx_norm) +glmCreateTestGTC(gtx_normal) +glmCreateTestGTC(gtx_normalize_dot) +glmCreateTestGTC(gtx_number_precision) +glmCreateTestGTC(gtx_orthonormalize) +glmCreateTestGTC(gtx_optimum_pow) +glmCreateTestGTC(gtx_perpendicular) +glmCreateTestGTC(gtx_polar_coordinates) +glmCreateTestGTC(gtx_projection) glmCreateTestGTC(gtx_quaternion) glmCreateTestGTC(gtx_dual_quaternion) glmCreateTestGTC(gtx_rotate_normalized_axis) @@ -12,6 +39,7 @@ glmCreateTestGTC(gtx_rotate_vector) glmCreateTestGTC(gtx_scalar_relational) glmCreateTestGTC(gtx_simd_vec4) glmCreateTestGTC(gtx_simd_mat4) +glmCreateTestGTC(gtx_spline) glmCreateTestGTC(gtx_string_cast) glmCreateTestGTC(gtx_vector_angle) glmCreateTestGTC(gtx_vector_query) diff --git a/test/gtx/gtx_associated_min_max.cpp b/test/gtx/gtx_associated_min_max.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_associated_min_max.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_closest_point.cpp b/test/gtx/gtx_closest_point.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_closest_point.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_color_space.cpp b/test/gtx/gtx_color_space.cpp new file mode 100644 index 00000000..13c7f225 --- /dev/null +++ b/test/gtx/gtx_color_space.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/color_space.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_color_space_YCoCg.cpp b/test/gtx/gtx_color_space_YCoCg.cpp new file mode 100644 index 00000000..b20f63d3 --- /dev/null +++ b/test/gtx/gtx_color_space_YCoCg.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/color_space_YCoCg.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_compatibility.cpp b/test/gtx/gtx_compatibility.cpp new file mode 100644 index 00000000..c23ff1c5 --- /dev/null +++ b/test/gtx/gtx_compatibility.cpp @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/compatibility.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_component_wise.cpp b/test/gtx/gtx_component_wise.cpp new file mode 100644 index 00000000..c1964829 --- /dev/null +++ b/test/gtx/gtx_component_wise.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/component_wise.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_extend.cpp b/test/gtx/gtx_extend.cpp new file mode 100644 index 00000000..12cb5fd1 --- /dev/null +++ b/test/gtx/gtx_extend.cpp @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/extend.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_extented_min_max.cpp b/test/gtx/gtx_extented_min_max.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_extented_min_max.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_fast_exponential.cpp b/test/gtx/gtx_fast_exponential.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_fast_exponential.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_fast_square_root.cpp b/test/gtx/gtx_fast_square_root.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_fast_square_root.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_fast_trigonometry.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_handed_coordinate_space.cpp b/test/gtx/gtx_handed_coordinate_space.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_handed_coordinate_space.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_inertia.cpp b/test/gtx/gtx_inertia.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_inertia.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_int_10_10_10_2.cpp b/test/gtx/gtx_int_10_10_10_2.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_int_10_10_10_2.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_intersect.cpp b/test/gtx/gtx_intersect.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_intersect.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_log_base.cpp b/test/gtx/gtx_log_base.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_log_base.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_matrix_cross_product.cpp b/test/gtx/gtx_matrix_cross_product.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_matrix_cross_product.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_matrix_major_storage.cpp b/test/gtx/gtx_matrix_major_storage.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_matrix_major_storage.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_matrix_operation.cpp b/test/gtx/gtx_matrix_operation.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_matrix_operation.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_mixed_product.cpp b/test/gtx/gtx_mixed_product.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_mixed_product.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_norm.cpp b/test/gtx/gtx_norm.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_norm.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_normal.cpp b/test/gtx/gtx_normal.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_normal.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_normalize_dot.cpp b/test/gtx/gtx_normalize_dot.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_normalize_dot.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_number_precision.cpp b/test/gtx/gtx_number_precision.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_number_precision.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_optimum_pow.cpp b/test/gtx/gtx_optimum_pow.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_optimum_pow.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_orthonormalize.cpp b/test/gtx/gtx_orthonormalize.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_orthonormalize.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_perpendicular.cpp b/test/gtx/gtx_perpendicular.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_perpendicular.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_polar_coordinates.cpp b/test/gtx/gtx_polar_coordinates.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_polar_coordinates.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_projection.cpp b/test/gtx/gtx_projection.cpp new file mode 100644 index 00000000..65ae56c8 --- /dev/null +++ b/test/gtx/gtx_projection.cpp @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +} diff --git a/test/gtx/gtx_spline.cpp b/test/gtx/gtx_spline.cpp new file mode 100644 index 00000000..0f410b9a --- /dev/null +++ b/test/gtx/gtx_spline.cpp @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2013-10-25 +// Updated : 2013-10-25 +// Licence : This source is under MIT licence +// File : test/gtx/associated_min_max.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +int main() +{ + int Error(0); + + return Error; +}