From 947b07cbc421efffa81c214c2fe294abb8fc3725 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Fri, 30 Dec 2016 01:23:29 +0100 Subject: [PATCH] remove template alias for more compiler support and simplified swizzle expression implementation #584 --- glm/detail/_noise.hpp | 18 +- glm/detail/_swizzle.hpp | 2 +- glm/detail/_swizzle_func.hpp | 1291 +++++++++-------- glm/detail/_vectorize.hpp | 48 +- glm/detail/func_common.inl | 56 +- glm/detail/func_common_simd.inl | 76 +- glm/detail/func_exponential.inl | 2 +- glm/detail/func_exponential_simd.inl | 8 +- glm/detail/func_geometric.hpp | 6 +- glm/detail/func_geometric.inl | 8 +- glm/detail/func_geometric_simd.inl | 24 +- glm/detail/func_integer.inl | 10 +- glm/detail/func_integer_simd.inl | 4 +- glm/detail/func_matrix.inl | 38 +- glm/detail/func_matrix_simd.inl | 6 +- glm/detail/type_mat2x2.hpp | 8 +- glm/detail/type_mat2x2.inl | 6 +- glm/detail/type_mat2x3.hpp | 8 +- glm/detail/type_mat2x3.inl | 2 +- glm/detail/type_mat2x4.hpp | 8 +- glm/detail/type_mat2x4.inl | 2 +- glm/detail/type_mat3x2.hpp | 10 +- glm/detail/type_mat3x2.inl | 6 +- glm/detail/type_mat3x3.hpp | 10 +- glm/detail/type_mat3x3.inl | 6 +- glm/detail/type_mat3x4.hpp | 10 +- glm/detail/type_mat3x4.inl | 6 +- glm/detail/type_mat4x2.hpp | 12 +- glm/detail/type_mat4x2.inl | 8 +- glm/detail/type_mat4x3.hpp | 12 +- glm/detail/type_mat4x3.inl | 8 +- glm/detail/type_mat4x4.hpp | 12 +- glm/detail/type_mat4x4.inl | 8 +- glm/detail/type_vec.hpp | 128 +- glm/detail/type_vec2.hpp | 2 +- glm/detail/type_vec3.hpp | 2 +- glm/detail/type_vec4.hpp | 2 +- glm/detail/type_vec4_simd.inl | 152 +- glm/fwd.hpp | 336 ++--- glm/gtc/color_space.inl | 16 +- glm/gtc/epsilon.inl | 12 +- glm/gtc/functions.hpp | 6 +- glm/gtc/functions.inl | 8 +- glm/gtc/integer.inl | 12 +- glm/gtc/matrix_inverse.inl | 14 +- glm/gtc/matrix_transform.hpp | 48 +- glm/gtc/matrix_transform.inl | 72 +- glm/gtc/noise.inl | 838 +++++------ glm/gtc/packing.hpp | 8 +- glm/gtc/quaternion.hpp | 38 +- glm/gtc/quaternion.inl | 86 +- glm/gtc/quaternion_simd.inl | 10 +- glm/gtc/random.hpp | 8 +- glm/gtc/random.inl | 44 +- glm/gtc/round.inl | 4 +- glm/gtc/type_aligned.hpp | 150 +- glm/gtc/type_precision.hpp | 88 +- glm/gtc/type_ptr.hpp | 6 +- glm/gtc/type_ptr.inl | 30 +- glm/gtx/associated_min_max.hpp | 4 +- glm/gtx/associated_min_max.inl | 4 +- glm/gtx/closest_point.hpp | 16 +- glm/gtx/closest_point.inl | 24 +- glm/gtx/color_encoding.hpp | 8 +- glm/gtx/color_encoding.inl | 32 +- glm/gtx/color_space.hpp | 18 +- glm/gtx/color_space.inl | 24 +- glm/gtx/color_space_YCoCg.hpp | 16 +- glm/gtx/color_space_YCoCg.inl | 44 +- glm/gtx/common.inl | 26 +- glm/gtx/compatibility.hpp | 56 +- glm/gtx/compatibility.inl | 24 +- glm/gtx/dual_quaternion.hpp | 10 +- glm/gtx/dual_quaternion.inl | 22 +- glm/gtx/euler_angles.hpp | 4 +- glm/gtx/euler_angles.inl | 4 +- glm/gtx/extend.inl | 18 +- glm/gtx/fast_square_root.inl | 4 +- glm/gtx/gradient_paint.hpp | 12 +- glm/gtx/gradient_paint.inl | 18 +- glm/gtx/handed_coordinate_space.hpp | 12 +- glm/gtx/handed_coordinate_space.inl | 12 +- glm/gtx/hash.hpp | 16 +- glm/gtx/hash.inl | 26 +- glm/gtx/integer.inl | 18 +- glm/gtx/intersect.hpp | 6 +- glm/gtx/intersect.inl | 18 +- glm/gtx/io.hpp | 8 +- glm/gtx/io.inl | 8 +- glm/gtx/matrix_cross_product.hpp | 4 +- glm/gtx/matrix_cross_product.inl | 4 +- glm/gtx/matrix_decompose.hpp | 2 +- glm/gtx/matrix_decompose.inl | 20 +- glm/gtx/matrix_interpolation.hpp | 4 +- glm/gtx/matrix_interpolation.inl | 8 +- glm/gtx/matrix_major_storage.hpp | 36 +- glm/gtx/matrix_major_storage.inl | 36 +- glm/gtx/matrix_operation.hpp | 18 +- glm/gtx/matrix_operation.inl | 18 +- glm/gtx/matrix_transform_2d.hpp | 4 +- glm/gtx/matrix_transform_2d.inl | 4 +- glm/gtx/mixed_product.hpp | 6 +- glm/gtx/mixed_product.inl | 6 +- glm/gtx/norm.hpp | 18 +- glm/gtx/norm.inl | 18 +- glm/gtx/normal.hpp | 8 +- glm/gtx/normal.inl | 8 +- glm/gtx/orthonormalize.hpp | 2 +- glm/gtx/orthonormalize.inl | 2 +- glm/gtx/polar_coordinates.hpp | 8 +- glm/gtx/polar_coordinates.inl | 14 +- glm/gtx/quaternion.hpp | 20 +- glm/gtx/quaternion.inl | 22 +- glm/gtx/range.hpp | 8 +- glm/gtx/rotate_normalized_axis.hpp | 6 +- glm/gtx/rotate_normalized_axis.inl | 10 +- glm/gtx/rotate_vector.hpp | 50 +- glm/gtx/rotate_vector.inl | 72 +- glm/gtx/std_based_type.hpp | 16 +- glm/gtx/string_cast.inl | 32 +- glm/gtx/transform.hpp | 6 +- glm/gtx/transform.inl | 6 +- glm/gtx/transform2.hpp | 8 +- glm/gtx/transform2.inl | 10 +- glm/gtx/vec_swizzle.hpp | 1936 +++++++++++++------------- glm/gtx/vector_angle.hpp | 10 +- glm/gtx/vector_angle.inl | 10 +- glm/gtx/vector_query.inl | 40 +- glm/gtx/wrap.inl | 8 +- glm/simd/matrix.h | 6 +- test/gtc/gtc_integer.cpp | 4 +- test/gtx/gtx_io.cpp | 36 +- 132 files changed, 3462 insertions(+), 3473 deletions(-) diff --git a/glm/detail/_noise.hpp b/glm/detail/_noise.hpp index b73e08dc..8e3a51e5 100644 --- a/glm/detail/_noise.hpp +++ b/glm/detail/_noise.hpp @@ -24,19 +24,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec2 permute(tvec2 const & x) + GLM_FUNC_QUALIFIER vec<2, T, P> permute(vec<2, T, P> const & x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } template - GLM_FUNC_QUALIFIER tvec3 permute(tvec3 const & x) + GLM_FUNC_QUALIFIER vec<3, T, P> permute(vec<3, T, P> const & x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } template - GLM_FUNC_QUALIFIER tvec4 permute(tvec4 const & x) + GLM_FUNC_QUALIFIER vec<4, T, P> permute(vec<4, T, P> const & x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } @@ -54,19 +54,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec2 taylorInvSqrt(tvec2 const & r) + GLM_FUNC_QUALIFIER vec<2, T, P> taylorInvSqrt(vec<2, T, P> const & r) { return T(1.79284291400159) - T(0.85373472095314) * r; } template - GLM_FUNC_QUALIFIER tvec3 taylorInvSqrt(tvec3 const & r) + GLM_FUNC_QUALIFIER vec<3, T, P> taylorInvSqrt(vec<3, T, P> const & r) { return T(1.79284291400159) - T(0.85373472095314) * r; } template - GLM_FUNC_QUALIFIER tvec4 taylorInvSqrt(tvec4 const & r) + GLM_FUNC_QUALIFIER vec<4, T, P> taylorInvSqrt(vec<4, T, P> const & r) { return T(1.79284291400159) - T(0.85373472095314) * r; } @@ -79,19 +79,19 @@ namespace detail */ template - GLM_FUNC_QUALIFIER tvec2 fade(tvec2 const & t) + GLM_FUNC_QUALIFIER vec<2, T, P> fade(vec<2, T, P> const & t) { return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); } template - GLM_FUNC_QUALIFIER tvec3 fade(tvec3 const & t) + GLM_FUNC_QUALIFIER vec<3, T, P> fade(vec<3, T, P> const & t) { return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); } template - GLM_FUNC_QUALIFIER tvec4 fade(tvec4 const & t) + GLM_FUNC_QUALIFIER vec<4, T, P> fade(vec<4, T, P> const & t) { return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); } diff --git a/glm/detail/_swizzle.hpp b/glm/detail/_swizzle.hpp index d74e4907..5e8b0d0b 100644 --- a/glm/detail/_swizzle.hpp +++ b/glm/detail/_swizzle.hpp @@ -48,7 +48,7 @@ namespace detail Template parameters: ValueType = type of scalar values (e.g. float, double) - VecType = class the swizzle is applies to (e.g. tvec3) + VecType = class the swizzle is applies to (e.g. vec<3, float>) N = number of components in the vector (e.g. 3) E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec diff --git a/glm/detail/_swizzle_func.hpp b/glm/detail/_swizzle_func.hpp index 4b37edbb..3f166550 100644 --- a/glm/detail/_swizzle_func.hpp +++ b/glm/detail/_swizzle_func.hpp @@ -3,694 +3,683 @@ #pragma once -#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ - SWIZZLED_TYPE A ## B() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B); \ +#define GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, CONST, A, B) \ + vec<2, T, P> A ## B() CONST \ + { \ + return vec<2, T, P>(this->A, this->B); \ } -#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ - SWIZZLED_TYPE A ## B ## C() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C); \ +#define GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, CONST, A, B, C) \ + vec<3, T, P> A ## B ## C() CONST \ + { \ + return vec<3, T, P>(this->A, this->B, this->C); \ } -#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ - SWIZZLED_TYPE A ## B ## C ## D() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ +#define GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, CONST, A, B, C, D) \ + vec<4, T, P> A ## B ## C ## D() CONST \ + { \ + return vec<4, T, P>(this->A, this->B, this->C, this->D); \ } -#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ - template \ - SWIZZLED_TYPE CLASS_TYPE::A ## B() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B); \ +#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(T, P, S, CONST, A, B) \ + template \ + vec vec::A ## B() CONST \ + { \ + return vec<2, T, P>(this->A, this->B); \ } -#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ - template \ - SWIZZLED_TYPE CLASS_TYPE::A ## B ## C() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C); \ +#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(T, P, S, CONST, A, B, C) \ + template \ + vec<3, T, P> vec::A ## B ## C() CONST \ + { \ + return vec(this->A, this->B, this->C); \ } -#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ - template \ - SWIZZLED_TYPE CLASS_TYPE::A ## B ## C ## D() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ +#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(T, P, S, CONST, A, B, C, D) \ + template \ + vec<4, T, P> vec::A ## B ## C ## D() CONST \ + { \ + return vec<4, T, P>(this->A, this->B, this->C, this->D); \ } #define GLM_MUTABLE -#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, 2, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, 2, GLM_MUTABLE, B, A) -#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t) +#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(T, P) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, x, y) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, r, g) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(T, P, s, t) -//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2) +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, B) -#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, GLM_MUTABLE, C, B, A) -#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A) +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(T, P, A, B, C) -#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, P) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, x, y, z) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, r, g, b) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, P, s, t, p) -#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, p) +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, GLM_MUTABLE, D, C) -//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3) +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, , D, C, B) -#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C) +#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, , D, B, C, A) -#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B) +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) -#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A) +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, P) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, x, y, z, w) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, r, g, b, a) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, P, s, t, p, q) -#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(T, P, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B) -#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q) +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(T, P, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B) -//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4) +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(T, P, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B) -#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, A, B) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(T, P, A, B) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(T, P, A, B) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(T, P, A, B) -#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, x, y) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, r, g) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(T, P, s, t) -#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, C) -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B) +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, C) -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t) +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, C) -//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4) +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(T, P, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(T, P, A, B, C) -#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, x, y, z) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, r, g, b) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, P, s, t, p) -#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(T, P, const, D, D) -#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, A, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, B, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, C, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(T, P, const, D, D, D) -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, A, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, B, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, C, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(T, P, const, D, D, D, D) -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p) +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(T, P, A, B, C, D) -//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4) +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, x, y, z, w) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, r, g, b, a) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, P, s, t, p, q) -#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D) - -#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D) - -#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q) - -//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4) diff --git a/glm/detail/_vectorize.hpp b/glm/detail/_vectorize.hpp index 23140819..8e77a05e 100644 --- a/glm/detail/_vectorize.hpp +++ b/glm/detail/_vectorize.hpp @@ -17,36 +17,36 @@ namespace detail template struct functor1<1, R, T, P> { - GLM_FUNC_QUALIFIER static tvec1 call(R (*Func) (T x), tvec1 const & v) + GLM_FUNC_QUALIFIER static vec<1, R, P> call(R (*Func) (T x), vec<1, T, P> const & v) { - return tvec1(Func(v.x)); + return vec<1, R, P>(Func(v.x)); } }; template struct functor1<2, R, T, P> { - GLM_FUNC_QUALIFIER static tvec2 call(R (*Func) (T x), tvec2 const & v) + GLM_FUNC_QUALIFIER static vec<2, R, P> call(R (*Func) (T x), vec<2, T, P> const & v) { - return tvec2(Func(v.x), Func(v.y)); + return vec<2, R, P>(Func(v.x), Func(v.y)); } }; template struct functor1<3, R, T, P> { - GLM_FUNC_QUALIFIER static tvec3 call(R (*Func) (T x), tvec3 const & v) + GLM_FUNC_QUALIFIER static vec<3, R, P> call(R (*Func) (T x), vec<3, T, P> const & v) { - return tvec3(Func(v.x), Func(v.y), Func(v.z)); + return vec<3, R, P>(Func(v.x), Func(v.y), Func(v.z)); } }; template struct functor1<4, R, T, P> { - GLM_FUNC_QUALIFIER static tvec4 call(R (*Func) (T x), tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, R, P> call(R (*Func) (T x), vec<4, T, P> const & v) { - return tvec4(Func(v.x), Func(v.y), Func(v.z), Func(v.w)); + return vec<4, R, P>(Func(v.x), Func(v.y), Func(v.z), Func(v.w)); } }; @@ -56,36 +56,36 @@ namespace detail template struct functor2<1, T, P> { - GLM_FUNC_QUALIFIER static tvec1 call(T (*Func) (T x, T y), tvec1 const & a, tvec1 const & b) + GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, vec<1, T, P> const & b) { - return tvec1(Func(a.x, b.x)); + return vec<1, T, P>(Func(a.x, b.x)); } }; template struct functor2<2, T, P> { - GLM_FUNC_QUALIFIER static tvec2 call(T (*Func) (T x, T y), tvec2 const & a, tvec2 const & b) + GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, vec<2, T, P> const & b) { - return tvec2(Func(a.x, b.x), Func(a.y, b.y)); + return vec<2, T, P>(Func(a.x, b.x), Func(a.y, b.y)); } }; template struct functor2<3, T, P> { - GLM_FUNC_QUALIFIER static tvec3 call(T (*Func) (T x, T y), tvec3 const & a, tvec3 const & b) + GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, vec<3, T, P> const & b) { - return tvec3(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z)); + return vec<3, T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z)); } }; template struct functor2<4, T, P> { - GLM_FUNC_QUALIFIER static tvec4 call(T (*Func) (T x, T y), tvec4 const & a, tvec4 const & b) + GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, vec<4, T, P> const & b) { - return tvec4(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w)); + return vec<4, T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w)); } }; @@ -95,36 +95,36 @@ namespace detail template struct functor2_vec_sca<1, T, P> { - GLM_FUNC_QUALIFIER static tvec1 call(T (*Func) (T x, T y), tvec1 const & a, T b) + GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, T b) { - return tvec1(Func(a.x, b)); + return vec<1, T, P>(Func(a.x, b)); } }; template struct functor2_vec_sca<2, T, P> { - GLM_FUNC_QUALIFIER static tvec2 call(T (*Func) (T x, T y), tvec2 const & a, T b) + GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, T b) { - return tvec2(Func(a.x, b), Func(a.y, b)); + return vec<2, T, P>(Func(a.x, b), Func(a.y, b)); } }; template struct functor2_vec_sca<3, T, P> { - GLM_FUNC_QUALIFIER static tvec3 call(T (*Func) (T x, T y), tvec3 const & a, T b) + GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, T b) { - return tvec3(Func(a.x, b), Func(a.y, b), Func(a.z, b)); + return vec<3, T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b)); } }; template struct functor2_vec_sca<4, T, P> { - GLM_FUNC_QUALIFIER static tvec4 call(T (*Func) (T x, T y), tvec4 const & a, T b) + GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, T b) { - return tvec4(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b)); + return vec<4, T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b)); } }; }//namespace detail diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 20af73c5..08470abd 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -326,7 +326,7 @@ namespace detail std::numeric_limits::is_iec559 || (std::numeric_limits::is_signed && std::numeric_limits::is_integer), "'sign' only accept signed inputs"); - return detail::compute_sign<1, genFIType, defaultp, vec, std::numeric_limits::is_iec559, highp>::call(tvec1(x)).x; + return detail::compute_sign<1, genFIType, defaultp, vec, std::numeric_limits::is_iec559, highp>::call(vec<1, genFIType>(x)).x; } template class vecType> @@ -425,7 +425,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType fract(genType x) { - return fract(tvec1(x)).x; + return fract(vec<1, genType>(x)).x; } template class vecType> @@ -441,10 +441,10 @@ namespace detail { # if GLM_COMPILER & GLM_COMPILER_CUDA // Another Cuda compiler bug https://github.com/g-truc/glm/issues/530 - tvec1 Result(mod(tvec1(x), y)); + vec<1, genType, defaultp> Result(mod(vec<1, genType, defaultp>(x), y)); return Result.x; # else - return mod(tvec1(x), y).x; + return mod(vec<1, genType, defaultp>(x), y).x; # endif } @@ -469,33 +469,33 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec1 modf(tvec1 const & x, tvec1 & i) + GLM_FUNC_QUALIFIER vec<1, T, P> modf(vec<1, T, P> const & x, vec<1, T, P> & i) { - return tvec1( + return vec<1, T, P>( modf(x.x, i.x)); } template - GLM_FUNC_QUALIFIER tvec2 modf(tvec2 const & x, tvec2 & i) + GLM_FUNC_QUALIFIER vec<2, T, P> modf(vec<2, T, P> const & x, vec<2, T, P> & i) { - return tvec2( + return vec<2, T, P>( modf(x.x, i.x), modf(x.y, i.y)); } template - GLM_FUNC_QUALIFIER tvec3 modf(tvec3 const & x, tvec3 & i) + GLM_FUNC_QUALIFIER vec<3, T, P> modf(vec<3, T, P> const & x, vec<3, T, P> & i) { - return tvec3( + return vec<3, T, P>( modf(x.x, i.x), modf(x.y, i.y), modf(x.z, i.z)); } template - GLM_FUNC_QUALIFIER tvec4 modf(tvec4 const & x, tvec4 & i) + GLM_FUNC_QUALIFIER vec<4, T, P> modf(vec<4, T, P> const & x, vec<4, T, P> & i) { - return tvec4( + return vec<4, T, P>( modf(x.x, i.x), modf(x.y, i.y), modf(x.z, i.z), @@ -753,40 +753,40 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec1 frexp(tvec1 const & x, tvec1 & exp) + GLM_FUNC_QUALIFIER vec<1, T, P> frexp(vec<1, T, P> const & x, vec<1, int, P> & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); - return tvec1(std::frexp(x.x, &exp.x)); + return vec<1, T, P>(std::frexp(x.x, &exp.x)); } template - GLM_FUNC_QUALIFIER tvec2 frexp(tvec2 const & x, tvec2 & exp) + GLM_FUNC_QUALIFIER vec<2, T, P> frexp(vec<2, T, P> const & x, vec<2, int, P> & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); - return tvec2( + return vec<2, T, P>( frexp(x.x, exp.x), frexp(x.y, exp.y)); } template - GLM_FUNC_QUALIFIER tvec3 frexp(tvec3 const & x, tvec3 & exp) + GLM_FUNC_QUALIFIER vec<3, T, P> frexp(vec<3, T, P> const & x, vec<3, int, P> & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); - return tvec3( + return vec<3, T, P>( frexp(x.x, exp.x), frexp(x.y, exp.y), frexp(x.z, exp.z)); } template - GLM_FUNC_QUALIFIER tvec4 frexp(tvec4 const & x, tvec4 & exp) + GLM_FUNC_QUALIFIER vec<4, T, P> frexp(vec<4, T, P> const & x, vec<4, int, P> & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); - return tvec4( + return vec<4, T, P>( frexp(x.x, exp.x), frexp(x.y, exp.y), frexp(x.z, exp.z), @@ -802,41 +802,41 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec1 ldexp(tvec1 const & x, tvec1 const & exp) + GLM_FUNC_QUALIFIER vec<1, T, P> ldexp(vec<1, T, P> const & x, vec<1, int, P> const & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); - return tvec1( + return vec<1, T, P>( ldexp(x.x, exp.x)); } template - GLM_FUNC_QUALIFIER tvec2 ldexp(tvec2 const & x, tvec2 const & exp) + GLM_FUNC_QUALIFIER vec<2, T, P> ldexp(vec<2, T, P> const & x, vec<2, int, P> const & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); - return tvec2( + return vec<2, T, P>( ldexp(x.x, exp.x), ldexp(x.y, exp.y)); } template - GLM_FUNC_QUALIFIER tvec3 ldexp(tvec3 const & x, tvec3 const & exp) + GLM_FUNC_QUALIFIER vec<3, T, P> ldexp(vec<3, T, P> const & x, vec<3, int, P> const & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); - return tvec3( + return vec<3, T, P>( ldexp(x.x, exp.x), ldexp(x.y, exp.y), ldexp(x.z, exp.z)); } template - GLM_FUNC_QUALIFIER tvec4 ldexp(tvec4 const & x, tvec4 const & exp) + GLM_FUNC_QUALIFIER vec<4, T, P> ldexp(vec<4, T, P> const & x, vec<4, int, P> const & exp) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); - return tvec4( + return vec<4, T, P>( ldexp(x.x, exp.x), ldexp(x.y, exp.y), ldexp(x.z, exp.z), diff --git a/glm/detail/func_common_simd.inl b/glm/detail/func_common_simd.inl index fc04e78b..96f7d793 100644 --- a/glm/detail/func_common_simd.inl +++ b/glm/detail/func_common_simd.inl @@ -13,9 +13,9 @@ namespace detail template struct compute_abs_vector<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_abs(v.data); return result; } @@ -24,9 +24,9 @@ namespace detail template struct compute_abs_vector<4, int, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const & v) { - tvec4 result(uninitialize); + vec<4, int, P> result(uninitialize); result.data = glm_ivec4_abs(v.data); return result; } @@ -35,9 +35,9 @@ namespace detail template struct compute_floor<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_floor(v.data); return result; } @@ -46,9 +46,9 @@ namespace detail template struct compute_ceil<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_ceil(v.data); return result; } @@ -57,9 +57,9 @@ namespace detail template struct compute_fract<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_fract(v.data); return result; } @@ -68,9 +68,9 @@ namespace detail template struct compute_round<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_round(v.data); return result; } @@ -79,9 +79,9 @@ namespace detail template struct compute_mod<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & x, tvec4 const & y) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_mod(x.data, y.data); return result; } @@ -90,9 +90,9 @@ namespace detail template struct compute_min_vector<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v1, tvec4 const & v2) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = _mm_min_ps(v1.data, v2.data); return result; } @@ -101,9 +101,9 @@ namespace detail template struct compute_min_vector<4, int32, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v1, tvec4 const & v2) + GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) { - tvec4 result(uninitialize); + vec<4, int32, P> result(uninitialize); result.data = _mm_min_epi32(v1.data, v2.data); return result; } @@ -112,9 +112,9 @@ namespace detail template struct compute_min_vector<4, uint32, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v1, tvec4 const & v2) + GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2) { - tvec4 result(uninitialize); + vec<4, uint32, P> result(uninitialize); result.data = _mm_min_epu32(v1.data, v2.data); return result; } @@ -123,9 +123,9 @@ namespace detail template struct compute_max_vector<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v1, tvec4 const & v2) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = _mm_max_ps(v1.data, v2.data); return result; } @@ -134,9 +134,9 @@ namespace detail template struct compute_max_vector<4, int32, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v1, tvec4 const & v2) + GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) { - tvec4 result(uninitialize); + vec<4, int32, P> result(uninitialize); result.data = _mm_max_epi32(v1.data, v2.data); return result; } @@ -145,9 +145,9 @@ namespace detail template struct compute_max_vector<4, uint32, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v1, tvec4 const & v2) + GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2) { - tvec4 result(uninitialize); + vec<4, uint32, P> result(uninitialize); result.data = _mm_max_epu32(v1.data, v2.data); return result; } @@ -156,9 +156,9 @@ namespace detail template struct compute_clamp_vector<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & x, tvec4 const & minVal, tvec4 const & maxVal) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & minVal, vec<4, float, P> const & maxVal) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = _mm_min_ps(_mm_max_ps(x.data, minVal.data), maxVal.data); return result; } @@ -167,9 +167,9 @@ namespace detail template struct compute_clamp_vector<4, int32, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & x, tvec4 const & minVal, tvec4 const & maxVal) + GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & x, vec<4, int32, P> const & minVal, vec<4, int32, P> const & maxVal) { - tvec4 result(uninitialize); + vec<4, int32, P> result(uninitialize); result.data = _mm_min_epi32(_mm_max_epi32(x.data, minVal.data), maxVal.data); return result; } @@ -178,9 +178,9 @@ namespace detail template struct compute_clamp_vector<4, uint32, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & x, tvec4 const & minVal, tvec4 const & maxVal) + GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & x, vec<4, uint32, P> const & minVal, vec<4, uint32, P> const & maxVal) { - tvec4 result(uninitialize); + vec<4, uint32, P> result(uninitialize); result.data = _mm_min_epu32(_mm_max_epu32(x.data, minVal.data), maxVal.data); return result; } @@ -189,12 +189,12 @@ namespace detail template struct compute_mix_vector<4, float, bool, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & x, tvec4 const & y, tvec4 const & a) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y, vec<4, bool, P> const & a) { __m128i const Load = _mm_set_epi32(-(int)a.w, -(int)a.z, -(int)a.y, -(int)a.x); __m128 const Mask = _mm_castsi128_ps(Load); - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); # if 0 && GLM_ARCH & GLM_ARCH_AVX Result.data = _mm_blendv_ps(x.data, y.data, Mask); # else @@ -207,9 +207,9 @@ namespace detail template struct compute_step_vector { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& edge, tvec4 const& x) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge, vec<4, float, P> const& x) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_step(edge.data, x.data); return result; } @@ -218,9 +218,9 @@ namespace detail template struct compute_smoothstep_vector<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& edge0, tvec4 const& edge1, tvec4 const& x) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge0, vec<4, float, P> const& edge1, vec<4, float, P> const& x) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data); return result; } diff --git a/glm/detail/func_exponential.inl b/glm/detail/func_exponential.inl index a127ee46..f04d4a8c 100644 --- a/glm/detail/func_exponential.inl +++ b/glm/detail/func_exponential.inl @@ -107,7 +107,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType log2(genType x) { - return log2(tvec1(x)).x; + return log2(vec<1, genType>(x)).x; } template class vecType> diff --git a/glm/detail/func_exponential_simd.inl b/glm/detail/func_exponential_simd.inl index bba2ceba..fb964e21 100644 --- a/glm/detail/func_exponential_simd.inl +++ b/glm/detail/func_exponential_simd.inl @@ -11,9 +11,9 @@ namespace detail template struct compute_sqrt<4, float, P, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = _mm_sqrt_ps(v.data); return result; } @@ -22,9 +22,9 @@ namespace detail template <> struct compute_sqrt<4, float, aligned_lowp, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & v) { - tvec4 result(uninitialize); + vec<4, float, aligned_lowp> result(uninitialize); result.data = glm_vec4_sqrt_lowp(v.data); return result; } diff --git a/glm/detail/func_geometric.hpp b/glm/detail/func_geometric.hpp index 8d37cd6b..54484ebf 100644 --- a/glm/detail/func_geometric.hpp +++ b/glm/detail/func_geometric.hpp @@ -56,9 +56,9 @@ namespace glm /// @see GLSL cross man page /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions template - GLM_FUNC_DECL tvec3 cross( - tvec3 const & x, - tvec3 const & y); + GLM_FUNC_DECL vec<3, T, P> cross( + vec<3, T, P> const & x, + vec<3, T, P> const & y); /// Returns a vector in the same direction as x but with length of 1. /// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error. diff --git a/glm/detail/func_geometric.inl b/glm/detail/func_geometric.inl index 836c6b9d..0620fc51 100644 --- a/glm/detail/func_geometric.inl +++ b/glm/detail/func_geometric.inl @@ -55,7 +55,7 @@ namespace detail { GLM_FUNC_QUALIFIER static T call(vec<3, T, P> const & a, vec<3, T, P> const & b) { - tvec3 tmp(a * b); + vec<3, T, P> tmp(a * b); return tmp.x + tmp.y + tmp.z; } }; @@ -73,11 +73,11 @@ namespace detail template struct compute_cross { - GLM_FUNC_QUALIFIER static tvec3 call(tvec3 const & x, tvec3 const & y) + GLM_FUNC_QUALIFIER static vec<3, T, P> call(vec<3, T, P> const & x, vec<3, T, P> const & y) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); - return tvec3( + return vec<3, T, P>( x.y * y.z - y.y * x.z, x.z * y.x - y.z * x.x, x.x * y.y - y.x * x.y); @@ -183,7 +183,7 @@ namespace detail // cross template - GLM_FUNC_QUALIFIER tvec3 cross(tvec3 const & x, tvec3 const & y) + GLM_FUNC_QUALIFIER vec<3, T, P> cross(vec<3, T, P> const & x, vec<3, T, P> const & y) { return detail::compute_cross::value>::call(x, y); } diff --git a/glm/detail/func_geometric_simd.inl b/glm/detail/func_geometric_simd.inl index 1bc2a01e..0c56ad2d 100644 --- a/glm/detail/func_geometric_simd.inl +++ b/glm/detail/func_geometric_simd.inl @@ -20,7 +20,7 @@ namespace detail template struct compute_distance { - GLM_FUNC_QUALIFIER static float call(tvec4 const & p0, tvec4 const & p1) + GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const & p0, vec<4, float, P> const & p1) { return _mm_cvtss_f32(glm_vec4_distance(p0.data, p1.data)); } @@ -38,24 +38,24 @@ namespace detail template struct compute_cross { - GLM_FUNC_QUALIFIER static tvec3 call(tvec3 const & a, tvec3 const & b) + GLM_FUNC_QUALIFIER static vec<3, float, P> call(vec<3, float, P> const & a, vec<3, float, P> const & b) { __m128 const set0 = _mm_set_ps(0.0f, a.z, a.y, a.x); __m128 const set1 = _mm_set_ps(0.0f, b.z, b.y, b.x); __m128 const xpd0 = glm_vec4_cross(set0, set1); - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = xpd0; - return tvec3(result); + return vec<3, float, P>(result); } }; template struct compute_normalize<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_normalize(v.data); return result; } @@ -64,9 +64,9 @@ namespace detail template struct compute_faceforward<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& N, tvec4 const& I, tvec4 const& Nref) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& N, vec<4, float, P> const& I, vec<4, float, P> const& Nref) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_faceforward(N.data, I.data, Nref.data); return result; } @@ -75,9 +75,9 @@ namespace detail template struct compute_reflect<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& I, tvec4 const& N) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_reflect(I.data, N.data); return result; } @@ -86,9 +86,9 @@ namespace detail template struct compute_refract<4, float, P, vec, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& I, tvec4 const& N, float eta) + GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N, float eta) { - tvec4 result(uninitialize); + vec<4, float, P> result(uninitialize); result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta)); return result; } diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index 3ae177a4..c52f125f 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -260,7 +260,7 @@ namespace detail template GLM_FUNC_QUALIFIER genIUType bitfieldExtract(genIUType Value, int Offset, int Bits) { - return bitfieldExtract(tvec1(Value), Offset, Bits).x; + return bitfieldExtract(vec<1, genIUType>(Value), Offset, Bits).x; } template class vecType> @@ -275,7 +275,7 @@ namespace detail template GLM_FUNC_QUALIFIER genIUType bitfieldInsert(genIUType const & Base, genIUType const & Insert, int Offset, int Bits) { - return bitfieldInsert(tvec1(Base), tvec1(Insert), Offset, Bits).x; + return bitfieldInsert(vec<1, genIUType>(Base), vec<1, genIUType>(Insert), Offset, Bits).x; } template class vecType> @@ -291,7 +291,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType bitfieldReverse(genType x) { - return bitfieldReverse(glm::tvec1(x)).x; + return bitfieldReverse(glm::vec<1, genType, glm::defaultp>(x)).x; } template class vecType> @@ -311,7 +311,7 @@ namespace detail template GLM_FUNC_QUALIFIER int bitCount(genType x) { - return bitCount(glm::tvec1(x)).x; + return bitCount(glm::vec<1, genType, glm::defaultp>(x)).x; } template class vecType> @@ -357,7 +357,7 @@ namespace detail { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); - return findMSB(tvec1(x)).x; + return findMSB(vec<1, genIUType>(x)).x; } template class vecType> diff --git a/glm/detail/func_integer_simd.inl b/glm/detail/func_integer_simd.inl index b812995b..50065883 100644 --- a/glm/detail/func_integer_simd.inl +++ b/glm/detail/func_integer_simd.inl @@ -11,7 +11,7 @@ namespace detail template struct compute_bitfieldReverseStep<4, uint32, P, vec, true, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v, uint32 Mask, uint32 Shift) + GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v, uint32 Mask, uint32 Shift) { __m128i const set0 = v.data; @@ -32,7 +32,7 @@ namespace detail template struct compute_bitfieldBitCountStep<4, uint32, P, vec, true, true> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v, uint32 Mask, uint32 Shift) + GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v, uint32 Mask, uint32 Shift) { __m128i const set0 = v.data; diff --git a/glm/detail/func_matrix.inl b/glm/detail/func_matrix.inl index 554ff52a..11542496 100644 --- a/glm/detail/func_matrix.inl +++ b/glm/detail/func_matrix.inl @@ -234,7 +234,7 @@ namespace detail T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; - tvec4 DetCof( + vec<4, T, P> DetCof( + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), @@ -322,30 +322,30 @@ namespace detail T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; - tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); - tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); - tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); - tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); - tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); - tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); + vec<4, T, P> Fac0(Coef00, Coef00, Coef02, Coef03); + vec<4, T, P> Fac1(Coef04, Coef04, Coef06, Coef07); + vec<4, T, P> Fac2(Coef08, Coef08, Coef10, Coef11); + vec<4, T, P> Fac3(Coef12, Coef12, Coef14, Coef15); + vec<4, T, P> Fac4(Coef16, Coef16, Coef18, Coef19); + vec<4, T, P> Fac5(Coef20, Coef20, Coef22, Coef23); - tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); - tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); - tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); - tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); + vec<4, T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); + vec<4, T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); + vec<4, T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); + vec<4, T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); - tvec4 Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); - tvec4 Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); - tvec4 Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); - tvec4 Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); + vec<4, T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); + vec<4, T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); + vec<4, T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); + vec<4, T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); - tvec4 SignA(+1, -1, +1, -1); - tvec4 SignB(-1, +1, -1, +1); + vec<4, T, P> SignA(+1, -1, +1, -1); + vec<4, T, P> SignB(-1, +1, -1, +1); tmat4x4 Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB); - tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); + vec<4, T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); - tvec4 Dot0(m[0] * Row0); + vec<4, T, P> Dot0(m[0] * Row0); T Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w); T OneOverDeterminant = static_cast(1) / Dot1; diff --git a/glm/detail/func_matrix_simd.inl b/glm/detail/func_matrix_simd.inl index 028f28c1..8f37fe56 100644 --- a/glm/detail/func_matrix_simd.inl +++ b/glm/detail/func_matrix_simd.inl @@ -61,7 +61,7 @@ namespace detail }//namespace detail template<> - GLM_FUNC_QUALIFIER tmat4x4 outerProduct<4, 4, float, aligned_lowp, vec, vec>(tvec4 const & c, tvec4 const & r) + GLM_FUNC_QUALIFIER tmat4x4 outerProduct<4, 4, float, aligned_lowp, vec, vec>(vec<4, float, aligned_lowp> const & c, vec<4, float, aligned_lowp> const & r) { tmat4x4 m(uninitialize); glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); @@ -69,7 +69,7 @@ namespace detail } template<> - GLM_FUNC_QUALIFIER tmat4x4 outerProduct<4, 4, float, aligned_mediump, vec, vec>(tvec4 const & c, tvec4 const & r) + GLM_FUNC_QUALIFIER tmat4x4 outerProduct<4, 4, float, aligned_mediump, vec, vec>(vec<4, float, aligned_mediump> const & c, vec<4, float, aligned_mediump> const & r) { tmat4x4 m(uninitialize); glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); @@ -77,7 +77,7 @@ namespace detail } template<> - GLM_FUNC_QUALIFIER tmat4x4 outerProduct<4, 4, float, aligned_highp, vec, vec>(tvec4 const & c, tvec4 const & r) + GLM_FUNC_QUALIFIER tmat4x4 outerProduct<4, 4, float, aligned_highp, vec, vec>(vec<4, float, aligned_highp> const & c, vec<4, float, aligned_highp> const & r) { tmat4x4 m(uninitialize); glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index e7fde26f..dc231b04 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -14,8 +14,8 @@ namespace glm template struct tmat2x2 { - typedef tvec2 col_type; - typedef tvec2 row_type; + typedef vec<2, T, P> col_type; + typedef vec<2, T, P> row_type; typedef tmat2x2 type; typedef tmat2x2 transpose_type; typedef T value_type; @@ -49,8 +49,8 @@ namespace glm template GLM_FUNC_DECL tmat2x2( - tvec2 const & v1, - tvec2 const & v2); + vec<2, U, P> const & v1, + vec<2, V, P> const & v2); // -- Matrix conversions -- diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index 02c5ee8b..ea75a928 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -80,7 +80,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(tvec2 const & v1, tvec2 const & v2) + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2(vec<2, V1, P> const & v1, vec<2, V2, P> const & v2) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); @@ -380,7 +380,7 @@ namespace glm typename tmat2x2::row_type const & v ) { - return tvec2( + return vec<2, T, P>( m[0][0] * v.x + m[1][0] * v.y, m[0][1] * v.x + m[1][1] * v.y); } @@ -392,7 +392,7 @@ namespace glm tmat2x2 const & m ) { - return tvec2( + return vec<2, T, P>( v.x * m[0][0] + v.y * m[0][1], v.x * m[1][0] + v.y * m[1][1]); } diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index db558863..cbc9c6e5 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -15,8 +15,8 @@ namespace glm template struct tmat2x3 { - typedef tvec3 col_type; - typedef tvec2 row_type; + typedef vec<3, T, P> col_type; + typedef vec<2, T, P> row_type; typedef tmat2x3 type; typedef tmat3x2 transpose_type; typedef T value_type; @@ -50,8 +50,8 @@ namespace glm template GLM_FUNC_DECL tmat2x3( - tvec3 const & v1, - tvec3 const & v2); + vec<3, U, P> const & v1, + vec<3, V, P> const & v2); // -- Matrix conversions -- diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index b0f8337c..7940be0b 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -80,7 +80,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(tvec3 const & v1, tvec3 const & v2) + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3(vec<3, V1, P> const & v1, vec<3, V2, P> const & v2) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index c9d195f7..fe3e8719 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -15,8 +15,8 @@ namespace glm template struct tmat2x4 { - typedef tvec4 col_type; - typedef tvec2 row_type; + typedef vec<4, T, P> col_type; + typedef vec<2, T, P> row_type; typedef tmat2x4 type; typedef tmat4x2 transpose_type; typedef T value_type; @@ -52,8 +52,8 @@ namespace glm template GLM_FUNC_DECL tmat2x4( - tvec4 const & v1, - tvec4 const & v2); + vec<4, U, P> const & v1, + vec<4, V, P> const & v2); // -- Matrix conversions -- diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index 74af34c6..90650d36 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -81,7 +81,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(tvec4 const & v1, tvec4 const & v2) + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4(vec<4, V1, P> const & v1, vec<4, V2, P> const & v2) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index 8549745e..b06e773e 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -15,8 +15,8 @@ namespace glm template struct tmat3x2 { - typedef tvec2 col_type; - typedef tvec3 row_type; + typedef vec<2, T, P> col_type; + typedef vec<3, T, P> row_type; typedef tmat3x2 type; typedef tmat2x3 transpose_type; typedef T value_type; @@ -56,9 +56,9 @@ namespace glm template GLM_FUNC_DECL tmat3x2( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3); + vec<2, V1, P> const & v1, + vec<2, V2, P> const & v2, + vec<2, V3, P> const & v3); // -- Matrix conversions -- diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 2a1b8bd6..5516dd26 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -97,9 +97,9 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 ( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3 + vec<2, V1, P> const & v1, + vec<2, V2, P> const & v2, + vec<2, V3, P> const & v3 ) { this->value[0] = col_type(v1); diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index d5ebe629..a7a08ab3 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -14,8 +14,8 @@ namespace glm template struct tmat3x3 { - typedef tvec3 col_type; - typedef tvec3 row_type; + typedef vec<3, T, P> col_type; + typedef vec<3, T, P> row_type; typedef tmat3x3 type; typedef tmat3x3 transpose_type; typedef T value_type; @@ -55,9 +55,9 @@ namespace glm template GLM_FUNC_DECL tmat3x3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); + vec<3, V1, P> const & v1, + vec<3, V2, P> const & v2, + vec<3, V3, P> const & v3); // -- Matrix conversions -- diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index 324cca32..375a628f 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -99,9 +99,9 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 ( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3 + vec<3, V1, P> const& v1, + vec<3, V2, P> const& v2, + vec<3, V3, P> const& v3 ) { this->value[0] = col_type(v1); diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index c5bb9a9b..6d47d470 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -15,8 +15,8 @@ namespace glm template struct tmat3x4 { - typedef tvec4 col_type; - typedef tvec3 row_type; + typedef vec<4, T, P> col_type; + typedef vec<3, T, P> row_type; typedef tmat3x4 type; typedef tmat4x3 transpose_type; typedef T value_type; @@ -56,9 +56,9 @@ namespace glm template GLM_FUNC_DECL tmat3x4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3); + vec<4, V1, P> const & v1, + vec<4, V2, P> const & v2, + vec<4, V3, P> const & v3); // -- Matrix conversions -- diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index 3596f267..fc9b80a5 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -97,9 +97,9 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 ( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3 + vec<4, V1, P> const & v1, + vec<4, V2, P> const & v2, + vec<4, V3, P> const & v3 ) { this->value[0] = col_type(v1); diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index a899d943..401bcd0b 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -15,8 +15,8 @@ namespace glm template struct tmat4x2 { - typedef tvec2 col_type; - typedef tvec4 row_type; + typedef vec<2, T, P> col_type; + typedef vec<4, T, P> row_type; typedef tmat4x2 type; typedef tmat2x4 transpose_type; typedef T value_type; @@ -60,10 +60,10 @@ namespace glm template GLM_FUNC_DECL tmat4x2( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3, - tvec2 const & v4); + vec<2, V1, P> const & v1, + vec<2, V2, P> const & v2, + vec<2, V3, P> const & v3, + vec<2, V4, P> const & v4); // -- Matrix conversions -- diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 76e8ffaa..3d56ece4 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -108,10 +108,10 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 ( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3, - tvec2 const & v4 + vec<2, V1, P> const & v1, + vec<2, V2, P> const & v2, + vec<2, V3, P> const & v3, + vec<2, V4, P> const & v4 ) { this->value[0] = col_type(v1); diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index c696735f..418fa579 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -15,8 +15,8 @@ namespace glm template struct tmat4x3 { - typedef tvec3 col_type; - typedef tvec4 row_type; + typedef vec<3, T, P> col_type; + typedef vec<4, T, P> row_type; typedef tmat4x3 type; typedef tmat3x4 transpose_type; typedef T value_type; @@ -60,10 +60,10 @@ namespace glm template GLM_FUNC_DECL tmat4x3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3, - tvec3 const & v4); + vec<3, V1, P> const & v1, + vec<3, V2, P> const & v2, + vec<3, V3, P> const & v3, + vec<3, V4, P> const & v4); // -- Matrix conversions -- diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index cfb408b3..6fd01eef 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -108,10 +108,10 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 ( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3, - tvec3 const & v4 + vec<3, V1, P> const & v1, + vec<3, V2, P> const & v2, + vec<3, V3, P> const & v3, + vec<3, V4, P> const & v4 ) { this->value[0] = col_type(v1); diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 2222d10e..fe1d9e12 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -14,8 +14,8 @@ namespace glm template struct tmat4x4 { - typedef tvec4 col_type; - typedef tvec4 row_type; + typedef vec<4, T, P> col_type; + typedef vec<4, T, P> row_type; typedef tmat4x4 type; typedef tmat4x4 transpose_type; typedef T value_type; @@ -59,10 +59,10 @@ namespace glm template GLM_FUNC_DECL tmat4x4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4); + vec<4, V1, P> const & v1, + vec<4, V2, P> const & v2, + vec<4, V3, P> const & v3, + vec<4, V4, P> const & v4); // -- Matrix conversions -- diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index 4b75d947..e630621a 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -143,10 +143,10 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 ( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4 + vec<4, V1, P> const & v1, + vec<4, V2, P> const & v2, + vec<4, V3, P> const & v3, + vec<4, V4, P> const & v4 ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); diff --git a/glm/detail/type_vec.hpp b/glm/detail/type_vec.hpp index 38367ce2..b9573bc7 100644 --- a/glm/detail/type_vec.hpp +++ b/glm/detail/type_vec.hpp @@ -103,26 +103,26 @@ namespace detail template struct vec; - template using tvec1 = vec<1, T, P>; - template using tvec2 = vec<2, T, P>; - template using tvec3 = vec<3, T, P>; - template using tvec4 = vec<4, T, P>; +// template using tvec1 = vec<1, T, P>; +// template using tvec2 = vec<2, T, P>; +// template using tvec3 = vec<3, T, P>; +// template using tvec4 = vec<4, T, P>; - typedef tvec1 highp_vec1_t; - typedef tvec1 mediump_vec1_t; - typedef tvec1 lowp_vec1_t; - typedef tvec1 highp_dvec1_t; - typedef tvec1 mediump_dvec1_t; - typedef tvec1 lowp_dvec1_t; - typedef tvec1 highp_ivec1_t; - typedef tvec1 mediump_ivec1_t; - typedef tvec1 lowp_ivec1_t; - typedef tvec1 highp_uvec1_t; - typedef tvec1 mediump_uvec1_t; - typedef tvec1 lowp_uvec1_t; - typedef tvec1 highp_bvec1_t; - typedef tvec1 mediump_bvec1_t; - typedef tvec1 lowp_bvec1_t; + typedef vec<1, float, highp> highp_vec1_t; + typedef vec<1, float, mediump> mediump_vec1_t; + typedef vec<1, float, lowp> lowp_vec1_t; + typedef vec<1, double, highp> highp_dvec1_t; + typedef vec<1, double, mediump> mediump_dvec1_t; + typedef vec<1, double, lowp> lowp_dvec1_t; + typedef vec<1, int, highp> highp_ivec1_t; + typedef vec<1, int, mediump> mediump_ivec1_t; + typedef vec<1, int, lowp> lowp_ivec1_t; + typedef vec<1, uint, highp> highp_uvec1_t; + typedef vec<1, uint, mediump> mediump_uvec1_t; + typedef vec<1, uint, lowp> lowp_uvec1_t; + typedef vec<1, bool, highp> highp_bvec1_t; + typedef vec<1, bool, mediump> mediump_bvec1_t; + typedef vec<1, bool, lowp> lowp_bvec1_t; /// @addtogroup core_precision /// @{ @@ -132,105 +132,105 @@ namespace detail /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 highp_vec2; + typedef vec<2, float, highp> highp_vec2; /// 2 components vector of medium single-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 mediump_vec2; + typedef vec<2, float, mediump> mediump_vec2; /// 2 components vector of low single-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 lowp_vec2; + typedef vec<2, float, lowp> lowp_vec2; /// 2 components vector of high double-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 highp_dvec2; + typedef vec<2, double, highp> highp_dvec2; /// 2 components vector of medium double-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 mediump_dvec2; + typedef vec<2, double, mediump> mediump_dvec2; /// 2 components vector of low double-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 lowp_dvec2; + typedef vec<2, double, lowp> lowp_dvec2; /// 2 components vector of high precision signed integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 highp_ivec2; + typedef vec<2, int, highp> highp_ivec2; /// 2 components vector of medium precision signed integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 mediump_ivec2; + typedef vec<2, int, mediump> mediump_ivec2; /// 2 components vector of low precision signed integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 lowp_ivec2; + typedef vec<2, int, lowp> lowp_ivec2; /// 2 components vector of high precision unsigned integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 highp_uvec2; + typedef vec<2, uint, highp> highp_uvec2; /// 2 components vector of medium precision unsigned integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 mediump_uvec2; + typedef vec<2, uint, mediump> mediump_uvec2; /// 2 components vector of low precision unsigned integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 lowp_uvec2; + typedef vec<2, uint, lowp> lowp_uvec2; /// 2 components vector of high precision bool numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 highp_bvec2; + typedef vec<2, bool, highp> highp_bvec2; /// 2 components vector of medium precision bool numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 mediump_bvec2; + typedef vec<2, bool, mediump> mediump_bvec2; /// 2 components vector of low precision bool numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec2 lowp_bvec2; + typedef vec<2, bool, lowp> lowp_bvec2; /// @} @@ -242,102 +242,102 @@ namespace detail /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 highp_vec3; + typedef vec<3, float, highp> highp_vec3; /// 3 components vector of medium single-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 mediump_vec3; + typedef vec<3, float, mediump> mediump_vec3; /// 3 components vector of low single-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 lowp_vec3; + typedef vec<3, float, lowp> lowp_vec3; /// 3 components vector of high double-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 highp_dvec3; + typedef vec<3, double, highp> highp_dvec3; /// 3 components vector of medium double-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 mediump_dvec3; + typedef vec<3, double, mediump> mediump_dvec3; /// 3 components vector of low double-precision floating-point numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 lowp_dvec3; + typedef vec<3, double, lowp> lowp_dvec3; /// 3 components vector of high precision signed integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 highp_ivec3; + typedef vec<3, int, highp> highp_ivec3; /// 3 components vector of medium precision signed integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 mediump_ivec3; + typedef vec<3, int, mediump> mediump_ivec3; /// 3 components vector of low precision signed integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 lowp_ivec3; + typedef vec<3, int, lowp> lowp_ivec3; /// 3 components vector of high precision unsigned integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 highp_uvec3; + typedef vec<3, uint, highp> highp_uvec3; /// 3 components vector of medium precision unsigned integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 mediump_uvec3; + typedef vec<3, uint, mediump> mediump_uvec3; /// 3 components vector of low precision unsigned integer numbers. /// There is no guarantee on the actual precision. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 lowp_uvec3; + typedef vec<3, uint, lowp> lowp_uvec3; /// 3 components vector of high precision bool numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 highp_bvec3; + typedef vec<3, bool, highp> highp_bvec3; /// 3 components vector of medium precision bool numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 mediump_bvec3; + typedef vec<3, bool, mediump> mediump_bvec3; /// 3 components vector of low precision bool numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec3 lowp_bvec3; + typedef vec<3, bool, lowp> lowp_bvec3; /// @} @@ -348,91 +348,91 @@ namespace detail /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 highp_vec4; + typedef vec<4, float, highp> highp_vec4; /// 4 components vector of medium single-precision floating-point numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 mediump_vec4; + typedef vec<4, float, mediump> mediump_vec4; /// 4 components vector of low single-precision floating-point numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 lowp_vec4; + typedef vec<4, float, lowp> lowp_vec4; /// 4 components vector of high double-precision floating-point numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 highp_dvec4; + typedef vec<4, double, highp> highp_dvec4; /// 4 components vector of medium double-precision floating-point numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 mediump_dvec4; + typedef vec<4, double, mediump> mediump_dvec4; /// 4 components vector of low double-precision floating-point numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 lowp_dvec4; + typedef vec<4, double, lowp> lowp_dvec4; /// 4 components vector of high precision signed integer numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 highp_ivec4; + typedef vec<4, int, highp> highp_ivec4; /// 4 components vector of medium precision signed integer numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 mediump_ivec4; + typedef vec<4, int, mediump> mediump_ivec4; /// 4 components vector of low precision signed integer numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 lowp_ivec4; + typedef vec<4, int, lowp> lowp_ivec4; /// 4 components vector of high precision unsigned integer numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 highp_uvec4; + typedef vec<4, uint, highp> highp_uvec4; /// 4 components vector of medium precision unsigned integer numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 mediump_uvec4; + typedef vec<4, uint, mediump> mediump_uvec4; /// 4 components vector of low precision unsigned integer numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 lowp_uvec4; + typedef vec<4, uint, lowp> lowp_uvec4; /// 4 components vector of high precision bool numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 highp_bvec4; + typedef vec<4, bool, highp> highp_bvec4; /// 4 components vector of medium precision bool numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 mediump_bvec4; + typedef vec<4, bool, mediump> mediump_bvec4; /// 4 components vector of low precision bool numbers. /// /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef tvec4 lowp_bvec4; + typedef vec<4, bool, lowp> lowp_bvec4; /// @} diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index ec2f1999..138b3dd1 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -68,7 +68,7 @@ namespace glm union {T y, g, t;}; # if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED - GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4) + GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P) # endif//GLM_SWIZZLE # endif diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 313e27be..d906a66b 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -68,7 +68,7 @@ namespace glm union { T z, b, p; }; # if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED - GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, tvec3, tvec2, tvec3, tvec4) + GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P) # endif//GLM_SWIZZLE # endif//GLM_LANG diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 796e131e..753e9096 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -71,7 +71,7 @@ namespace glm union { T w, a, q; }; # if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED - GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4) + GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P) # endif//GLM_SWIZZLE # endif diff --git a/glm/detail/type_vec4_simd.inl b/glm/detail/type_vec4_simd.inl index b8fc40f0..48dec09b 100644 --- a/glm/detail/type_vec4_simd.inl +++ b/glm/detail/type_vec4_simd.inl @@ -10,11 +10,11 @@ namespace detail template struct _swizzle_base1<4, float, P, E0,E1,E2,E3, true> : public _swizzle_base0 { - GLM_FUNC_QUALIFIER tvec4 operator ()() const + GLM_FUNC_QUALIFIER vec<4, float, P> operator ()() const { __m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer); - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); # if GLM_ARCH & GLM_ARCH_AVX_BIT Result.data = _mm_permute_ps(data, _MM_SHUFFLE(E3, E2, E1, E0)); # else @@ -27,11 +27,11 @@ namespace detail template struct _swizzle_base1<4, int32, P, E0,E1,E2,E3, true> : public _swizzle_base0 { - GLM_FUNC_QUALIFIER tvec4 operator ()() const + GLM_FUNC_QUALIFIER vec<4, int32, P> operator ()() const { __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); - tvec4 Result(uninitialize); + vec<4, int32, P> Result(uninitialize); Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); return Result; } @@ -40,11 +40,11 @@ namespace detail template struct _swizzle_base1<4, uint32, P, E0,E1,E2,E3, true> : public _swizzle_base0 { - GLM_FUNC_QUALIFIER tvec4 operator ()() const + GLM_FUNC_QUALIFIER vec<4, uint32, P> operator ()() const { __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); - tvec4 Result(uninitialize); + vec<4, uint32, P> Result(uninitialize); Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); return Result; } @@ -54,9 +54,9 @@ namespace detail template struct compute_vec4_add { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_add_ps(a.data, b.data); return Result; } @@ -66,9 +66,9 @@ namespace detail template struct compute_vec4_add { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - tvec4 Result(uninitialize); + vec<4, double, P> Result(uninitialize); Result.data = _mm256_add_pd(a.data, b.data); return Result; } @@ -78,9 +78,9 @@ namespace detail template struct compute_vec4_sub { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_sub_ps(a.data, b.data); return Result; } @@ -90,9 +90,9 @@ namespace detail template struct compute_vec4_sub { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - tvec4 Result(uninitialize); + vec<4, double, P> Result(uninitialize); Result.data = _mm256_sub_pd(a.data, b.data); return Result; } @@ -102,9 +102,9 @@ namespace detail template struct compute_vec4_mul { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_mul_ps(a.data, b.data); return Result; } @@ -114,9 +114,9 @@ namespace detail template struct compute_vec4_mul { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - tvec4 Result(uninitialize); + vec<4, double, P> Result(uninitialize); Result.data = _mm256_mul_pd(a.data, b.data); return Result; } @@ -126,9 +126,9 @@ namespace detail template struct compute_vec4_div { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) { - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_div_ps(a.data, b.data); return Result; } @@ -138,9 +138,9 @@ namespace detail template struct compute_vec4_div { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) { - tvec4 Result(uninitialize); + vec<4, double, P> Result(uninitialize); Result.data = _mm256_div_pd(a.data, b.data); return Result; } @@ -150,9 +150,9 @@ namespace detail template <> struct compute_vec4_div { - static tvec4 call(tvec4 const & a, tvec4 const & b) + static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & a, vec<4, float, aligned_lowp> const & b) { - tvec4 Result(uninitialize); + vec<4, float, aligned_lowp> Result(uninitialize); Result.data = _mm_mul_ps(a.data, _mm_rcp_ps(b.data)); return Result; } @@ -161,9 +161,9 @@ namespace detail template struct compute_vec4_and { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm_and_si128(a.data, b.data); return Result; } @@ -173,9 +173,9 @@ namespace detail template struct compute_vec4_and { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm256_and_si256(a.data, b.data); return Result; } @@ -185,9 +185,9 @@ namespace detail template struct compute_vec4_or { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm_or_si128(a.data, b.data); return Result; } @@ -197,9 +197,9 @@ namespace detail template struct compute_vec4_or { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm256_or_si256(a.data, b.data); return Result; } @@ -209,9 +209,9 @@ namespace detail template struct compute_vec4_xor { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm_xor_si128(a.data, b.data); return Result; } @@ -221,9 +221,9 @@ namespace detail template struct compute_vec4_xor { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm256_xor_si256(a.data, b.data); return Result; } @@ -233,9 +233,9 @@ namespace detail template struct compute_vec4_shift_left { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm_sll_epi32(a.data, b.data); return Result; } @@ -245,9 +245,9 @@ namespace detail template struct compute_vec4_shift_left { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm256_sll_epi64(a.data, b.data); return Result; } @@ -257,9 +257,9 @@ namespace detail template struct compute_vec4_shift_right { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm_srl_epi32(a.data, b.data); return Result; } @@ -269,9 +269,9 @@ namespace detail template struct compute_vec4_shift_right { - static tvec4 call(tvec4 const& a, tvec4 const& b) + static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm256_srl_epi64(a.data, b.data); return Result; } @@ -281,9 +281,9 @@ namespace detail template struct compute_vec4_bitwise_not { - static tvec4 call(tvec4 const & v) + static vec<4, T, P> call(vec<4, T, P> const & v) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm_xor_si128(v.data, _mm_set1_epi32(-1)); return Result; } @@ -293,9 +293,9 @@ namespace detail template struct compute_vec4_bitwise_not { - static tvec4 call(tvec4 const & v) + static vec<4, T, P> call(vec<4, T, P> const & v) { - tvec4 Result(uninitialize); + vec<4, T, P> Result(uninitialize); Result.data = _mm256_xor_si256(v.data, _mm_set1_epi32(-1)); return Result; } @@ -305,7 +305,7 @@ namespace detail template struct compute_vec4_equal { - static bool call(tvec4 const & v1, tvec4 const & v2) + static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) { return _mm_movemask_ps(_mm_cmpeq_ps(v1.data, v2.data)) != 0; } @@ -314,7 +314,7 @@ namespace detail template struct compute_vec4_equal { - static bool call(tvec4 const & v1, tvec4 const & v2) + static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) { return _mm_movemask_epi8(_mm_cmpeq_epi32(v1.data, v2.data)) != 0; } @@ -323,7 +323,7 @@ namespace detail template struct compute_vec4_nequal { - static bool call(tvec4 const & v1, tvec4 const & v2) + static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) { return _mm_movemask_ps(_mm_cmpneq_ps(v1.data, v2.data)) != 0; } @@ -332,7 +332,7 @@ namespace detail template struct compute_vec4_nequal { - static bool call(tvec4 const & v1, tvec4 const & v2) + static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) { return _mm_movemask_epi8(_mm_cmpneq_epi32(v1.data, v2.data)) != 0; } @@ -341,21 +341,21 @@ namespace detail # if !GLM_HAS_DEFAULTED_FUNCTIONS template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec() # ifndef GLM_FORCE_NO_CTOR_INIT : data(_mm_setzero_ps()) # endif {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec() # ifndef GLM_FORCE_NO_CTOR_INIT : data(_mm_setzero_ps()) # endif {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec() # ifndef GLM_FORCE_NO_CTOR_INIT : data(_mm_setzero_ps()) # endif @@ -363,117 +363,117 @@ namespace detail # endif//!GLM_HAS_DEFAULTED_FUNCTIONS template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(float s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float s) : data(_mm_set1_ps(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(float s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(float s) : data(_mm_set1_ps(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(float s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(float s) : data(_mm_set1_ps(s)) {} # if GLM_ARCH & GLM_ARCH_AVX_BIT template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(double s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_lowp>::vec(double s) : data(_mm256_set1_pd(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(double s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_mediump>::vec(double s) : data(_mm256_set1_pd(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(double s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, double, aligned_highp>::vec(double s) : data(_mm256_set1_pd(s)) {} # endif template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_lowp>::vec(int32 s) : data(_mm_set1_epi32(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_mediump>::vec(int32 s) : data(_mm_set1_epi32(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_highp>::vec(int32 s) : data(_mm_set1_epi32(s)) {} # if GLM_ARCH & GLM_ARCH_AVX2_BIT template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int64 s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_lowp>::vec(int64 s) : data(_mm256_set1_epi64x(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int64 s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_mediump>::vec(int64 s) : data(_mm256_set1_epi64x(s)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int64 s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int64, aligned_highp>::vec(int64 s) : data(_mm256_set1_epi64x(s)) {} # endif template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(float a, float b, float c, float d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(float a, float b, float c, float d) : data(_mm_set_ps(d, c, b, a)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(float a, float b, float c, float d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(float a, float b, float c, float d) : data(_mm_set_ps(d, c, b, a)) {} template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(float a, float b, float c, float d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(float a, float b, float c, float d) : data(_mm_set_ps(d, c, b, a)) {} template <> template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 a, int32 b, int32 c, int32 d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_lowp>::vec(int32 a, int32 b, int32 c, int32 d) : data(_mm_set_epi32(d, c, b, a)) {} template <> template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 a, int32 b, int32 c, int32 d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_mediump>::vec(int32 a, int32 b, int32 c, int32 d) : data(_mm_set_epi32(d, c, b, a)) {} template <> template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 a, int32 b, int32 c, int32 d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, int32, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) : data(_mm_set_epi32(d, c, b, a)) {} template <> template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 a, int32 b, int32 c, int32 d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_lowp>::vec(int32 a, int32 b, int32 c, int32 d) : data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) {} template <> template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 a, int32 b, int32 c, int32 d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_mediump>::vec(int32 a, int32 b, int32 c, int32 d) : data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) {} template <> template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4::vec(int32 a, int32 b, int32 c, int32 d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, float, aligned_highp>::vec(int32 a, int32 b, int32 c, int32 d) : data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) {} }//namespace glm diff --git a/glm/fwd.hpp b/glm/fwd.hpp index f90c4d04..9b159c75 100644 --- a/glm/fwd.hpp +++ b/glm/fwd.hpp @@ -300,53 +300,53 @@ namespace glm /// Low precision 8 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_i8vec1; + typedef vec<1, i8, lowp> lowp_i8vec1; /// Low precision 8 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_i8vec2; + typedef vec<2, i8, lowp> lowp_i8vec2; /// Low precision 8 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_i8vec3; + typedef vec<3, i8, lowp> lowp_i8vec3; /// Low precision 8 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_i8vec4; + typedef vec<4, i8, lowp> lowp_i8vec4; /// Medium precision 8 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_i8vec1; + typedef vec<1, i8, mediump> mediump_i8vec1; /// Medium precision 8 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_i8vec2; + typedef vec<2, i8, mediump> mediump_i8vec2; /// Medium precision 8 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_i8vec3; + typedef vec<3, i8, mediump> mediump_i8vec3; /// Medium precision 8 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_i8vec4; + typedef vec<4, i8, mediump> mediump_i8vec4; /// High precision 8 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_i8vec1; + typedef vec<1, i8, highp> highp_i8vec1; /// High precision 8 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_i8vec2; + typedef vec<2, i8, highp> highp_i8vec2; /// High precision 8 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_i8vec3; + typedef vec<3, i8, highp> highp_i8vec3; /// High precision 8 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_i8vec4; + typedef vec<4, i8, highp> highp_i8vec4; #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_i8vec1 i8vec1; @@ -379,53 +379,53 @@ namespace glm /// Low precision 16 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_i16vec1; + typedef vec<1, i16, lowp> lowp_i16vec1; /// Low precision 16 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_i16vec2; + typedef vec<2, i16, lowp> lowp_i16vec2; /// Low precision 16 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_i16vec3; + typedef vec<3, i16, lowp> lowp_i16vec3; /// Low precision 16 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_i16vec4; + typedef vec<4, i16, lowp> lowp_i16vec4; /// Medium precision 16 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_i16vec1; + typedef vec<1, i16, mediump> mediump_i16vec1; /// Medium precision 16 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_i16vec2; + typedef vec<2, i16, mediump> mediump_i16vec2; /// Medium precision 16 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_i16vec3; + typedef vec<3, i16, mediump> mediump_i16vec3; /// Medium precision 16 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_i16vec4; + typedef vec<4, i16, mediump> mediump_i16vec4; /// High precision 16 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_i16vec1; + typedef vec<1, i16, highp> highp_i16vec1; /// High precision 16 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_i16vec2; + typedef vec<2, i16, highp> highp_i16vec2; /// High precision 16 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_i16vec3; + typedef vec<3, i16, highp> highp_i16vec3; /// High precision 16 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_i16vec4; + typedef vec<4, i16, highp> highp_i16vec4; #if(defined(GLM_PRECISION_LOWP_INT)) @@ -459,53 +459,53 @@ namespace glm /// Low precision 32 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_i32vec1; + typedef vec<1, i32, lowp> lowp_i32vec1; /// Low precision 32 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_i32vec2; + typedef vec<2, i32, lowp> lowp_i32vec2; /// Low precision 32 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_i32vec3; + typedef vec<3, i32, lowp> lowp_i32vec3; /// Low precision 32 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_i32vec4; + typedef vec<4, i32, lowp> lowp_i32vec4; /// Medium precision 32 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_i32vec1; + typedef vec<1, i32, mediump> mediump_i32vec1; /// Medium precision 32 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_i32vec2; + typedef vec<2, i32, mediump> mediump_i32vec2; /// Medium precision 32 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_i32vec3; + typedef vec<3, i32, mediump> mediump_i32vec3; /// Medium precision 32 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_i32vec4; + typedef vec<4, i32, mediump> mediump_i32vec4; /// High precision 32 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_i32vec1; + typedef vec<1, i32, highp> highp_i32vec1; /// High precision 32 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_i32vec2; + typedef vec<2, i32, highp> highp_i32vec2; /// High precision 32 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_i32vec3; + typedef vec<3, i32, highp> highp_i32vec3; /// High precision 32 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_i32vec4; + typedef vec<4, i32, highp> highp_i32vec4; #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_i32vec1 i32vec1; @@ -538,53 +538,53 @@ namespace glm /// Low precision 32 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_i32vec1; + typedef vec<1, i32, lowp> lowp_i32vec1; /// Low precision 32 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_i32vec2; + typedef vec<2, i32, lowp> lowp_i32vec2; /// Low precision 32 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_i32vec3; + typedef vec<3, i32, lowp> lowp_i32vec3; /// Low precision 32 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_i32vec4; + typedef vec<4, i32, lowp> lowp_i32vec4; /// Medium precision 32 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_i32vec1; + typedef vec<1, i32, mediump> mediump_i32vec1; /// Medium precision 32 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_i32vec2; + typedef vec<2, i32, mediump> mediump_i32vec2; /// Medium precision 32 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_i32vec3; + typedef vec<3, i32, mediump> mediump_i32vec3; /// Medium precision 32 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_i32vec4; + typedef vec<4, i32, mediump> mediump_i32vec4; /// High precision 32 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_i32vec1; + typedef vec<1, i32, highp> highp_i32vec1; /// High precision 32 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_i32vec2; + typedef vec<2, i32, highp> highp_i32vec2; /// High precision 32 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_i32vec3; + typedef vec<3, i32, highp> highp_i32vec3; /// High precision 32 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_i32vec4; + typedef vec<4, i32, highp> highp_i32vec4; #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_i32vec1 i32vec1; @@ -618,53 +618,53 @@ namespace glm /// Low precision 64 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_i64vec1; + typedef vec<1, i64, lowp> lowp_i64vec1; /// Low precision 64 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_i64vec2; + typedef vec<2, i64, lowp> lowp_i64vec2; /// Low precision 64 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_i64vec3; + typedef vec<3, i64, lowp> lowp_i64vec3; /// Low precision 64 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_i64vec4; + typedef vec<4, i64, lowp> lowp_i64vec4; /// Medium precision 64 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_i64vec1; + typedef vec<1, i64, mediump> mediump_i64vec1; /// Medium precision 64 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_i64vec2; + typedef vec<2, i64, mediump> mediump_i64vec2; /// Medium precision 64 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_i64vec3; + typedef vec<3, i64, mediump> mediump_i64vec3; /// Medium precision 64 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_i64vec4; + typedef vec<4, i64, mediump> mediump_i64vec4; /// High precision 64 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_i64vec1; + typedef vec<1, i64, highp> highp_i64vec1; /// High precision 64 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_i64vec2; + typedef vec<2, i64, highp> highp_i64vec2; /// High precision 64 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_i64vec3; + typedef vec<3, i64, highp> highp_i64vec3; /// High precision 64 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_i64vec4; + typedef vec<4, i64, highp> highp_i64vec4; #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_i64vec1 i64vec1; @@ -909,53 +909,53 @@ namespace glm /// Low precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_u8vec1; + typedef vec<1, u8, lowp> lowp_u8vec1; /// Low precision 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_u8vec2; + typedef vec<2, u8, lowp> lowp_u8vec2; /// Low precision 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_u8vec3; + typedef vec<3, u8, lowp> lowp_u8vec3; /// Low precision 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_u8vec4; + typedef vec<4, u8, lowp> lowp_u8vec4; /// Medium precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_u8vec1; + typedef vec<1, u8, mediump> mediump_u8vec1; /// Medium precision 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_u8vec2; + typedef vec<2, u8, mediump> mediump_u8vec2; /// Medium precision 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_u8vec3; + typedef vec<3, u8, mediump> mediump_u8vec3; /// Medium precision 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_u8vec4; + typedef vec<4, u8, mediump> mediump_u8vec4; /// High precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_u8vec1; + typedef vec<1, u8, highp> highp_u8vec1; /// High precision 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_u8vec2; + typedef vec<2, u8, highp> highp_u8vec2; /// High precision 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_u8vec3; + typedef vec<3, u8, highp> highp_u8vec3; /// High precision 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_u8vec4; + typedef vec<4, u8, highp> highp_u8vec4; #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_u8vec1 u8vec1; @@ -988,53 +988,53 @@ namespace glm /// Low precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_u16vec1; + typedef vec<1, u16, lowp> lowp_u16vec1; /// Low precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_u16vec2; + typedef vec<2, u16, lowp> lowp_u16vec2; /// Low precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_u16vec3; + typedef vec<3, u16, lowp> lowp_u16vec3; /// Low precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_u16vec4; + typedef vec<4, u16, lowp> lowp_u16vec4; /// Medium precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_u16vec1; + typedef vec<1, u16, mediump> mediump_u16vec1; /// Medium precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_u16vec2; + typedef vec<2, u16, mediump> mediump_u16vec2; /// Medium precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_u16vec3; + typedef vec<3, u16, mediump> mediump_u16vec3; /// Medium precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_u16vec4; + typedef vec<4, u16, mediump> mediump_u16vec4; /// High precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_u16vec1; + typedef vec<1, u16, highp> highp_u16vec1; /// High precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_u16vec2; + typedef vec<2, u16, highp> highp_u16vec2; /// High precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_u16vec3; + typedef vec<3, u16, highp> highp_u16vec3; /// High precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_u16vec4; + typedef vec<4, u16, highp> highp_u16vec4; #if(defined(GLM_PRECISION_LOWP_INT)) @@ -1068,53 +1068,53 @@ namespace glm /// Low precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_u32vec1; + typedef vec<1, u32, lowp> lowp_u32vec1; /// Low precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_u32vec2; + typedef vec<2, u32, lowp> lowp_u32vec2; /// Low precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_u32vec3; + typedef vec<3, u32, lowp> lowp_u32vec3; /// Low precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_u32vec4; + typedef vec<4, u32, lowp> lowp_u32vec4; /// Medium precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_u32vec1; + typedef vec<1, u32, mediump> mediump_u32vec1; /// Medium precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_u32vec2; + typedef vec<2, u32, mediump> mediump_u32vec2; /// Medium precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_u32vec3; + typedef vec<3, u32, mediump> mediump_u32vec3; /// Medium precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_u32vec4; + typedef vec<4, u32, mediump> mediump_u32vec4; /// High precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_u32vec1; + typedef vec<1, u32, highp> highp_u32vec1; /// High precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_u32vec2; + typedef vec<2, u32, highp> highp_u32vec2; /// High precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_u32vec3; + typedef vec<3, u32, highp> highp_u32vec3; /// High precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_u32vec4; + typedef vec<4, u32, highp> highp_u32vec4; #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_u32vec1 u32vec1; @@ -1147,53 +1147,53 @@ namespace glm /// Low precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_u32vec1; + typedef vec<1, u32, lowp> lowp_u32vec1; /// Low precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_u32vec2; + typedef vec<2, u32, lowp> lowp_u32vec2; /// Low precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_u32vec3; + typedef vec<3, u32, lowp> lowp_u32vec3; /// Low precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_u32vec4; + typedef vec<4, u32, lowp> lowp_u32vec4; /// Medium precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_u32vec1; + typedef vec<1, u32, mediump> mediump_u32vec1; /// Medium precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_u32vec2; + typedef vec<2, u32, mediump> mediump_u32vec2; /// Medium precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_u32vec3; + typedef vec<3, u32, mediump> mediump_u32vec3; /// Medium precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_u32vec4; + typedef vec<4, u32, mediump> mediump_u32vec4; /// High precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_u32vec1; + typedef vec<1, u32, highp> highp_u32vec1; /// High precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_u32vec2; + typedef vec<2, u32, highp> highp_u32vec2; /// High precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_u32vec3; + typedef vec<3, u32, highp> highp_u32vec3; /// High precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_u32vec4; + typedef vec<4, u32, highp> highp_u32vec4; #if(defined(GLM_PRECISION_LOWP_INT)) typedef lowp_u32vec1 u32vec1; @@ -1227,53 +1227,53 @@ namespace glm /// Low precision 64 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 lowp_u64vec1; + typedef vec<1, u64, lowp> lowp_u64vec1; /// Low precision 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 lowp_u64vec2; + typedef vec<2, u64, lowp> lowp_u64vec2; /// Low precision 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 lowp_u64vec3; + typedef vec<3, u64, lowp> lowp_u64vec3; /// Low precision 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 lowp_u64vec4; + typedef vec<4, u64, lowp> lowp_u64vec4; /// Medium precision 64 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 mediump_u64vec1; + typedef vec<1, u64, mediump> mediump_u64vec1; /// Medium precision 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 mediump_u64vec2; + typedef vec<2, u64, mediump> mediump_u64vec2; /// Medium precision 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 mediump_u64vec3; + typedef vec<3, u64, mediump> mediump_u64vec3; /// Medium precision 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 mediump_u64vec4; + typedef vec<4, u64, mediump> mediump_u64vec4; /// High precision 64 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 highp_u64vec1; + typedef vec<1, u64, highp> highp_u64vec1; /// High precision 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 highp_u64vec2; + typedef vec<2, u64, highp> highp_u64vec2; /// High precision 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 highp_u64vec3; + typedef vec<3, u64, highp> highp_u64vec3; /// High precision 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 highp_u64vec4; + typedef vec<4, u64, highp> highp_u64vec4; #if(defined(GLM_PRECISION_LOWP_UINT)) typedef lowp_u64vec1 u64vec1; @@ -1512,199 +1512,199 @@ namespace glm /// Low single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 lowp_vec1; + typedef vec<1, float, lowp> lowp_vec1; /// Low single-precision floating-point vector of 2 components. /// @see core_precision - typedef tvec2 lowp_vec2; + typedef vec<2, float, lowp> lowp_vec2; /// Low single-precision floating-point vector of 3 components. /// @see core_precision - typedef tvec3 lowp_vec3; + typedef vec<3, float, lowp> lowp_vec3; /// Low single-precision floating-point vector of 4 components. /// @see core_precision - typedef tvec4 lowp_vec4; + typedef vec<4, float, lowp> lowp_vec4; /// Low single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 lowp_fvec1; + typedef vec<1, float, lowp> lowp_fvec1; /// Low single-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 lowp_fvec2; + typedef vec<2, float, lowp> lowp_fvec2; /// Low single-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 lowp_fvec3; + typedef vec<3, float, lowp> lowp_fvec3; /// Low single-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 lowp_fvec4; + typedef vec<4, float, lowp> lowp_fvec4; /// Medium single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 mediump_vec1; + typedef vec<1, float, mediump> mediump_vec1; /// Medium Single-precision floating-point vector of 2 components. /// @see core_precision - typedef tvec2 mediump_vec2; + typedef vec<2, float, mediump> mediump_vec2; /// Medium Single-precision floating-point vector of 3 components. /// @see core_precision - typedef tvec3 mediump_vec3; + typedef vec<3, float, mediump> mediump_vec3; /// Medium Single-precision floating-point vector of 4 components. /// @see core_precision - typedef tvec4 mediump_vec4; + typedef vec<4, float, mediump> mediump_vec4; /// Medium single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 mediump_fvec1; + typedef vec<1, float, mediump> mediump_fvec1; /// Medium Single-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 mediump_fvec2; + typedef vec<2, float, mediump> mediump_fvec2; /// Medium Single-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 mediump_fvec3; + typedef vec<3, float, mediump> mediump_fvec3; /// Medium Single-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 mediump_fvec4; + typedef vec<4, float, mediump> mediump_fvec4; /// High single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 highp_vec1; + typedef vec<1, float, highp> highp_vec1; /// High Single-precision floating-point vector of 2 components. /// @see core_precision - typedef tvec2 highp_vec2; + typedef vec<2, float, highp> highp_vec2; /// High Single-precision floating-point vector of 3 components. /// @see core_precision - typedef tvec3 highp_vec3; + typedef vec<3, float, highp> highp_vec3; /// High Single-precision floating-point vector of 4 components. /// @see core_precision - typedef tvec4 highp_vec4; + typedef vec<4, float, highp> highp_vec4; /// High single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 highp_fvec1; + typedef vec<1, float, highp> highp_fvec1; /// High Single-precision floating-point vector of 2 components. /// @see core_precision - typedef tvec2 highp_fvec2; + typedef vec<2, float, highp> highp_fvec2; /// High Single-precision floating-point vector of 3 components. /// @see core_precision - typedef tvec3 highp_fvec3; + typedef vec<3, float, highp> highp_fvec3; /// High Single-precision floating-point vector of 4 components. /// @see core_precision - typedef tvec4 highp_fvec4; + typedef vec<4, float, highp> highp_fvec4; /// Low single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 lowp_f32vec1; + typedef vec<1, f32, lowp> lowp_f32vec1; /// Low single-precision floating-point vector of 2 components. /// @see core_precision - typedef tvec2 lowp_f32vec2; + typedef vec<2, f32, lowp> lowp_f32vec2; /// Low single-precision floating-point vector of 3 components. /// @see core_precision - typedef tvec3 lowp_f32vec3; + typedef vec<3, f32, lowp> lowp_f32vec3; /// Low single-precision floating-point vector of 4 components. /// @see core_precision - typedef tvec4 lowp_f32vec4; + typedef vec<4, f32, lowp> lowp_f32vec4; /// Medium single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 mediump_f32vec1; + typedef vec<1, f32, mediump> mediump_f32vec1; /// Medium single-precision floating-point vector of 2 components. /// @see core_precision - typedef tvec2 mediump_f32vec2; + typedef vec<2, f32, mediump> mediump_f32vec2; /// Medium single-precision floating-point vector of 3 components. /// @see core_precision - typedef tvec3 mediump_f32vec3; + typedef vec<3, f32, mediump> mediump_f32vec3; /// Medium single-precision floating-point vector of 4 components. /// @see core_precision - typedef tvec4 mediump_f32vec4; + typedef vec<4, f32, mediump> mediump_f32vec4; /// High single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 highp_f32vec1; + typedef vec<1, f32, highp> highp_f32vec1; /// High single-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 highp_f32vec2; + typedef vec<2, f32, highp> highp_f32vec2; /// High single-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 highp_f32vec3; + typedef vec<3, f32, highp> highp_f32vec3; /// High single-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 highp_f32vec4; + typedef vec<4, f32, highp> highp_f32vec4; /// Low double-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 lowp_f64vec1; + typedef vec<1, f64, lowp> lowp_f64vec1; /// Low double-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 lowp_f64vec2; + typedef vec<2, f64, lowp> lowp_f64vec2; /// Low double-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 lowp_f64vec3; + typedef vec<3, f64, lowp> lowp_f64vec3; /// Low double-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 lowp_f64vec4; + typedef vec<4, f64, lowp> lowp_f64vec4; /// Medium double-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 mediump_f64vec1; + typedef vec<1, f64, mediump> mediump_f64vec1; /// Medium double-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 mediump_f64vec2; + typedef vec<2, f64, mediump> mediump_f64vec2; /// Medium double-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 mediump_f64vec3; + typedef vec<3, f64, mediump> mediump_f64vec3; /// Medium double-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 mediump_f64vec4; + typedef vec<4, f64, mediump> mediump_f64vec4; /// High double-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 highp_f64vec1; + typedef vec<1, f64, highp> highp_f64vec1; /// High double-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 highp_f64vec2; + typedef vec<2, f64, highp> highp_f64vec2; /// High double-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 highp_f64vec3; + typedef vec<3, f64, highp> highp_f64vec3; /// High double-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 highp_f64vec4; + typedef vec<4, f64, highp> highp_f64vec4; ////////////////////// diff --git a/glm/gtc/color_space.inl b/glm/gtc/color_space.inl index 047a4abd..90594a7d 100644 --- a/glm/gtc/color_space.inl +++ b/glm/gtc/color_space.inl @@ -21,9 +21,9 @@ namespace detail template struct compute_rgbToSrgb<4, T, P, vec> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& ColorRGB, T GammaCorrection) + GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorRGB, T GammaCorrection) { - return tvec4(compute_rgbToSrgb<3, T, P, vec>::call(tvec3(ColorRGB), GammaCorrection), ColorRGB.a); + return vec<4, T, P>(compute_rgbToSrgb<3, T, P, vec>::call(vec<3, T, P>(ColorRGB), GammaCorrection), ColorRGB.a); } }; @@ -42,9 +42,9 @@ namespace detail template struct compute_srgbToRgb<4, T, P, vec> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const& ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorSRGB, T Gamma) { - return tvec4(compute_srgbToRgb<3, T, P, vec>::call(tvec3(ColorSRGB), Gamma), ColorSRGB.a); + return vec<4, T, P>(compute_srgbToRgb<3, T, P, vec>::call(vec<3, T, P>(ColorSRGB), Gamma), ColorSRGB.a); } }; }//namespace detail @@ -57,11 +57,11 @@ namespace detail // Based on Ian Taylor http://chilliant.blogspot.fr/2012/08/srgb-approximations-for-hlsl.html template <> - GLM_FUNC_QUALIFIER tvec3 convertLinearToSRGB(tvec3 const& ColorLinear) + GLM_FUNC_QUALIFIER vec<3, float, lowp> convertLinearToSRGB(vec<3, float, lowp> const& ColorLinear) { - tvec3 S1 = sqrt(ColorLinear); - tvec3 S2 = sqrt(S1); - tvec3 S3 = sqrt(S2); + vec<3, float, lowp> S1 = sqrt(ColorLinear); + vec<3, float, lowp> S2 = sqrt(S1); + vec<3, float, lowp> S3 = sqrt(S2); return 0.662002687f * S1 + 0.684122060f * S2 - 0.323583601f * S3 - 0.0225411470f * ColorLinear; } diff --git a/glm/gtc/epsilon.inl b/glm/gtc/epsilon.inl index 80fbc9ea..b0e77cd9 100644 --- a/glm/gtc/epsilon.inl +++ b/glm/gtc/epsilon.inl @@ -100,26 +100,26 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 epsilonEqual + GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonEqual ( tquat const & x, tquat const & y, T const & epsilon ) { - tvec4 v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); - return lessThan(abs(v), tvec4(epsilon)); + vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); + return lessThan(abs(v), vec<4, T, P>(epsilon)); } template - GLM_FUNC_QUALIFIER tvec4 epsilonNotEqual + GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonNotEqual ( tquat const & x, tquat const & y, T const & epsilon ) { - tvec4 v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); - return greaterThanEqual(abs(v), tvec4(epsilon)); + vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); + return greaterThanEqual(abs(v), vec<4, T, P>(epsilon)); } }//namespace glm diff --git a/glm/gtc/functions.hpp b/glm/gtc/functions.hpp index c8b2ee3c..3b42628f 100644 --- a/glm/gtc/functions.hpp +++ b/glm/gtc/functions.hpp @@ -41,9 +41,9 @@ namespace glm /// @see gtc_epsilon template GLM_FUNC_DECL T gauss( - tvec2 const& Coord, - tvec2 const& ExpectedValue, - tvec2 const& StandardDeviation); + vec<2, T, P> const& Coord, + vec<2, T, P> const& ExpectedValue, + vec<2, T, P> const& StandardDeviation); /// @} }//namespace glm diff --git a/glm/gtc/functions.inl b/glm/gtc/functions.inl index 1dbc4967..6db646f8 100644 --- a/glm/gtc/functions.inl +++ b/glm/gtc/functions.inl @@ -19,12 +19,12 @@ namespace glm template GLM_FUNC_QUALIFIER T gauss ( - tvec2 const& Coord, - tvec2 const& ExpectedValue, - tvec2 const& StandardDeviation + vec<2, T, P> const& Coord, + vec<2, T, P> const& ExpectedValue, + vec<2, T, P> const& StandardDeviation ) { - tvec2 const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); + vec<2, T, P> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); return exp(-(Squared.x + Squared.y)); } }//namespace glm diff --git a/glm/gtc/integer.inl b/glm/gtc/integer.inl index 530db8b7..0ec2fd41 100644 --- a/glm/gtc/integer.inl +++ b/glm/gtc/integer.inl @@ -19,14 +19,14 @@ namespace detail template struct compute_log2<4, int, P, vec, false, Aligned> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & vec) + GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const& v) { - tvec4 Result(glm::uninitialize); + vec<4, int, P> Result(glm::uninitialize); - _BitScanReverse(reinterpret_cast(&Result.x), vec.x); - _BitScanReverse(reinterpret_cast(&Result.y), vec.y); - _BitScanReverse(reinterpret_cast(&Result.z), vec.z); - _BitScanReverse(reinterpret_cast(&Result.w), vec.w); + _BitScanReverse(reinterpret_cast(&Result.x), v.x); + _BitScanReverse(reinterpret_cast(&Result.y), v.y); + _BitScanReverse(reinterpret_cast(&Result.z), v.z); + _BitScanReverse(reinterpret_cast(&Result.w), v.w); return Result; } diff --git a/glm/gtc/matrix_inverse.inl b/glm/gtc/matrix_inverse.inl index 36c9bf7c..ad20175e 100644 --- a/glm/gtc/matrix_inverse.inl +++ b/glm/gtc/matrix_inverse.inl @@ -9,9 +9,9 @@ namespace glm tmat2x2 const Inv(inverse(tmat2x2(m))); return tmat3x3( - tvec3(Inv[0], static_cast(0)), - tvec3(Inv[1], static_cast(0)), - tvec3(-Inv * tvec2(m[2]), static_cast(1))); + vec<3, T, P>(Inv[0], static_cast(0)), + vec<3, T, P>(Inv[1], static_cast(0)), + vec<3, T, P>(-Inv * vec<2, T, P>(m[2]), static_cast(1))); } template @@ -20,10 +20,10 @@ namespace glm tmat3x3 const Inv(inverse(tmat3x3(m))); return tmat4x4( - tvec4(Inv[0], static_cast(0)), - tvec4(Inv[1], static_cast(0)), - tvec4(Inv[2], static_cast(0)), - tvec4(-Inv * tvec3(m[3]), static_cast(1))); + vec<4, T, P>(Inv[0], static_cast(0)), + vec<4, T, P>(Inv[1], static_cast(0)), + vec<4, T, P>(Inv[2], static_cast(0)), + vec<4, T, P>(-Inv * vec<3, T, P>(m[3]), static_cast(1))); } template diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 03a2a678..4e40d2ef 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -53,11 +53,11 @@ namespace glm /// @endcode /// @see gtc_matrix_transform /// @see - translate(tmat4x4 const & m, T x, T y, T z) - /// @see - translate(tvec3 const & v) + /// @see - translate(vec<3, T, P> const & v) template GLM_FUNC_DECL tmat4x4 translate( tmat4x4 const & m, - tvec3 const & v); + vec<3, T, P> const & v); /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. /// @@ -67,12 +67,12 @@ namespace glm /// @tparam T Value type used to build the matrix. Supported: half, float or double. /// @see gtc_matrix_transform /// @see - rotate(tmat4x4 const & m, T angle, T x, T y, T z) - /// @see - rotate(T angle, tvec3 const & v) + /// @see - rotate(T angle, vec<3, T, P> const & v) template GLM_FUNC_DECL tmat4x4 rotate( tmat4x4 const & m, T angle, - tvec3 const & axis); + vec<3, T, P> const & axis); /// Builds a scale 4 * 4 matrix created from 3 scalars. /// @@ -81,11 +81,11 @@ namespace glm /// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double. /// @see gtc_matrix_transform /// @see - scale(tmat4x4 const & m, T x, T y, T z) - /// @see - scale(tvec3 const & v) + /// @see - scale(vec<3, T, P> const & v) template GLM_FUNC_DECL tmat4x4 scale( tmat4x4 const & m, - tvec3 const & v); + vec<3, T, P> const & v); /// Creates a matrix for an orthographic parallel viewing volume, using the default handedness. /// @@ -383,11 +383,11 @@ namespace glm /// @tparam U Currently supported: Floating-point types and integer types. /// @see gtc_matrix_transform template - GLM_FUNC_DECL tvec3 project( - tvec3 const & obj, + GLM_FUNC_DECL vec<3, T, P> project( + vec<3, T, P> const & obj, tmat4x4 const & model, tmat4x4 const & proj, - tvec4 const & viewport); + vec<4, U, P> const & viewport); /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. /// @@ -400,11 +400,11 @@ namespace glm /// @tparam U Currently supported: Floating-point types and integer types. /// @see gtc_matrix_transform template - GLM_FUNC_DECL tvec3 unProject( - tvec3 const & win, + GLM_FUNC_DECL vec<3, T, P> unProject( + vec<3, T, P> const & win, tmat4x4 const & model, tmat4x4 const & proj, - tvec4 const & viewport); + vec<4, U, P> const & viewport); /// Define a picking region /// @@ -416,9 +416,9 @@ namespace glm /// @see gtc_matrix_transform template GLM_FUNC_DECL tmat4x4 pickMatrix( - tvec2 const & center, - tvec2 const & delta, - tvec4 const & viewport); + vec<2, T, P> const & center, + vec<2, T, P> const & delta, + vec<4, U, P> const & viewport); /// Build a look at view matrix based on the default handedness. /// @@ -429,9 +429,9 @@ namespace glm /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) template GLM_FUNC_DECL tmat4x4 lookAt( - tvec3 const & eye, - tvec3 const & center, - tvec3 const & up); + vec<3, T, P> const & eye, + vec<3, T, P> const & center, + vec<3, T, P> const & up); /// Build a right handed look at view matrix. /// @@ -442,9 +442,9 @@ namespace glm /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) template GLM_FUNC_DECL tmat4x4 lookAtRH( - tvec3 const & eye, - tvec3 const & center, - tvec3 const & up); + vec<3, T, P> const & eye, + vec<3, T, P> const & center, + vec<3, T, P> const & up); /// Build a left handed look at view matrix. /// @@ -455,9 +455,9 @@ namespace glm /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) template GLM_FUNC_DECL tmat4x4 lookAtLH( - tvec3 const & eye, - tvec3 const & center, - tvec3 const & up); + vec<3, T, P> const & eye, + vec<3, T, P> const & center, + vec<3, T, P> const & up); /// @} }//namespace glm diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index b9ff418b..69878776 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -8,7 +8,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER tmat4x4 translate(tmat4x4 const & m, tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 translate(tmat4x4 const & m, vec<3, T, P> const & v) { tmat4x4 Result(m); Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; @@ -16,14 +16,14 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 rotate(tmat4x4 const & m, T angle, tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 rotate(tmat4x4 const & m, T angle, vec<3, T, P> const & v) { T const a = angle; T const c = cos(a); T const s = sin(a); - tvec3 axis(normalize(v)); - tvec3 temp((T(1) - c) * axis); + vec<3, T, P> axis(normalize(v)); + vec<3, T, P> temp((T(1) - c) * axis); tmat4x4 Rotate(uninitialize); Rotate[0][0] = c + temp[0] * axis[0]; @@ -47,14 +47,14 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 rotate_slow(tmat4x4 const & m, T angle, tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 rotate_slow(tmat4x4 const & m, T angle, vec<3, T, P> const & v) { T const a = angle; T const c = cos(a); T const s = sin(a); tmat4x4 Result; - tvec3 axis = normalize(v); + vec<3, T, P> axis = normalize(v); Result[0][0] = c + (static_cast(1) - c) * axis.x * axis.x; Result[0][1] = (static_cast(1) - c) * axis.x * axis.y + s * axis.z; @@ -71,12 +71,12 @@ namespace glm Result[2][2] = c + (static_cast(1) - c) * axis.z * axis.z; Result[2][3] = static_cast(0); - Result[3] = tvec4(0, 0, 0, 1); + Result[3] = vec<4, T, P>(0, 0, 0, 1); return m * Result; } template - GLM_FUNC_QUALIFIER tmat4x4 scale(tmat4x4 const & m, tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 scale(tmat4x4 const & m, vec<3, T, P> const & v) { tmat4x4 Result(uninitialize); Result[0] = m[0] * v[0]; @@ -87,7 +87,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 scale_slow(tmat4x4 const & m, tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 scale_slow(tmat4x4 const & m, vec<3, T, P> const & v) { tmat4x4 Result(T(1)); Result[0][0] = v.x; @@ -436,15 +436,15 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 project + GLM_FUNC_QUALIFIER vec<3, T, P> project ( - tvec3 const & obj, + vec<3, T, P> const & obj, tmat4x4 const & model, tmat4x4 const & proj, - tvec4 const & viewport + vec<4, U, P> const & viewport ) { - tvec4 tmp = tvec4(obj, static_cast(1)); + vec<4, T, P> tmp = vec<4, T, P>(obj, static_cast(1)); tmp = model * tmp; tmp = proj * tmp; @@ -458,21 +458,21 @@ namespace glm tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]); tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]); - return tvec3(tmp); + return vec<3, T, P>(tmp); } template - GLM_FUNC_QUALIFIER tvec3 unProject + GLM_FUNC_QUALIFIER vec<3, T, P> unProject ( - tvec3 const & win, + vec<3, T, P> const & win, tmat4x4 const & model, tmat4x4 const & proj, - tvec4 const & viewport + vec<4, U, P> const & viewport ) { tmat4x4 Inverse = inverse(proj * model); - tvec4 tmp = tvec4(win, T(1)); + vec<4, T, P> tmp = vec<4, T, P>(win, T(1)); tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]); tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]); # if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE @@ -482,14 +482,14 @@ namespace glm tmp = tmp * static_cast(2) - static_cast(1); # endif - tvec4 obj = Inverse * tmp; + vec<4, T, P> obj = Inverse * tmp; obj /= obj.w; - return tvec3(obj); + return vec<3, T, P>(obj); } template - GLM_FUNC_QUALIFIER tmat4x4 pickMatrix(tvec2 const & center, tvec2 const & delta, tvec4 const & viewport) + GLM_FUNC_QUALIFIER tmat4x4 pickMatrix(vec<2, T, P> const & center, vec<2, T, P> const & delta, vec<4, U, P> const & viewport) { assert(delta.x > static_cast(0) && delta.y > static_cast(0)); tmat4x4 Result(static_cast(1)); @@ -497,18 +497,18 @@ namespace glm if(!(delta.x > static_cast(0) && delta.y > static_cast(0))) return Result; // Error - tvec3 Temp( + vec<3, T, P> Temp( (static_cast(viewport[2]) - static_cast(2) * (center.x - static_cast(viewport[0]))) / delta.x, (static_cast(viewport[3]) - static_cast(2) * (center.y - static_cast(viewport[1]))) / delta.y, static_cast(0)); // Translate and scale the picked region to the entire window Result = translate(Result, Temp); - return scale(Result, tvec3(static_cast(viewport[2]) / delta.x, static_cast(viewport[3]) / delta.y, static_cast(1))); + return scale(Result, vec<3, T, P>(static_cast(viewport[2]) / delta.x, static_cast(viewport[3]) / delta.y, static_cast(1))); } template - GLM_FUNC_QUALIFIER tmat4x4 lookAt(tvec3 const & eye, tvec3 const & center, tvec3 const & up) + GLM_FUNC_QUALIFIER tmat4x4 lookAt(vec<3, T, P> const & eye, vec<3, T, P> const & center, vec<3, T, P> const & up) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return lookAtLH(eye, center, up); @@ -520,14 +520,14 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 lookAtRH ( - tvec3 const & eye, - tvec3 const & center, - tvec3 const & up + vec<3, T, P> const & eye, + vec<3, T, P> const & center, + vec<3, T, P> const & up ) { - tvec3 const f(normalize(center - eye)); - tvec3 const s(normalize(cross(f, up))); - tvec3 const u(cross(s, f)); + vec<3, T, P> const f(normalize(center - eye)); + vec<3, T, P> const s(normalize(cross(f, up))); + vec<3, T, P> const u(cross(s, f)); tmat4x4 Result(1); Result[0][0] = s.x; @@ -548,14 +548,14 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 lookAtLH ( - tvec3 const & eye, - tvec3 const & center, - tvec3 const & up + vec<3, T, P> const & eye, + vec<3, T, P> const & center, + vec<3, T, P> const & up ) { - tvec3 const f(normalize(center - eye)); - tvec3 const s(normalize(cross(up, f))); - tvec3 const u(cross(f, s)); + vec<3, T, P> const f(normalize(center - eye)); + vec<3, T, P> const s(normalize(cross(up, f))); + vec<3, T, P> const u(cross(f, s)); tmat4x4 Result(1); Result[0][0] = s.x; diff --git a/glm/gtc/noise.inl b/glm/gtc/noise.inl index 4f2731c4..5ab15472 100644 --- a/glm/gtc/noise.inl +++ b/glm/gtc/noise.inl @@ -10,634 +10,634 @@ namespace glm{ namespace gtc { template - GLM_FUNC_QUALIFIER tvec4 grad4(T const & j, tvec4 const & ip) + GLM_FUNC_QUALIFIER vec<4, T, P> grad4(T const & j, vec<4, T, P> const & ip) { - tvec3 pXYZ = floor(fract(tvec3(j) * tvec3(ip)) * T(7)) * ip[2] - T(1); - T pW = static_cast(1.5) - dot(abs(pXYZ), tvec3(1)); - tvec4 s = tvec4(lessThan(tvec4(pXYZ, pW), tvec4(0.0))); - pXYZ = pXYZ + (tvec3(s) * T(2) - T(1)) * s.w; - return tvec4(pXYZ, pW); + vec<3, T, P> pXYZ = floor(fract(vec<3, T, P>(j) * vec<3, T, P>(ip)) * T(7)) * ip[2] - T(1); + T pW = static_cast(1.5) - dot(abs(pXYZ), vec<3, T, P>(1)); + vec<4, T, P> s = vec<4, T, P>(lessThan(vec<4, T, P>(pXYZ, pW), vec<4, T, P>(0.0))); + pXYZ = pXYZ + (vec<3, T, P>(s) * T(2) - T(1)) * s.w; + return vec<4, T, P>(pXYZ, pW); } }//namespace gtc // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec2 const & Position) + GLM_FUNC_QUALIFIER T perlin(vec<2, T, P> const & Position) { - tvec4 Pi = glm::floor(tvec4(Position.x, Position.y, Position.x, Position.y)) + tvec4(0.0, 0.0, 1.0, 1.0); - tvec4 Pf = glm::fract(tvec4(Position.x, Position.y, Position.x, Position.y)) - tvec4(0.0, 0.0, 1.0, 1.0); - Pi = mod(Pi, tvec4(289)); // To avoid truncation effects in permutation - tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); - tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); - tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); - tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); + vec<4, T, P> Pi = glm::floor(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) + vec<4, T, P>(0.0, 0.0, 1.0, 1.0); + vec<4, T, P> Pf = glm::fract(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) - vec<4, T, P>(0.0, 0.0, 1.0, 1.0); + Pi = mod(Pi, vec<4, T, P>(289)); // To avoid truncation effects in permutation + vec<4, T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z); + vec<4, T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w); + vec<4, T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z); + vec<4, T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w); - tvec4 i = detail::permute(detail::permute(ix) + iy); + vec<4, T, P> i = detail::permute(detail::permute(ix) + iy); - tvec4 gx = static_cast(2) * glm::fract(i / T(41)) - T(1); - tvec4 gy = glm::abs(gx) - T(0.5); - tvec4 tx = glm::floor(gx + T(0.5)); + vec<4, T, P> gx = static_cast(2) * glm::fract(i / T(41)) - T(1); + vec<4, T, P> gy = glm::abs(gx) - T(0.5); + vec<4, T, P> tx = glm::floor(gx + T(0.5)); gx = gx - tx; - tvec2 g00(gx.x, gy.x); - tvec2 g10(gx.y, gy.y); - tvec2 g01(gx.z, gy.z); - tvec2 g11(gx.w, gy.w); + vec<2, T, P> g00(gx.x, gy.x); + vec<2, T, P> g10(gx.y, gy.y); + vec<2, T, P> g01(gx.z, gy.z); + vec<2, T, P> g11(gx.w, gy.w); - tvec4 norm = detail::taylorInvSqrt(tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); + vec<4, T, P> norm = detail::taylorInvSqrt(vec<4, T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); g00 *= norm.x; g01 *= norm.y; g10 *= norm.z; g11 *= norm.w; - T n00 = dot(g00, tvec2(fx.x, fy.x)); - T n10 = dot(g10, tvec2(fx.y, fy.y)); - T n01 = dot(g01, tvec2(fx.z, fy.z)); - T n11 = dot(g11, tvec2(fx.w, fy.w)); + T n00 = dot(g00, vec<2, T, P>(fx.x, fy.x)); + T n10 = dot(g10, vec<2, T, P>(fx.y, fy.y)); + T n01 = dot(g01, vec<2, T, P>(fx.z, fy.z)); + T n11 = dot(g11, vec<2, T, P>(fx.w, fy.w)); - tvec2 fade_xy = detail::fade(tvec2(Pf.x, Pf.y)); - tvec2 n_x = mix(tvec2(n00, n01), tvec2(n10, n11), fade_xy.x); + vec<2, T, P> fade_xy = detail::fade(vec<2, T, P>(Pf.x, Pf.y)); + vec<2, T, P> n_x = mix(vec<2, T, P>(n00, n01), vec<2, T, P>(n10, n11), fade_xy.x); T n_xy = mix(n_x.x, n_x.y, fade_xy.y); return T(2.3) * n_xy; } // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec3 const & Position) + GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & Position) { - tvec3 Pi0 = floor(Position); // Integer part for indexing - tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 + vec<3, T, P> Pi0 = floor(Position); // Integer part for indexing + vec<3, T, P> Pi1 = Pi0 + T(1); // Integer part + 1 Pi0 = detail::mod289(Pi0); Pi1 = detail::mod289(Pi1); - tvec3 Pf0 = fract(Position); // Fractional part for interpolation - tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - tvec4 iy = tvec4(tvec2(Pi0.y), tvec2(Pi1.y)); - tvec4 iz0(Pi0.z); - tvec4 iz1(Pi1.z); + vec<3, T, P> Pf0 = fract(Position); // Fractional part for interpolation + vec<3, T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0 + vec<4, T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + vec<4, T, P> iy = vec<4, T, P>(vec<2, T, P>(Pi0.y), vec<2, T, P>(Pi1.y)); + vec<4, T, P> iz0(Pi0.z); + vec<4, T, P> iz1(Pi1.z); - tvec4 ixy = detail::permute(detail::permute(ix) + iy); - tvec4 ixy0 = detail::permute(ixy + iz0); - tvec4 ixy1 = detail::permute(ixy + iz1); + vec<4, T, P> ixy = detail::permute(detail::permute(ix) + iy); + vec<4, T, P> ixy0 = detail::permute(ixy + iz0); + vec<4, T, P> ixy1 = detail::permute(ixy + iz1); - tvec4 gx0 = ixy0 * T(1.0 / 7.0); - tvec4 gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5); + vec<4, T, P> gx0 = ixy0 * T(1.0 / 7.0); + vec<4, T, P> gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5); gx0 = fract(gx0); - tvec4 gz0 = tvec4(0.5) - abs(gx0) - abs(gy0); - tvec4 sz0 = step(gz0, tvec4(0.0)); + vec<4, T, P> gz0 = vec<4, T, P>(0.5) - abs(gx0) - abs(gy0); + vec<4, T, P> sz0 = step(gz0, vec<4, T, P>(0.0)); gx0 -= sz0 * (step(T(0), gx0) - T(0.5)); gy0 -= sz0 * (step(T(0), gy0) - T(0.5)); - tvec4 gx1 = ixy1 * T(1.0 / 7.0); - tvec4 gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5); + vec<4, T, P> gx1 = ixy1 * T(1.0 / 7.0); + vec<4, T, P> gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5); gx1 = fract(gx1); - tvec4 gz1 = tvec4(0.5) - abs(gx1) - abs(gy1); - tvec4 sz1 = step(gz1, tvec4(0.0)); + vec<4, T, P> gz1 = vec<4, T, P>(0.5) - abs(gx1) - abs(gy1); + vec<4, T, P> sz1 = step(gz1, vec<4, T, P>(0.0)); gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); - tvec3 g000(gx0.x, gy0.x, gz0.x); - tvec3 g100(gx0.y, gy0.y, gz0.y); - tvec3 g010(gx0.z, gy0.z, gz0.z); - tvec3 g110(gx0.w, gy0.w, gz0.w); - tvec3 g001(gx1.x, gy1.x, gz1.x); - tvec3 g101(gx1.y, gy1.y, gz1.y); - tvec3 g011(gx1.z, gy1.z, gz1.z); - tvec3 g111(gx1.w, gy1.w, gz1.w); + vec<3, T, P> g000(gx0.x, gy0.x, gz0.x); + vec<3, T, P> g100(gx0.y, gy0.y, gz0.y); + vec<3, T, P> g010(gx0.z, gy0.z, gz0.z); + vec<3, T, P> g110(gx0.w, gy0.w, gz0.w); + vec<3, T, P> g001(gx1.x, gy1.x, gz1.x); + vec<3, T, P> g101(gx1.y, gy1.y, gz1.y); + vec<3, T, P> g011(gx1.z, gy1.z, gz1.z); + vec<3, T, P> g111(gx1.w, gy1.w, gz1.w); - tvec4 norm0 = detail::taylorInvSqrt(tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + vec<4, T, P> norm0 = detail::taylorInvSqrt(vec<4, T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); g000 *= norm0.x; g010 *= norm0.y; g100 *= norm0.z; g110 *= norm0.w; - tvec4 norm1 = detail::taylorInvSqrt(tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + vec<4, T, P> norm1 = detail::taylorInvSqrt(vec<4, T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); g001 *= norm1.x; g011 *= norm1.y; g101 *= norm1.z; g111 *= norm1.w; T n000 = dot(g000, Pf0); - T n100 = dot(g100, tvec3(Pf1.x, Pf0.y, Pf0.z)); - T n010 = dot(g010, tvec3(Pf0.x, Pf1.y, Pf0.z)); - T n110 = dot(g110, tvec3(Pf1.x, Pf1.y, Pf0.z)); - T n001 = dot(g001, tvec3(Pf0.x, Pf0.y, Pf1.z)); - T n101 = dot(g101, tvec3(Pf1.x, Pf0.y, Pf1.z)); - T n011 = dot(g011, tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n100 = dot(g100, vec<3, T, P>(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, vec<3, T, P>(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, vec<3, T, P>(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, vec<3, T, P>(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, vec<3, T, P>(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, vec<3, T, P>(Pf0.x, Pf1.y, Pf1.z)); T n111 = dot(g111, Pf1); - tvec3 fade_xyz = detail::fade(Pf0); - tvec4 n_z = mix(tvec4(n000, n100, n010, n110), tvec4(n001, n101, n011, n111), fade_xyz.z); - tvec2 n_yz = mix(tvec2(n_z.x, n_z.y), tvec2(n_z.z, n_z.w), fade_xyz.y); + vec<3, T, P> fade_xyz = detail::fade(Pf0); + vec<4, T, P> n_z = mix(vec<4, T, P>(n000, n100, n010, n110), vec<4, T, P>(n001, n101, n011, n111), fade_xyz.z); + vec<2, T, P> n_yz = mix(vec<2, T, P>(n_z.x, n_z.y), vec<2, T, P>(n_z.z, n_z.w), fade_xyz.y); T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); return T(2.2) * n_xyz; } /* // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec3 const & P) + GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & P) { - tvec3 Pi0 = floor(P); // Integer part for indexing - tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 + vec<3, T, P> Pi0 = floor(P); // Integer part for indexing + vec<3, T, P> Pi1 = Pi0 + T(1); // Integer part + 1 Pi0 = mod(Pi0, T(289)); Pi1 = mod(Pi1, T(289)); - tvec3 Pf0 = fract(P); // Fractional part for interpolation - tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - tvec4 iz0(Pi0.z); - tvec4 iz1(Pi1.z); + vec<3, T, P> Pf0 = fract(P); // Fractional part for interpolation + vec<3, T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0 + vec<4, T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + vec<4, T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + vec<4, T, P> iz0(Pi0.z); + vec<4, T, P> iz1(Pi1.z); - tvec4 ixy = permute(permute(ix) + iy); - tvec4 ixy0 = permute(ixy + iz0); - tvec4 ixy1 = permute(ixy + iz1); + vec<4, T, P> ixy = permute(permute(ix) + iy); + vec<4, T, P> ixy0 = permute(ixy + iz0); + vec<4, T, P> ixy1 = permute(ixy + iz1); - tvec4 gx0 = ixy0 / T(7); - tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); + vec<4, T, P> gx0 = ixy0 / T(7); + vec<4, T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5); gx0 = fract(gx0); - tvec4 gz0 = tvec4(0.5) - abs(gx0) - abs(gy0); - tvec4 sz0 = step(gz0, tvec4(0.0)); + vec<4, T, P> gz0 = vec<4, T, P>(0.5) - abs(gx0) - abs(gy0); + vec<4, T, P> sz0 = step(gz0, vec<4, T, P>(0.0)); gx0 -= sz0 * (step(0.0, gx0) - T(0.5)); gy0 -= sz0 * (step(0.0, gy0) - T(0.5)); - tvec4 gx1 = ixy1 / T(7); - tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); + vec<4, T, P> gx1 = ixy1 / T(7); + vec<4, T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5); gx1 = fract(gx1); - tvec4 gz1 = tvec4(0.5) - abs(gx1) - abs(gy1); - tvec4 sz1 = step(gz1, tvec4(0.0)); + vec<4, T, P> gz1 = vec<4, T, P>(0.5) - abs(gx1) - abs(gy1); + vec<4, T, P> sz1 = step(gz1, vec<4, T, P>(0.0)); gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); - tvec3 g000(gx0.x, gy0.x, gz0.x); - tvec3 g100(gx0.y, gy0.y, gz0.y); - tvec3 g010(gx0.z, gy0.z, gz0.z); - tvec3 g110(gx0.w, gy0.w, gz0.w); - tvec3 g001(gx1.x, gy1.x, gz1.x); - tvec3 g101(gx1.y, gy1.y, gz1.y); - tvec3 g011(gx1.z, gy1.z, gz1.z); - tvec3 g111(gx1.w, gy1.w, gz1.w); + vec<3, T, P> g000(gx0.x, gy0.x, gz0.x); + vec<3, T, P> g100(gx0.y, gy0.y, gz0.y); + vec<3, T, P> g010(gx0.z, gy0.z, gz0.z); + vec<3, T, P> g110(gx0.w, gy0.w, gz0.w); + vec<3, T, P> g001(gx1.x, gy1.x, gz1.x); + vec<3, T, P> g101(gx1.y, gy1.y, gz1.y); + vec<3, T, P> g011(gx1.z, gy1.z, gz1.z); + vec<3, T, P> g111(gx1.w, gy1.w, gz1.w); - tvec4 norm0 = taylorInvSqrt(tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + vec<4, T, P> norm0 = taylorInvSqrt(vec<4, T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); g000 *= norm0.x; g010 *= norm0.y; g100 *= norm0.z; g110 *= norm0.w; - tvec4 norm1 = taylorInvSqrt(tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + vec<4, T, P> norm1 = taylorInvSqrt(vec<4, T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); g001 *= norm1.x; g011 *= norm1.y; g101 *= norm1.z; g111 *= norm1.w; T n000 = dot(g000, Pf0); - T n100 = dot(g100, tvec3(Pf1.x, Pf0.y, Pf0.z)); - T n010 = dot(g010, tvec3(Pf0.x, Pf1.y, Pf0.z)); - T n110 = dot(g110, tvec3(Pf1.x, Pf1.y, Pf0.z)); - T n001 = dot(g001, tvec3(Pf0.x, Pf0.y, Pf1.z)); - T n101 = dot(g101, tvec3(Pf1.x, Pf0.y, Pf1.z)); - T n011 = dot(g011, tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n100 = dot(g100, vec<3, T, P>(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, vec<3, T, P>(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, vec<3, T, P>(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, vec<3, T, P>(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, vec<3, T, P>(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, vec<3, T, P>(Pf0.x, Pf1.y, Pf1.z)); T n111 = dot(g111, Pf1); - tvec3 fade_xyz = fade(Pf0); - tvec4 n_z = mix(tvec4(n000, n100, n010, n110), tvec4(n001, n101, n011, n111), fade_xyz.z); - tvec2 n_yz = mix( - tvec2(n_z.x, n_z.y), - tvec2(n_z.z, n_z.w), fade_xyz.y); + vec<3, T, P> fade_xyz = fade(Pf0); + vec<4, T, P> n_z = mix(vec<4, T, P>(n000, n100, n010, n110), vec<4, T, P>(n001, n101, n011, n111), fade_xyz.z); + vec<2, T, P> n_yz = mix( + vec<2, T, P>(n_z.x, n_z.y), + vec<2, T, P>(n_z.z, n_z.w), fade_xyz.y); T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); return T(2.2) * n_xyz; } */ // Classic Perlin noise template - GLM_FUNC_QUALIFIER T perlin(tvec4 const & Position) + GLM_FUNC_QUALIFIER T perlin(vec<4, T, P> const & Position) { - tvec4 Pi0 = floor(Position); // Integer part for indexing - tvec4 Pi1 = Pi0 + T(1); // Integer part + 1 - Pi0 = mod(Pi0, tvec4(289)); - Pi1 = mod(Pi1, tvec4(289)); - tvec4 Pf0 = fract(Position); // Fractional part for interpolation - tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - tvec4 iz0(Pi0.z); - tvec4 iz1(Pi1.z); - tvec4 iw0(Pi0.w); - tvec4 iw1(Pi1.w); + vec<4, T, P> Pi0 = floor(Position); // Integer part for indexing + vec<4, T, P> Pi1 = Pi0 + T(1); // Integer part + 1 + Pi0 = mod(Pi0, vec<4, T, P>(289)); + Pi1 = mod(Pi1, vec<4, T, P>(289)); + vec<4, T, P> Pf0 = fract(Position); // Fractional part for interpolation + vec<4, T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0 + vec<4, T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + vec<4, T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + vec<4, T, P> iz0(Pi0.z); + vec<4, T, P> iz1(Pi1.z); + vec<4, T, P> iw0(Pi0.w); + vec<4, T, P> iw1(Pi1.w); - tvec4 ixy = detail::permute(detail::permute(ix) + iy); - tvec4 ixy0 = detail::permute(ixy + iz0); - tvec4 ixy1 = detail::permute(ixy + iz1); - tvec4 ixy00 = detail::permute(ixy0 + iw0); - tvec4 ixy01 = detail::permute(ixy0 + iw1); - tvec4 ixy10 = detail::permute(ixy1 + iw0); - tvec4 ixy11 = detail::permute(ixy1 + iw1); + vec<4, T, P> ixy = detail::permute(detail::permute(ix) + iy); + vec<4, T, P> ixy0 = detail::permute(ixy + iz0); + vec<4, T, P> ixy1 = detail::permute(ixy + iz1); + vec<4, T, P> ixy00 = detail::permute(ixy0 + iw0); + vec<4, T, P> ixy01 = detail::permute(ixy0 + iw1); + vec<4, T, P> ixy10 = detail::permute(ixy1 + iw0); + vec<4, T, P> ixy11 = detail::permute(ixy1 + iw1); - tvec4 gx00 = ixy00 / T(7); - tvec4 gy00 = floor(gx00) / T(7); - tvec4 gz00 = floor(gy00) / T(6); + vec<4, T, P> gx00 = ixy00 / T(7); + vec<4, T, P> gy00 = floor(gx00) / T(7); + vec<4, T, P> gz00 = floor(gy00) / T(6); gx00 = fract(gx00) - T(0.5); gy00 = fract(gy00) - T(0.5); gz00 = fract(gz00) - T(0.5); - tvec4 gw00 = tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); - tvec4 sw00 = step(gw00, tvec4(0.0)); + vec<4, T, P> gw00 = vec<4, T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00); + vec<4, T, P> sw00 = step(gw00, vec<4, T, P>(0.0)); gx00 -= sw00 * (step(T(0), gx00) - T(0.5)); gy00 -= sw00 * (step(T(0), gy00) - T(0.5)); - tvec4 gx01 = ixy01 / T(7); - tvec4 gy01 = floor(gx01) / T(7); - tvec4 gz01 = floor(gy01) / T(6); + vec<4, T, P> gx01 = ixy01 / T(7); + vec<4, T, P> gy01 = floor(gx01) / T(7); + vec<4, T, P> gz01 = floor(gy01) / T(6); gx01 = fract(gx01) - T(0.5); gy01 = fract(gy01) - T(0.5); gz01 = fract(gz01) - T(0.5); - tvec4 gw01 = tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); - tvec4 sw01 = step(gw01, tvec4(0.0)); + vec<4, T, P> gw01 = vec<4, T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01); + vec<4, T, P> sw01 = step(gw01, vec<4, T, P>(0.0)); gx01 -= sw01 * (step(T(0), gx01) - T(0.5)); gy01 -= sw01 * (step(T(0), gy01) - T(0.5)); - tvec4 gx10 = ixy10 / T(7); - tvec4 gy10 = floor(gx10) / T(7); - tvec4 gz10 = floor(gy10) / T(6); + vec<4, T, P> gx10 = ixy10 / T(7); + vec<4, T, P> gy10 = floor(gx10) / T(7); + vec<4, T, P> gz10 = floor(gy10) / T(6); gx10 = fract(gx10) - T(0.5); gy10 = fract(gy10) - T(0.5); gz10 = fract(gz10) - T(0.5); - tvec4 gw10 = tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); - tvec4 sw10 = step(gw10, tvec4(0)); + vec<4, T, P> gw10 = vec<4, T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10); + vec<4, T, P> sw10 = step(gw10, vec<4, T, P>(0)); gx10 -= sw10 * (step(T(0), gx10) - T(0.5)); gy10 -= sw10 * (step(T(0), gy10) - T(0.5)); - tvec4 gx11 = ixy11 / T(7); - tvec4 gy11 = floor(gx11) / T(7); - tvec4 gz11 = floor(gy11) / T(6); + vec<4, T, P> gx11 = ixy11 / T(7); + vec<4, T, P> gy11 = floor(gx11) / T(7); + vec<4, T, P> gz11 = floor(gy11) / T(6); gx11 = fract(gx11) - T(0.5); gy11 = fract(gy11) - T(0.5); gz11 = fract(gz11) - T(0.5); - tvec4 gw11 = tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); - tvec4 sw11 = step(gw11, tvec4(0.0)); + vec<4, T, P> gw11 = vec<4, T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11); + vec<4, T, P> sw11 = step(gw11, vec<4, T, P>(0.0)); gx11 -= sw11 * (step(T(0), gx11) - T(0.5)); gy11 -= sw11 * (step(T(0), gy11) - T(0.5)); - tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); - tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); - tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); - tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); - tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); - tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); - tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); - tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); - tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); - tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); - tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); - tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); - tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); - tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); - tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); - tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); + vec<4, T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x); + vec<4, T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y); + vec<4, T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z); + vec<4, T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w); + vec<4, T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x); + vec<4, T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y); + vec<4, T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z); + vec<4, T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w); + vec<4, T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x); + vec<4, T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y); + vec<4, T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z); + vec<4, T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w); + vec<4, T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x); + vec<4, T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y); + vec<4, T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z); + vec<4, T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w); - tvec4 norm00 = detail::taylorInvSqrt(tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); + vec<4, T, P> norm00 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); g0000 *= norm00.x; g0100 *= norm00.y; g1000 *= norm00.z; g1100 *= norm00.w; - tvec4 norm01 = detail::taylorInvSqrt(tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); + vec<4, T, P> norm01 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); g0001 *= norm01.x; g0101 *= norm01.y; g1001 *= norm01.z; g1101 *= norm01.w; - tvec4 norm10 = detail::taylorInvSqrt(tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); + vec<4, T, P> norm10 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); g0010 *= norm10.x; g0110 *= norm10.y; g1010 *= norm10.z; g1110 *= norm10.w; - tvec4 norm11 = detail::taylorInvSqrt(tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); + vec<4, T, P> norm11 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); g0011 *= norm11.x; g0111 *= norm11.y; g1011 *= norm11.z; g1111 *= norm11.w; T n0000 = dot(g0000, Pf0); - T n1000 = dot(g1000, tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); - T n0100 = dot(g0100, tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); - T n1100 = dot(g1100, tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); - T n0010 = dot(g0010, tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); - T n1010 = dot(g1010, tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); - T n0110 = dot(g0110, tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); - T n1110 = dot(g1110, tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); - T n0001 = dot(g0001, tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); - T n1001 = dot(g1001, tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); - T n0101 = dot(g0101, tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); - T n1101 = dot(g1101, tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); - T n0011 = dot(g0011, tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); - T n1011 = dot(g1011, tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); - T n0111 = dot(g0111, tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); + T n1000 = dot(g1000, vec<4, T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); + T n0100 = dot(g0100, vec<4, T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); + T n1100 = dot(g1100, vec<4, T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); + T n0010 = dot(g0010, vec<4, T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); + T n1010 = dot(g1010, vec<4, T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); + T n0110 = dot(g0110, vec<4, T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); + T n1110 = dot(g1110, vec<4, T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); + T n0001 = dot(g0001, vec<4, T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); + T n1001 = dot(g1001, vec<4, T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); + T n0101 = dot(g0101, vec<4, T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); + T n1101 = dot(g1101, vec<4, T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); + T n0011 = dot(g0011, vec<4, T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); + T n1011 = dot(g1011, vec<4, T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); + T n0111 = dot(g0111, vec<4, T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); T n1111 = dot(g1111, Pf1); - tvec4 fade_xyzw = detail::fade(Pf0); - tvec4 n_0w = mix(tvec4(n0000, n1000, n0100, n1100), tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); - tvec4 n_1w = mix(tvec4(n0010, n1010, n0110, n1110), tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); - tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); - tvec2 n_yzw = mix(tvec2(n_zw.x, n_zw.y), tvec2(n_zw.z, n_zw.w), fade_xyzw.y); + vec<4, T, P> fade_xyzw = detail::fade(Pf0); + vec<4, T, P> n_0w = mix(vec<4, T, P>(n0000, n1000, n0100, n1100), vec<4, T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w); + vec<4, T, P> n_1w = mix(vec<4, T, P>(n0010, n1010, n0110, n1110), vec<4, T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w); + vec<4, T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z); + vec<2, T, P> n_yzw = mix(vec<2, T, P>(n_zw.x, n_zw.y), vec<2, T, P>(n_zw.z, n_zw.w), fade_xyzw.y); T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); return T(2.2) * n_xyzw; } // Classic Perlin noise, periodic variant template - GLM_FUNC_QUALIFIER T perlin(tvec2 const & Position, tvec2 const & rep) + GLM_FUNC_QUALIFIER T perlin(vec<2, T, P> const & Position, vec<2, T, P> const & rep) { - tvec4 Pi = floor(tvec4(Position.x, Position.y, Position.x, Position.y)) + tvec4(0.0, 0.0, 1.0, 1.0); - tvec4 Pf = fract(tvec4(Position.x, Position.y, Position.x, Position.y)) - tvec4(0.0, 0.0, 1.0, 1.0); - Pi = mod(Pi, tvec4(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period - Pi = mod(Pi, tvec4(289)); // To avoid truncation effects in permutation - tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); - tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); - tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); - tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); + vec<4, T, P> Pi = floor(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) + vec<4, T, P>(0.0, 0.0, 1.0, 1.0); + vec<4, T, P> Pf = fract(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) - vec<4, T, P>(0.0, 0.0, 1.0, 1.0); + Pi = mod(Pi, vec<4, T, P>(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period + Pi = mod(Pi, vec<4, T, P>(289)); // To avoid truncation effects in permutation + vec<4, T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z); + vec<4, T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w); + vec<4, T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z); + vec<4, T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w); - tvec4 i = detail::permute(detail::permute(ix) + iy); + vec<4, T, P> i = detail::permute(detail::permute(ix) + iy); - tvec4 gx = static_cast(2) * fract(i / T(41)) - T(1); - tvec4 gy = abs(gx) - T(0.5); - tvec4 tx = floor(gx + T(0.5)); + vec<4, T, P> gx = static_cast(2) * fract(i / T(41)) - T(1); + vec<4, T, P> gy = abs(gx) - T(0.5); + vec<4, T, P> tx = floor(gx + T(0.5)); gx = gx - tx; - tvec2 g00(gx.x, gy.x); - tvec2 g10(gx.y, gy.y); - tvec2 g01(gx.z, gy.z); - tvec2 g11(gx.w, gy.w); + vec<2, T, P> g00(gx.x, gy.x); + vec<2, T, P> g10(gx.y, gy.y); + vec<2, T, P> g01(gx.z, gy.z); + vec<2, T, P> g11(gx.w, gy.w); - tvec4 norm = detail::taylorInvSqrt(tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); + vec<4, T, P> norm = detail::taylorInvSqrt(vec<4, T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); g00 *= norm.x; g01 *= norm.y; g10 *= norm.z; g11 *= norm.w; - T n00 = dot(g00, tvec2(fx.x, fy.x)); - T n10 = dot(g10, tvec2(fx.y, fy.y)); - T n01 = dot(g01, tvec2(fx.z, fy.z)); - T n11 = dot(g11, tvec2(fx.w, fy.w)); + T n00 = dot(g00, vec<2, T, P>(fx.x, fy.x)); + T n10 = dot(g10, vec<2, T, P>(fx.y, fy.y)); + T n01 = dot(g01, vec<2, T, P>(fx.z, fy.z)); + T n11 = dot(g11, vec<2, T, P>(fx.w, fy.w)); - tvec2 fade_xy = detail::fade(tvec2(Pf.x, Pf.y)); - tvec2 n_x = mix(tvec2(n00, n01), tvec2(n10, n11), fade_xy.x); + vec<2, T, P> fade_xy = detail::fade(vec<2, T, P>(Pf.x, Pf.y)); + vec<2, T, P> n_x = mix(vec<2, T, P>(n00, n01), vec<2, T, P>(n10, n11), fade_xy.x); T n_xy = mix(n_x.x, n_x.y, fade_xy.y); return T(2.3) * n_xy; } // Classic Perlin noise, periodic variant template - GLM_FUNC_QUALIFIER T perlin(tvec3 const & Position, tvec3 const & rep) + GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & Position, vec<3, T, P> const & rep) { - tvec3 Pi0 = mod(floor(Position), rep); // Integer part, modulo period - tvec3 Pi1 = mod(Pi0 + tvec3(T(1)), rep); // Integer part + 1, mod period - Pi0 = mod(Pi0, tvec3(289)); - Pi1 = mod(Pi1, tvec3(289)); - tvec3 Pf0 = fract(Position); // Fractional part for interpolation - tvec3 Pf1 = Pf0 - tvec3(T(1)); // Fractional part - 1.0 - tvec4 ix = tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - tvec4 iy = tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - tvec4 iz0(Pi0.z); - tvec4 iz1(Pi1.z); + vec<3, T, P> Pi0 = mod(floor(Position), rep); // Integer part, modulo period + vec<3, T, P> Pi1 = mod(Pi0 + vec<3, T, P>(T(1)), rep); // Integer part + 1, mod period + Pi0 = mod(Pi0, vec<3, T, P>(289)); + Pi1 = mod(Pi1, vec<3, T, P>(289)); + vec<3, T, P> Pf0 = fract(Position); // Fractional part for interpolation + vec<3, T, P> Pf1 = Pf0 - vec<3, T, P>(T(1)); // Fractional part - 1.0 + vec<4, T, P> ix = vec<4, T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + vec<4, T, P> iy = vec<4, T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + vec<4, T, P> iz0(Pi0.z); + vec<4, T, P> iz1(Pi1.z); - tvec4 ixy = detail::permute(detail::permute(ix) + iy); - tvec4 ixy0 = detail::permute(ixy + iz0); - tvec4 ixy1 = detail::permute(ixy + iz1); + vec<4, T, P> ixy = detail::permute(detail::permute(ix) + iy); + vec<4, T, P> ixy0 = detail::permute(ixy + iz0); + vec<4, T, P> ixy1 = detail::permute(ixy + iz1); - tvec4 gx0 = ixy0 / T(7); - tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); + vec<4, T, P> gx0 = ixy0 / T(7); + vec<4, T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5); gx0 = fract(gx0); - tvec4 gz0 = tvec4(0.5) - abs(gx0) - abs(gy0); - tvec4 sz0 = step(gz0, tvec4(0)); + vec<4, T, P> gz0 = vec<4, T, P>(0.5) - abs(gx0) - abs(gy0); + vec<4, T, P> sz0 = step(gz0, vec<4, T, P>(0)); gx0 -= sz0 * (step(T(0), gx0) - T(0.5)); gy0 -= sz0 * (step(T(0), gy0) - T(0.5)); - tvec4 gx1 = ixy1 / T(7); - tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); + vec<4, T, P> gx1 = ixy1 / T(7); + vec<4, T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5); gx1 = fract(gx1); - tvec4 gz1 = tvec4(0.5) - abs(gx1) - abs(gy1); - tvec4 sz1 = step(gz1, tvec4(T(0))); + vec<4, T, P> gz1 = vec<4, T, P>(0.5) - abs(gx1) - abs(gy1); + vec<4, T, P> sz1 = step(gz1, vec<4, T, P>(T(0))); gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); - tvec3 g000 = tvec3(gx0.x, gy0.x, gz0.x); - tvec3 g100 = tvec3(gx0.y, gy0.y, gz0.y); - tvec3 g010 = tvec3(gx0.z, gy0.z, gz0.z); - tvec3 g110 = tvec3(gx0.w, gy0.w, gz0.w); - tvec3 g001 = tvec3(gx1.x, gy1.x, gz1.x); - tvec3 g101 = tvec3(gx1.y, gy1.y, gz1.y); - tvec3 g011 = tvec3(gx1.z, gy1.z, gz1.z); - tvec3 g111 = tvec3(gx1.w, gy1.w, gz1.w); + vec<3, T, P> g000 = vec<3, T, P>(gx0.x, gy0.x, gz0.x); + vec<3, T, P> g100 = vec<3, T, P>(gx0.y, gy0.y, gz0.y); + vec<3, T, P> g010 = vec<3, T, P>(gx0.z, gy0.z, gz0.z); + vec<3, T, P> g110 = vec<3, T, P>(gx0.w, gy0.w, gz0.w); + vec<3, T, P> g001 = vec<3, T, P>(gx1.x, gy1.x, gz1.x); + vec<3, T, P> g101 = vec<3, T, P>(gx1.y, gy1.y, gz1.y); + vec<3, T, P> g011 = vec<3, T, P>(gx1.z, gy1.z, gz1.z); + vec<3, T, P> g111 = vec<3, T, P>(gx1.w, gy1.w, gz1.w); - tvec4 norm0 = detail::taylorInvSqrt(tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + vec<4, T, P> norm0 = detail::taylorInvSqrt(vec<4, T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); g000 *= norm0.x; g010 *= norm0.y; g100 *= norm0.z; g110 *= norm0.w; - tvec4 norm1 = detail::taylorInvSqrt(tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + vec<4, T, P> norm1 = detail::taylorInvSqrt(vec<4, T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); g001 *= norm1.x; g011 *= norm1.y; g101 *= norm1.z; g111 *= norm1.w; T n000 = dot(g000, Pf0); - T n100 = dot(g100, tvec3(Pf1.x, Pf0.y, Pf0.z)); - T n010 = dot(g010, tvec3(Pf0.x, Pf1.y, Pf0.z)); - T n110 = dot(g110, tvec3(Pf1.x, Pf1.y, Pf0.z)); - T n001 = dot(g001, tvec3(Pf0.x, Pf0.y, Pf1.z)); - T n101 = dot(g101, tvec3(Pf1.x, Pf0.y, Pf1.z)); - T n011 = dot(g011, tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n100 = dot(g100, vec<3, T, P>(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, vec<3, T, P>(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, vec<3, T, P>(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, vec<3, T, P>(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, vec<3, T, P>(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, vec<3, T, P>(Pf0.x, Pf1.y, Pf1.z)); T n111 = dot(g111, Pf1); - tvec3 fade_xyz = detail::fade(Pf0); - tvec4 n_z = mix(tvec4(n000, n100, n010, n110), tvec4(n001, n101, n011, n111), fade_xyz.z); - tvec2 n_yz = mix(tvec2(n_z.x, n_z.y), tvec2(n_z.z, n_z.w), fade_xyz.y); + vec<3, T, P> fade_xyz = detail::fade(Pf0); + vec<4, T, P> n_z = mix(vec<4, T, P>(n000, n100, n010, n110), vec<4, T, P>(n001, n101, n011, n111), fade_xyz.z); + vec<2, T, P> n_yz = mix(vec<2, T, P>(n_z.x, n_z.y), vec<2, T, P>(n_z.z, n_z.w), fade_xyz.y); T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); return T(2.2) * n_xyz; } // Classic Perlin noise, periodic version template - GLM_FUNC_QUALIFIER T perlin(tvec4 const & Position, tvec4 const & rep) + GLM_FUNC_QUALIFIER T perlin(vec<4, T, P> const & Position, vec<4, T, P> const & rep) { - tvec4 Pi0 = mod(floor(Position), rep); // Integer part modulo rep - tvec4 Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep - tvec4 Pf0 = fract(Position); // Fractional part for interpolation - tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - tvec4 ix = tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - tvec4 iy = tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - tvec4 iz0(Pi0.z); - tvec4 iz1(Pi1.z); - tvec4 iw0(Pi0.w); - tvec4 iw1(Pi1.w); + vec<4, T, P> Pi0 = mod(floor(Position), rep); // Integer part modulo rep + vec<4, T, P> Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep + vec<4, T, P> Pf0 = fract(Position); // Fractional part for interpolation + vec<4, T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0 + vec<4, T, P> ix = vec<4, T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + vec<4, T, P> iy = vec<4, T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + vec<4, T, P> iz0(Pi0.z); + vec<4, T, P> iz1(Pi1.z); + vec<4, T, P> iw0(Pi0.w); + vec<4, T, P> iw1(Pi1.w); - tvec4 ixy = detail::permute(detail::permute(ix) + iy); - tvec4 ixy0 = detail::permute(ixy + iz0); - tvec4 ixy1 = detail::permute(ixy + iz1); - tvec4 ixy00 = detail::permute(ixy0 + iw0); - tvec4 ixy01 = detail::permute(ixy0 + iw1); - tvec4 ixy10 = detail::permute(ixy1 + iw0); - tvec4 ixy11 = detail::permute(ixy1 + iw1); + vec<4, T, P> ixy = detail::permute(detail::permute(ix) + iy); + vec<4, T, P> ixy0 = detail::permute(ixy + iz0); + vec<4, T, P> ixy1 = detail::permute(ixy + iz1); + vec<4, T, P> ixy00 = detail::permute(ixy0 + iw0); + vec<4, T, P> ixy01 = detail::permute(ixy0 + iw1); + vec<4, T, P> ixy10 = detail::permute(ixy1 + iw0); + vec<4, T, P> ixy11 = detail::permute(ixy1 + iw1); - tvec4 gx00 = ixy00 / T(7); - tvec4 gy00 = floor(gx00) / T(7); - tvec4 gz00 = floor(gy00) / T(6); + vec<4, T, P> gx00 = ixy00 / T(7); + vec<4, T, P> gy00 = floor(gx00) / T(7); + vec<4, T, P> gz00 = floor(gy00) / T(6); gx00 = fract(gx00) - T(0.5); gy00 = fract(gy00) - T(0.5); gz00 = fract(gz00) - T(0.5); - tvec4 gw00 = tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); - tvec4 sw00 = step(gw00, tvec4(0)); + vec<4, T, P> gw00 = vec<4, T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00); + vec<4, T, P> sw00 = step(gw00, vec<4, T, P>(0)); gx00 -= sw00 * (step(T(0), gx00) - T(0.5)); gy00 -= sw00 * (step(T(0), gy00) - T(0.5)); - tvec4 gx01 = ixy01 / T(7); - tvec4 gy01 = floor(gx01) / T(7); - tvec4 gz01 = floor(gy01) / T(6); + vec<4, T, P> gx01 = ixy01 / T(7); + vec<4, T, P> gy01 = floor(gx01) / T(7); + vec<4, T, P> gz01 = floor(gy01) / T(6); gx01 = fract(gx01) - T(0.5); gy01 = fract(gy01) - T(0.5); gz01 = fract(gz01) - T(0.5); - tvec4 gw01 = tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); - tvec4 sw01 = step(gw01, tvec4(0.0)); + vec<4, T, P> gw01 = vec<4, T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01); + vec<4, T, P> sw01 = step(gw01, vec<4, T, P>(0.0)); gx01 -= sw01 * (step(T(0), gx01) - T(0.5)); gy01 -= sw01 * (step(T(0), gy01) - T(0.5)); - tvec4 gx10 = ixy10 / T(7); - tvec4 gy10 = floor(gx10) / T(7); - tvec4 gz10 = floor(gy10) / T(6); + vec<4, T, P> gx10 = ixy10 / T(7); + vec<4, T, P> gy10 = floor(gx10) / T(7); + vec<4, T, P> gz10 = floor(gy10) / T(6); gx10 = fract(gx10) - T(0.5); gy10 = fract(gy10) - T(0.5); gz10 = fract(gz10) - T(0.5); - tvec4 gw10 = tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); - tvec4 sw10 = step(gw10, tvec4(0.0)); + vec<4, T, P> gw10 = vec<4, T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10); + vec<4, T, P> sw10 = step(gw10, vec<4, T, P>(0.0)); gx10 -= sw10 * (step(T(0), gx10) - T(0.5)); gy10 -= sw10 * (step(T(0), gy10) - T(0.5)); - tvec4 gx11 = ixy11 / T(7); - tvec4 gy11 = floor(gx11) / T(7); - tvec4 gz11 = floor(gy11) / T(6); + vec<4, T, P> gx11 = ixy11 / T(7); + vec<4, T, P> gy11 = floor(gx11) / T(7); + vec<4, T, P> gz11 = floor(gy11) / T(6); gx11 = fract(gx11) - T(0.5); gy11 = fract(gy11) - T(0.5); gz11 = fract(gz11) - T(0.5); - tvec4 gw11 = tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); - tvec4 sw11 = step(gw11, tvec4(T(0))); + vec<4, T, P> gw11 = vec<4, T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11); + vec<4, T, P> sw11 = step(gw11, vec<4, T, P>(T(0))); gx11 -= sw11 * (step(T(0), gx11) - T(0.5)); gy11 -= sw11 * (step(T(0), gy11) - T(0.5)); - tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); - tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); - tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); - tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); - tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); - tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); - tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); - tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); - tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); - tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); - tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); - tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); - tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); - tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); - tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); - tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); + vec<4, T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x); + vec<4, T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y); + vec<4, T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z); + vec<4, T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w); + vec<4, T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x); + vec<4, T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y); + vec<4, T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z); + vec<4, T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w); + vec<4, T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x); + vec<4, T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y); + vec<4, T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z); + vec<4, T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w); + vec<4, T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x); + vec<4, T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y); + vec<4, T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z); + vec<4, T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w); - tvec4 norm00 = detail::taylorInvSqrt(tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); + vec<4, T, P> norm00 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); g0000 *= norm00.x; g0100 *= norm00.y; g1000 *= norm00.z; g1100 *= norm00.w; - tvec4 norm01 = detail::taylorInvSqrt(tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); + vec<4, T, P> norm01 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); g0001 *= norm01.x; g0101 *= norm01.y; g1001 *= norm01.z; g1101 *= norm01.w; - tvec4 norm10 = detail::taylorInvSqrt(tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); + vec<4, T, P> norm10 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); g0010 *= norm10.x; g0110 *= norm10.y; g1010 *= norm10.z; g1110 *= norm10.w; - tvec4 norm11 = detail::taylorInvSqrt(tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); + vec<4, T, P> norm11 = detail::taylorInvSqrt(vec<4, T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); g0011 *= norm11.x; g0111 *= norm11.y; g1011 *= norm11.z; g1111 *= norm11.w; T n0000 = dot(g0000, Pf0); - T n1000 = dot(g1000, tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); - T n0100 = dot(g0100, tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); - T n1100 = dot(g1100, tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); - T n0010 = dot(g0010, tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); - T n1010 = dot(g1010, tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); - T n0110 = dot(g0110, tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); - T n1110 = dot(g1110, tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); - T n0001 = dot(g0001, tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); - T n1001 = dot(g1001, tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); - T n0101 = dot(g0101, tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); - T n1101 = dot(g1101, tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); - T n0011 = dot(g0011, tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); - T n1011 = dot(g1011, tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); - T n0111 = dot(g0111, tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); + T n1000 = dot(g1000, vec<4, T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); + T n0100 = dot(g0100, vec<4, T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); + T n1100 = dot(g1100, vec<4, T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); + T n0010 = dot(g0010, vec<4, T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); + T n1010 = dot(g1010, vec<4, T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); + T n0110 = dot(g0110, vec<4, T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); + T n1110 = dot(g1110, vec<4, T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); + T n0001 = dot(g0001, vec<4, T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); + T n1001 = dot(g1001, vec<4, T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); + T n0101 = dot(g0101, vec<4, T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); + T n1101 = dot(g1101, vec<4, T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); + T n0011 = dot(g0011, vec<4, T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); + T n1011 = dot(g1011, vec<4, T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); + T n0111 = dot(g0111, vec<4, T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); T n1111 = dot(g1111, Pf1); - tvec4 fade_xyzw = detail::fade(Pf0); - tvec4 n_0w = mix(tvec4(n0000, n1000, n0100, n1100), tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); - tvec4 n_1w = mix(tvec4(n0010, n1010, n0110, n1110), tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); - tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); - tvec2 n_yzw = mix(tvec2(n_zw.x, n_zw.y), tvec2(n_zw.z, n_zw.w), fade_xyzw.y); + vec<4, T, P> fade_xyzw = detail::fade(Pf0); + vec<4, T, P> n_0w = mix(vec<4, T, P>(n0000, n1000, n0100, n1100), vec<4, T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w); + vec<4, T, P> n_1w = mix(vec<4, T, P>(n0010, n1010, n0110, n1110), vec<4, T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w); + vec<4, T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z); + vec<2, T, P> n_yzw = mix(vec<2, T, P>(n_zw.x, n_zw.y), vec<2, T, P>(n_zw.z, n_zw.w), fade_xyzw.y); T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); return T(2.2) * n_xyzw; } template - GLM_FUNC_QUALIFIER T simplex(glm::tvec2 const & v) + GLM_FUNC_QUALIFIER T simplex(glm::vec<2, T, P> const & v) { - tvec4 const C = tvec4( + vec<4, T, P> const C = vec<4, T, P>( T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) T(-0.577350269189626), // -1.0 + 2.0 * C.x T( 0.024390243902439)); // 1.0 / 41.0 // First corner - tvec2 i = floor(v + dot(v, tvec2(C[1]))); - tvec2 x0 = v - i + dot(i, tvec2(C[0])); + vec<2, T, P> i = floor(v + dot(v, vec<2, T, P>(C[1]))); + vec<2, T, P> x0 = v - i + dot(i, vec<2, T, P>(C[0])); // Other corners //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 //i1.y = 1.0 - i1.x; - tvec2 i1 = (x0.x > x0.y) ? tvec2(1, 0) : tvec2(0, 1); + vec<2, T, P> i1 = (x0.x > x0.y) ? vec<2, T, P>(1, 0) : vec<2, T, P>(0, 1); // x0 = x0 - 0.0 + 0.0 * C.xx ; // x1 = x0 - i1 + 1.0 * C.xx ; // x2 = x0 - 1.0 + 2.0 * C.xx ; - tvec4 x12 = tvec4(x0.x, x0.y, x0.x, x0.y) + tvec4(C.x, C.x, C.z, C.z); - x12 = tvec4(tvec2(x12) - i1, x12.z, x12.w); + vec<4, T, P> x12 = vec<4, T, P>(x0.x, x0.y, x0.x, x0.y) + vec<4, T, P>(C.x, C.x, C.z, C.z); + x12 = vec<4, T, P>(vec<2, T, P>(x12) - i1, x12.z, x12.w); // Permutations - i = mod(i, tvec2(289)); // Avoid truncation effects in permutation - tvec3 p = detail::permute( - detail::permute(i.y + tvec3(T(0), i1.y, T(1))) - + i.x + tvec3(T(0), i1.x, T(1))); + i = mod(i, vec<2, T, P>(289)); // Avoid truncation effects in permutation + vec<3, T, P> p = detail::permute( + detail::permute(i.y + vec<3, T, P>(T(0), i1.y, T(1))) + + i.x + vec<3, T, P>(T(0), i1.x, T(1))); - tvec3 m = max(tvec3(0.5) - tvec3( + vec<3, T, P> m = max(vec<3, T, P>(0.5) - vec<3, T, P>( dot(x0, x0), - dot(tvec2(x12.x, x12.y), tvec2(x12.x, x12.y)), - dot(tvec2(x12.z, x12.w), tvec2(x12.z, x12.w))), tvec3(0)); + dot(vec<2, T, P>(x12.x, x12.y), vec<2, T, P>(x12.x, x12.y)), + dot(vec<2, T, P>(x12.z, x12.w), vec<2, T, P>(x12.z, x12.w))), vec<3, T, P>(0)); m = m * m ; m = m * m ; // Gradients: 41 points uniformly over a line, mapped onto a diamond. // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) - tvec3 x = static_cast(2) * fract(p * C.w) - T(1); - tvec3 h = abs(x) - T(0.5); - tvec3 ox = floor(x + T(0.5)); - tvec3 a0 = x - ox; + vec<3, T, P> x = static_cast(2) * fract(p * C.w) - T(1); + vec<3, T, P> h = abs(x) - T(0.5); + vec<3, T, P> ox = floor(x + T(0.5)); + vec<3, T, P> a0 = x - ox; // Normalise gradients implicitly by scaling m // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); m *= static_cast(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); // Compute final noise value at P - tvec3 g; + vec<3, T, P> g; g.x = a0.x * x0.x + h.x * x0.y; //g.yz = a0.yz * x12.xz + h.yz * x12.yw; g.y = a0.y * x12.x + h.y * x12.y; @@ -646,84 +646,84 @@ namespace gtc } template - GLM_FUNC_QUALIFIER T simplex(tvec3 const & v) + GLM_FUNC_QUALIFIER T simplex(vec<3, T, P> const & v) { - tvec2 const C(1.0 / 6.0, 1.0 / 3.0); - tvec4 const D(0.0, 0.5, 1.0, 2.0); + vec<2, T, P> const C(1.0 / 6.0, 1.0 / 3.0); + vec<4, T, P> const D(0.0, 0.5, 1.0, 2.0); // First corner - tvec3 i(floor(v + dot(v, tvec3(C.y)))); - tvec3 x0(v - i + dot(i, tvec3(C.x))); + vec<3, T, P> i(floor(v + dot(v, vec<3, T, P>(C.y)))); + vec<3, T, P> x0(v - i + dot(i, vec<3, T, P>(C.x))); // Other corners - tvec3 g(step(tvec3(x0.y, x0.z, x0.x), x0)); - tvec3 l(T(1) - g); - tvec3 i1(min(g, tvec3(l.z, l.x, l.y))); - tvec3 i2(max(g, tvec3(l.z, l.x, l.y))); + vec<3, T, P> g(step(vec<3, T, P>(x0.y, x0.z, x0.x), x0)); + vec<3, T, P> l(T(1) - g); + vec<3, T, P> i1(min(g, vec<3, T, P>(l.z, l.x, l.y))); + vec<3, T, P> i2(max(g, vec<3, T, P>(l.z, l.x, l.y))); // x0 = x0 - 0.0 + 0.0 * C.xxx; // x1 = x0 - i1 + 1.0 * C.xxx; // x2 = x0 - i2 + 2.0 * C.xxx; // x3 = x0 - 1.0 + 3.0 * C.xxx; - tvec3 x1(x0 - i1 + C.x); - tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y - tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y + vec<3, T, P> x1(x0 - i1 + C.x); + vec<3, T, P> x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y + vec<3, T, P> x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y // Permutations i = detail::mod289(i); - tvec4 p(detail::permute(detail::permute(detail::permute( - i.z + tvec4(T(0), i1.z, i2.z, T(1))) + - i.y + tvec4(T(0), i1.y, i2.y, T(1))) + - i.x + tvec4(T(0), i1.x, i2.x, T(1)))); + vec<4, T, P> p(detail::permute(detail::permute(detail::permute( + i.z + vec<4, T, P>(T(0), i1.z, i2.z, T(1))) + + i.y + vec<4, T, P>(T(0), i1.y, i2.y, T(1))) + + i.x + vec<4, T, P>(T(0), i1.x, i2.x, T(1)))); // Gradients: 7x7 points over a square, mapped onto an octahedron. // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) T n_ = static_cast(0.142857142857); // 1.0/7.0 - tvec3 ns(n_ * tvec3(D.w, D.y, D.z) - tvec3(D.x, D.z, D.x)); + vec<3, T, P> ns(n_ * vec<3, T, P>(D.w, D.y, D.z) - vec<3, T, P>(D.x, D.z, D.x)); - tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) + vec<4, T, P> j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) - tvec4 x_(floor(j * ns.z)); - tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) + vec<4, T, P> x_(floor(j * ns.z)); + vec<4, T, P> y_(floor(j - T(7) * x_)); // mod(j,N) - tvec4 x(x_ * ns.x + ns.y); - tvec4 y(y_ * ns.x + ns.y); - tvec4 h(T(1) - abs(x) - abs(y)); + vec<4, T, P> x(x_ * ns.x + ns.y); + vec<4, T, P> y(y_ * ns.x + ns.y); + vec<4, T, P> h(T(1) - abs(x) - abs(y)); - tvec4 b0(x.x, x.y, y.x, y.y); - tvec4 b1(x.z, x.w, y.z, y.w); + vec<4, T, P> b0(x.x, x.y, y.x, y.y); + vec<4, T, P> b1(x.z, x.w, y.z, y.w); // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; - tvec4 s0(floor(b0) * T(2) + T(1)); - tvec4 s1(floor(b1) * T(2) + T(1)); - tvec4 sh(-step(h, tvec4(0.0))); + vec<4, T, P> s0(floor(b0) * T(2) + T(1)); + vec<4, T, P> s1(floor(b1) * T(2) + T(1)); + vec<4, T, P> sh(-step(h, vec<4, T, P>(0.0))); - tvec4 a0 = tvec4(b0.x, b0.z, b0.y, b0.w) + tvec4(s0.x, s0.z, s0.y, s0.w) * tvec4(sh.x, sh.x, sh.y, sh.y); - tvec4 a1 = tvec4(b1.x, b1.z, b1.y, b1.w) + tvec4(s1.x, s1.z, s1.y, s1.w) * tvec4(sh.z, sh.z, sh.w, sh.w); + vec<4, T, P> a0 = vec<4, T, P>(b0.x, b0.z, b0.y, b0.w) + vec<4, T, P>(s0.x, s0.z, s0.y, s0.w) * vec<4, T, P>(sh.x, sh.x, sh.y, sh.y); + vec<4, T, P> a1 = vec<4, T, P>(b1.x, b1.z, b1.y, b1.w) + vec<4, T, P>(s1.x, s1.z, s1.y, s1.w) * vec<4, T, P>(sh.z, sh.z, sh.w, sh.w); - tvec3 p0(a0.x, a0.y, h.x); - tvec3 p1(a0.z, a0.w, h.y); - tvec3 p2(a1.x, a1.y, h.z); - tvec3 p3(a1.z, a1.w, h.w); + vec<3, T, P> p0(a0.x, a0.y, h.x); + vec<3, T, P> p1(a0.z, a0.w, h.y); + vec<3, T, P> p2(a1.x, a1.y, h.z); + vec<3, T, P> p3(a1.z, a1.w, h.w); // Normalise gradients - tvec4 norm = detail::taylorInvSqrt(tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + vec<4, T, P> norm = detail::taylorInvSqrt(vec<4, T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; p3 *= norm.w; // Mix final noise value - tvec4 m = max(T(0.6) - tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), tvec4(0)); + vec<4, T, P> m = max(T(0.6) - vec<4, T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), vec<4, T, P>(0)); m = m * m; - return T(42) * dot(m * m, tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); + return T(42) * dot(m * m, vec<4, T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); } template - GLM_FUNC_QUALIFIER T simplex(tvec4 const & v) + GLM_FUNC_QUALIFIER T simplex(vec<4, T, P> const & v) { - tvec4 const C( + vec<4, T, P> const C( 0.138196601125011, // (5 - sqrt(5))/20 G4 0.276393202250021, // 2 * G4 0.414589803375032, // 3 * G4 @@ -733,63 +733,63 @@ namespace gtc T const F4 = static_cast(0.309016994374947451); // First corner - tvec4 i = floor(v + dot(v, vec4(F4))); - tvec4 x0 = v - i + dot(i, vec4(C.x)); + vec<4, T, P> i = floor(v + dot(v, vec4(F4))); + vec<4, T, P> x0 = v - i + dot(i, vec4(C.x)); // Other corners // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) - tvec4 i0; - tvec3 isX = step(tvec3(x0.y, x0.z, x0.w), tvec3(x0.x)); - tvec3 isYZ = step(tvec3(x0.z, x0.w, x0.w), tvec3(x0.y, x0.y, x0.z)); + vec<4, T, P> i0; + vec<3, T, P> isX = step(vec<3, T, P>(x0.y, x0.z, x0.w), vec<3, T, P>(x0.x)); + vec<3, T, P> isYZ = step(vec<3, T, P>(x0.z, x0.w, x0.w), vec<3, T, P>(x0.y, x0.y, x0.z)); // i0.x = dot(isX, vec3(1.0)); //i0.x = isX.x + isX.y + isX.z; //i0.yzw = static_cast(1) - isX; - i0 = tvec4(isX.x + isX.y + isX.z, T(1) - isX); + i0 = vec<4, T, P>(isX.x + isX.y + isX.z, T(1) - isX); // i0.y += dot(isYZ.xy, vec2(1.0)); i0.y += isYZ.x + isYZ.y; - //i0.zw += 1.0 - tvec2(isYZ.x, isYZ.y); + //i0.zw += 1.0 - vec<2, T, P>(isYZ.x, isYZ.y); i0.z += static_cast(1) - isYZ.x; i0.w += static_cast(1) - isYZ.y; i0.z += isYZ.z; i0.w += static_cast(1) - isYZ.z; // i0 now contains the unique values 0,1,2,3 in each channel - tvec4 i3 = clamp(i0, T(0), T(1)); - tvec4 i2 = clamp(i0 - T(1), T(0), T(1)); - tvec4 i1 = clamp(i0 - T(2), T(0), T(1)); + vec<4, T, P> i3 = clamp(i0, T(0), T(1)); + vec<4, T, P> i2 = clamp(i0 - T(1), T(0), T(1)); + vec<4, T, P> i1 = clamp(i0 - T(2), T(0), T(1)); // x0 = x0 - 0.0 + 0.0 * C.xxxx // x1 = x0 - i1 + 0.0 * C.xxxx // x2 = x0 - i2 + 0.0 * C.xxxx // x3 = x0 - i3 + 0.0 * C.xxxx // x4 = x0 - 1.0 + 4.0 * C.xxxx - tvec4 x1 = x0 - i1 + C.x; - tvec4 x2 = x0 - i2 + C.y; - tvec4 x3 = x0 - i3 + C.z; - tvec4 x4 = x0 + C.w; + vec<4, T, P> x1 = x0 - i1 + C.x; + vec<4, T, P> x2 = x0 - i2 + C.y; + vec<4, T, P> x3 = x0 - i3 + C.z; + vec<4, T, P> x4 = x0 + C.w; // Permutations - i = mod(i, tvec4(289)); + i = mod(i, vec<4, T, P>(289)); T j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x); - tvec4 j1 = detail::permute(detail::permute(detail::permute(detail::permute( - i.w + tvec4(i1.w, i2.w, i3.w, T(1))) + - i.z + tvec4(i1.z, i2.z, i3.z, T(1))) + - i.y + tvec4(i1.y, i2.y, i3.y, T(1))) + - i.x + tvec4(i1.x, i2.x, i3.x, T(1))); + vec<4, T, P> j1 = detail::permute(detail::permute(detail::permute(detail::permute( + i.w + vec<4, T, P>(i1.w, i2.w, i3.w, T(1))) + + i.z + vec<4, T, P>(i1.z, i2.z, i3.z, T(1))) + + i.y + vec<4, T, P>(i1.y, i2.y, i3.y, T(1))) + + i.x + vec<4, T, P>(i1.x, i2.x, i3.x, T(1))); // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope // 7*7*6 = 294, which is close to the ring size 17*17 = 289. - tvec4 ip = tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); + vec<4, T, P> ip = vec<4, T, P>(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); - tvec4 p0 = gtc::grad4(j0, ip); - tvec4 p1 = gtc::grad4(j1.x, ip); - tvec4 p2 = gtc::grad4(j1.y, ip); - tvec4 p3 = gtc::grad4(j1.z, ip); - tvec4 p4 = gtc::grad4(j1.w, ip); + vec<4, T, P> p0 = gtc::grad4(j0, ip); + vec<4, T, P> p1 = gtc::grad4(j1.x, ip); + vec<4, T, P> p2 = gtc::grad4(j1.y, ip); + vec<4, T, P> p3 = gtc::grad4(j1.z, ip); + vec<4, T, P> p4 = gtc::grad4(j1.w, ip); // Normalise gradients - tvec4 norm = detail::taylorInvSqrt(tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + vec<4, T, P> norm = detail::taylorInvSqrt(vec<4, T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; @@ -797,12 +797,12 @@ namespace gtc p4 *= detail::taylorInvSqrt(dot(p4, p4)); // Mix contributions from the five corners - tvec3 m0 = max(T(0.6) - tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), tvec3(0)); - tvec2 m1 = max(T(0.6) - tvec2(dot(x3, x3), dot(x4, x4) ), tvec2(0)); + vec<3, T, P> m0 = max(T(0.6) - vec<3, T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2)), vec<3, T, P>(0)); + vec<2, T, P> m1 = max(T(0.6) - vec<2, T, P>(dot(x3, x3), dot(x4, x4) ), vec<2, T, P>(0)); m0 = m0 * m0; m1 = m1 * m1; return T(49) * - (dot(m0 * m0, tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + - dot(m1 * m1, tvec2(dot(p3, x3), dot(p4, x4)))); + (dot(m0 * m0, vec<3, T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + + dot(m1 * m1, vec<2, T, P>(dot(p3, x3), dot(p4, x4)))); } }//namespace glm diff --git a/glm/gtc/packing.hpp b/glm/gtc/packing.hpp index 4c3793bf..ac656640 100644 --- a/glm/gtc/packing.hpp +++ b/glm/gtc/packing.hpp @@ -475,20 +475,20 @@ namespace glm /// the forth component specifies the 16 most-significant bits. /// /// @see gtc_packing - /// @see tvec3 unpackRGBM(tvec4 const & p) + /// @see vec<3, T, P> unpackRGBM(vec<4, T, P> const & p) /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions template - GLM_FUNC_DECL tvec4 packRGBM(tvec3 const & rgb); + GLM_FUNC_DECL vec<4, T, P> packRGBM(vec<3, T, P> const & rgb); /// Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values. /// The first component of the vector is obtained from the 16 least-significant bits of v; /// the forth component is obtained from the 16 most-significant bits of v. /// /// @see gtc_packing - /// @see tvec4 packRGBM(tvec3 const & v) + /// @see vec<4, T, P> packRGBM(vec<3, float, P> const & v) /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions template - GLM_FUNC_DECL tvec3 unpackRGBM(tvec4 const & rgbm); + GLM_FUNC_DECL vec<3, T, P> unpackRGBM(vec<4, T, P> const & rgbm); /// Returns an unsigned integer vector obtained by converting the components of a floating-point vector /// to the 16-bit floating-point representation found in the OpenGL Specification. diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index a317f08c..4aaca57a 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -85,7 +85,7 @@ namespace glm // -- Explicit basic constructors -- GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tquat(ctor); - GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & s, tvec3 const & v); + GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & s, vec<3, T, P> const & v); GLM_FUNC_DECL GLM_CONSTEXPR tquat(T const & w, T const & x, T const & y, T const & z); // -- Conversion constructors -- @@ -105,10 +105,10 @@ namespace glm /// @param v A second normalized axis /// @see gtc_quaternion /// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors - GLM_FUNC_DECL tquat(tvec3 const & u, tvec3 const & v); + GLM_FUNC_DECL tquat(vec<3, T, P> const & u, vec<3, T, P> const & v); /// Build a quaternion from euler angles (pitch, yaw, roll), in radians. - GLM_FUNC_DECL GLM_EXPLICIT tquat(tvec3 const & eulerAngles); + GLM_FUNC_DECL GLM_EXPLICIT tquat(vec<3, T, P> const & eulerAngles); GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat3x3 const & m); GLM_FUNC_DECL GLM_EXPLICIT tquat(tmat4x4 const & m); @@ -147,16 +147,16 @@ namespace glm GLM_FUNC_DECL tquat operator*(tquat const & q, tquat const & p); template - GLM_FUNC_DECL tvec3 operator*(tquat const & q, tvec3 const & v); + GLM_FUNC_DECL vec<3, T, P> operator*(tquat const & q, vec<3, T, P> const & v); template - GLM_FUNC_DECL tvec3 operator*(tvec3 const & v, tquat const & q); + GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tquat const & q); template - GLM_FUNC_DECL tvec4 operator*(tquat const & q, tvec4 const & v); + GLM_FUNC_DECL vec<4, T, P> operator*(tquat const & q, vec<4, T, P> const & v); template - GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, tquat const & q); + GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tquat const & q); template GLM_FUNC_DECL tquat operator*(tquat const & q, T const & s); @@ -248,14 +248,14 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat rotate(tquat const & q, T const & angle, tvec3 const & axis); + GLM_FUNC_DECL tquat rotate(tquat const & q, T const & angle, vec<3, T, P> const & axis); /// Returns euler angles, pitch as x, yaw as y, roll as z. /// The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise. /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec3 eulerAngles(tquat const & x); + GLM_FUNC_DECL vec<3, T, P> eulerAngles(tquat const & x); /// Returns roll value of euler angles expressed in radians. /// @@ -309,7 +309,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec3 axis(tquat const & x); + GLM_FUNC_DECL vec<3, T, P> axis(tquat const & x); /// Build a quaternion from an angle and a normalized axis. /// @@ -318,7 +318,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat angleAxis(T const & angle, tvec3 const & axis); + GLM_FUNC_DECL tquat angleAxis(T const & angle, vec<3, T, P> const & axis); /// Returns the component-wise comparison result of x < y. /// @@ -326,7 +326,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 lessThan(tquat const & x, tquat const & y); + GLM_FUNC_DECL vec<4, bool, P> lessThan(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x <= y. /// @@ -334,7 +334,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 lessThanEqual(tquat const & x, tquat const & y); + GLM_FUNC_DECL vec<4, bool, P> lessThanEqual(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x > y. /// @@ -342,7 +342,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 greaterThan(tquat const & x, tquat const & y); + GLM_FUNC_DECL vec<4, bool, P> greaterThan(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x >= y. /// @@ -350,7 +350,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 greaterThanEqual(tquat const & x, tquat const & y); + GLM_FUNC_DECL vec<4, bool, P> greaterThanEqual(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x == y. /// @@ -358,7 +358,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 equal(tquat const & x, tquat const & y); + GLM_FUNC_DECL vec<4, bool, P> equal(tquat const & x, tquat const & y); /// Returns the component-wise comparison of result x != y. /// @@ -366,7 +366,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tvec4 notEqual(tquat const & x, tquat const & y); + GLM_FUNC_DECL vec<4, bool, P> notEqual(tquat const & x, tquat const & y); /// Returns true if x holds a NaN (not a number) /// representation in the underlying implementation's set of @@ -378,7 +378,7 @@ namespace glm /// /// @tparam genType Floating-point scalar or vector types. template - GLM_FUNC_DECL tvec4 isnan(tquat const & x); + GLM_FUNC_DECL vec<4, bool, P> isnan(tquat const & x); /// Returns true if x holds a positive infinity or negative /// infinity representation in the underlying implementation's @@ -388,7 +388,7 @@ namespace glm /// /// @tparam genType Floating-point scalar or vector types. template - GLM_FUNC_DECL tvec4 isinf(tquat const & x); + GLM_FUNC_DECL vec<4, bool, P> isinf(tquat const & x); /// @} } //namespace glm diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 0d4d734b..8e48702d 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -14,7 +14,7 @@ namespace detail { static GLM_FUNC_QUALIFIER T call(tquat const& a, tquat const& b) { - tvec4 tmp(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w); + vec<4, T, P> tmp(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w); return (tmp.x + tmp.y) + (tmp.z + tmp.w); } }; @@ -58,9 +58,9 @@ namespace detail template struct compute_quat_mul_vec4 { - static tvec4 call(tquat const & q, tvec4 const & v) + static vec<4, T, P> call(tquat const & q, vec<4, T, P> const & v) { - return tvec4(q * tvec3(v), v.w); + return vec<4, T, P>(q * vec<3, T, P>(v), v.w); } }; }//namespace detail @@ -112,7 +112,7 @@ namespace detail {} template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat::tquat(T const & s, tvec3 const & v) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat::tquat(T const & s, vec<3, T, P> const & v) : x(v.x), y(v.y), z(v.z), w(s) {} @@ -140,9 +140,9 @@ namespace detail // valType const & roll //) //{ - // tvec3 eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5)); - // tvec3 c = glm::cos(eulerAngle * valType(0.5)); - // tvec3 s = glm::sin(eulerAngle * valType(0.5)); + // vec<3, valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5)); + // vec<3, valType> c = glm::cos(eulerAngle * valType(0.5)); + // vec<3, valType> s = glm::sin(eulerAngle * valType(0.5)); // // this->w = c.x * c.y * c.z + s.x * s.y * s.z; // this->x = s.x * c.y * c.z - c.x * s.y * s.z; @@ -151,9 +151,9 @@ namespace detail //} template - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & u, tvec3 const & v) + GLM_FUNC_QUALIFIER tquat::tquat(vec<3, T, P> const & u, vec<3, T, P> const & v) { - tvec3 const LocalW(cross(u, v)); + vec<3, T, P> const LocalW(cross(u, v)); T Dot = detail::compute_dot, T, detail::is_aligned

::value>::call(u, v); tquat q(T(1) + Dot, LocalW.x, LocalW.y, LocalW.z); @@ -161,10 +161,10 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat::tquat(tvec3 const & eulerAngle) + GLM_FUNC_QUALIFIER tquat::tquat(vec<3, T, P> const & eulerAngle) { - tvec3 c = glm::cos(eulerAngle * T(0.5)); - tvec3 s = glm::sin(eulerAngle * T(0.5)); + vec<3, T, P> c = glm::cos(eulerAngle * T(0.5)); + vec<3, T, P> s = glm::sin(eulerAngle * T(0.5)); this->w = c.x * c.y * c.z + s.x * s.y * s.z; this->x = s.x * c.y * c.z - c.x * s.y * s.z; @@ -306,29 +306,29 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec3 operator*(tquat const & q, tvec3 const & v) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tquat const & q, vec<3, T, P> const & v) { - tvec3 const QuatVector(q.x, q.y, q.z); - tvec3 const uv(glm::cross(QuatVector, v)); - tvec3 const uuv(glm::cross(QuatVector, uv)); + vec<3, T, P> const QuatVector(q.x, q.y, q.z); + vec<3, T, P> const uv(glm::cross(QuatVector, v)); + vec<3, T, P> const uuv(glm::cross(QuatVector, uv)); return v + ((uv * q.w) + uuv) * static_cast(2); } template - GLM_FUNC_QUALIFIER tvec3 operator*(tvec3 const & v, tquat const & q) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tquat const & q) { return glm::inverse(q) * v; } template - GLM_FUNC_QUALIFIER tvec4 operator*(tquat const& q, tvec4 const& v) + GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tquat const& q, vec<4, T, P> const& v) { return detail::compute_quat_mul_vec4::value>::call(q, v); } template - GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, tquat const & q) + GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tquat const & q) { return glm::inverse(q) * v; } @@ -538,9 +538,9 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat rotate(tquat const & q, T const & angle, tvec3 const & v) + GLM_FUNC_QUALIFIER tquat rotate(tquat const & q, T const & angle, vec<3, T, P> const & v) { - tvec3 Tmp = v; + vec<3, T, P> Tmp = v; // Axis of rotation must be normalised T len = glm::length(Tmp); @@ -560,9 +560,9 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec3 eulerAngles(tquat const & x) + GLM_FUNC_QUALIFIER vec<3, T, P> eulerAngles(tquat const & x) { - return tvec3(pitch(x), yaw(x), roll(x)); + return vec<3, T, P>(pitch(x), yaw(x), roll(x)); } template @@ -694,17 +694,17 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec3 axis(tquat const & x) + GLM_FUNC_QUALIFIER vec<3, T, P> axis(tquat const & x) { T tmp1 = static_cast(1) - x.w * x.w; if(tmp1 <= static_cast(0)) - return tvec3(0, 0, 1); + return vec<3, T, P>(0, 0, 1); T tmp2 = static_cast(1) / sqrt(tmp1); - return tvec3(x.x * tmp2, x.y * tmp2, x.z * tmp2); + return vec<3, T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2); } template - GLM_FUNC_QUALIFIER tquat angleAxis(T const & angle, tvec3 const & v) + GLM_FUNC_QUALIFIER tquat angleAxis(T const & angle, vec<3, T, P> const & v) { tquat Result(uninitialize); @@ -719,73 +719,73 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec4 lessThan(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat const & x, tquat const & y) { - tvec4 Result(uninitialize); + vec<4, bool, P> Result(uninitialize); for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] < y[i]; return Result; } template - GLM_FUNC_QUALIFIER tvec4 lessThanEqual(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat const & x, tquat const & y) { - tvec4 Result(uninitialize); + vec<4, bool, P> Result(uninitialize); for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] <= y[i]; return Result; } template - GLM_FUNC_QUALIFIER tvec4 greaterThan(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat const & x, tquat const & y) { - tvec4 Result(uninitialize); + vec<4, bool, P> Result(uninitialize); for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] > y[i]; return Result; } template - GLM_FUNC_QUALIFIER tvec4 greaterThanEqual(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat const & x, tquat const & y) { - tvec4 Result(uninitialize); + vec<4, bool, P> Result(uninitialize); for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] >= y[i]; return Result; } template - GLM_FUNC_QUALIFIER tvec4 equal(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> equal(tquat const & x, tquat const & y) { - tvec4 Result(uninitialize); + vec<4, bool, P> Result(uninitialize); for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] == y[i]; return Result; } template - GLM_FUNC_QUALIFIER tvec4 notEqual(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> notEqual(tquat const & x, tquat const & y) { - tvec4 Result(uninitialize); + vec<4, bool, P> Result(uninitialize); for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] != y[i]; return Result; } template - GLM_FUNC_QUALIFIER tvec4 isnan(tquat const& q) + GLM_FUNC_QUALIFIER vec<4, bool, P> isnan(tquat const& q) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isnan' only accept floating-point inputs"); - return tvec4(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w)); + return vec<4, bool, P>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w)); } template - GLM_FUNC_QUALIFIER tvec4 isinf(tquat const& q) + GLM_FUNC_QUALIFIER vec<4, bool, P> isinf(tquat const& q) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isinf' only accept floating-point inputs"); - return tvec4(isinf(q.x), isinf(q.y), isinf(q.z), isinf(q.w)); + return vec<4, bool, P>(isinf(q.x), isinf(q.y), isinf(q.z), isinf(q.w)); } }//namespace glm diff --git a/glm/gtc/quaternion_simd.inl b/glm/gtc/quaternion_simd.inl index 031a06fc..32e84bda 100644 --- a/glm/gtc/quaternion_simd.inl +++ b/glm/gtc/quaternion_simd.inl @@ -99,7 +99,7 @@ namespace detail { static tquat call(tquat const& q, tquat const& p) { - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_sub_ps(q.data, p.data); return Result; } @@ -123,7 +123,7 @@ namespace detail { static tquat call(tquat const& q, float s) { - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_mul_ps(q.data, _mm_set_ps1(s)); return Result; } @@ -147,7 +147,7 @@ namespace detail { static tquat call(tquat const& q, float s) { - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_div_ps(q.data, _mm_set_ps1(s)); return Result; } @@ -169,7 +169,7 @@ namespace detail template struct compute_quat_mul_vec4 { - static tvec4 call(tquat const& q, tvec4 const& v) + static vec<4, float, P> call(tquat const& q, vec<4, float, P> const& v) { __m128 const q_wwww = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 3, 3, 3)); __m128 const q_swp0 = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 0, 2, 1)); @@ -186,7 +186,7 @@ namespace detail uv = _mm_mul_ps(uv, _mm_mul_ps(q_wwww, two)); uuv = _mm_mul_ps(uuv, two); - tvec4 Result(uninitialize); + vec<4, float, P> Result(uninitialize); Result.data = _mm_add_ps(v.Data, _mm_add_ps(uv, uuv)); return Result; } diff --git a/glm/gtc/random.hpp b/glm/gtc/random.hpp index e0640182..0abf27bb 100644 --- a/glm/gtc/random.hpp +++ b/glm/gtc/random.hpp @@ -64,7 +64,7 @@ namespace glm /// @param Radius /// @see gtc_random template - GLM_FUNC_DECL tvec2 circularRand( + GLM_FUNC_DECL vec<2, T, defaultp> circularRand( T Radius); /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius @@ -72,7 +72,7 @@ namespace glm /// @param Radius /// @see gtc_random template - GLM_FUNC_DECL tvec3 sphericalRand( + GLM_FUNC_DECL vec<3, T, defaultp> sphericalRand( T Radius); /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius @@ -80,7 +80,7 @@ namespace glm /// @param Radius /// @see gtc_random template - GLM_FUNC_DECL tvec2 diskRand( + GLM_FUNC_DECL vec<2, T, defaultp> diskRand( T Radius); /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius @@ -88,7 +88,7 @@ namespace glm /// @param Radius /// @see gtc_random template - GLM_FUNC_DECL tvec3 ballRand( + GLM_FUNC_DECL vec<3, T, defaultp> ballRand( T Radius); /// @} diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl index 61eeb826..dfc05fdf 100644 --- a/glm/gtc/random.inl +++ b/glm/gtc/random.inl @@ -19,9 +19,9 @@ namespace detail template struct compute_rand<1, uint8, P, vec> { - GLM_FUNC_QUALIFIER static tvec1 call() + GLM_FUNC_QUALIFIER static vec<1, uint8, P> call() { - return tvec1( + return vec<1, uint8, P>( std::rand() % std::numeric_limits::max()); } }; @@ -29,9 +29,9 @@ namespace detail template struct compute_rand<2, uint8, P, vec> { - GLM_FUNC_QUALIFIER static tvec2 call() + GLM_FUNC_QUALIFIER static vec<2, uint8, P> call() { - return tvec2( + return vec<2, uint8, P>( std::rand() % std::numeric_limits::max(), std::rand() % std::numeric_limits::max()); } @@ -40,9 +40,9 @@ namespace detail template struct compute_rand<3, uint8, P, vec> { - GLM_FUNC_QUALIFIER static tvec3 call() + GLM_FUNC_QUALIFIER static vec<3, uint8, P> call() { - return tvec3( + return vec<3, uint8, P>( std::rand() % std::numeric_limits::max(), std::rand() % std::numeric_limits::max(), std::rand() % std::numeric_limits::max()); @@ -52,9 +52,9 @@ namespace detail template struct compute_rand<4, uint8, P, vec> { - GLM_FUNC_QUALIFIER static tvec4 call() + GLM_FUNC_QUALIFIER static vec<4, uint8, P> call() { - return tvec4( + return vec<4, uint8, P>( std::rand() % std::numeric_limits::max(), std::rand() % std::numeric_limits::max(), std::rand() % std::numeric_limits::max(), @@ -259,8 +259,8 @@ namespace detail GLM_FUNC_QUALIFIER genType linearRand(genType Min, genType Max) { return detail::compute_linearRand<1, genType, highp, vec>::call( - tvec1(Min), - tvec1(Max)).x; + vec<1, genType, highp>(Min), + vec<1, genType, highp>(Max)).x; } template class vecType> @@ -292,16 +292,16 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec2 diskRand(T Radius) + GLM_FUNC_QUALIFIER vec<2, T, defaultp> diskRand(T Radius) { - tvec2 Result(T(0)); + vec<2, T, defaultp> Result(T(0)); T LenRadius(T(0)); do { Result = linearRand( - tvec2(-Radius), - tvec2(Radius)); + vec<2, T, defaultp>(-Radius), + vec<2, T, defaultp>(Radius)); LenRadius = length(Result); } while(LenRadius > Radius); @@ -310,16 +310,16 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec3 ballRand(T Radius) + GLM_FUNC_QUALIFIER vec<3, T, defaultp> ballRand(T Radius) { - tvec3 Result(T(0)); + vec<3, T, defaultp> Result(T(0)); T LenRadius(T(0)); do { Result = linearRand( - tvec3(-Radius), - tvec3(Radius)); + vec<3, T, defaultp>(-Radius), + vec<3, T, defaultp>(Radius)); LenRadius = length(Result); } while(LenRadius > Radius); @@ -328,14 +328,14 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec2 circularRand(T Radius) + GLM_FUNC_QUALIFIER vec<2, T, defaultp> circularRand(T Radius) { T a = linearRand(T(0), T(6.283185307179586476925286766559f)); - return tvec2(cos(a), sin(a)) * Radius; + return vec<2, T, defaultp>(cos(a), sin(a)) * Radius; } template - GLM_FUNC_QUALIFIER tvec3 sphericalRand(T Radius) + GLM_FUNC_QUALIFIER vec<3, T, defaultp> sphericalRand(T Radius) { T z = linearRand(T(-1), T(1)); T a = linearRand(T(0), T(6.283185307179586476925286766559f)); @@ -345,6 +345,6 @@ namespace detail T x = r * cos(a); T y = r * sin(a); - return tvec3(x, y, z) * Radius; + return vec<3, T, defaultp>(x, y, z) * Radius; } }//namespace glm diff --git a/glm/gtc/round.inl b/glm/gtc/round.inl index 6f798f72..282db47d 100644 --- a/glm/gtc/round.inl +++ b/glm/gtc/round.inl @@ -232,7 +232,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType ceilPowerOfTwo(genType value) { - return detail::compute_ceilPowerOfTwo<1, genType, defaultp, vec, std::numeric_limits::is_signed>::call(tvec1(value)).x; + return detail::compute_ceilPowerOfTwo<1, genType, defaultp, vec, std::numeric_limits::is_signed>::call(vec<1, genType, defaultp>(value)).x; } template class vecType> @@ -282,7 +282,7 @@ namespace detail template GLM_FUNC_QUALIFIER bool isMultiple(genType Value, genType Multiple) { - return isMultiple(tvec1(Value), tvec1(Multiple)).x; + return isMultiple(vec<1, genType>(Value), vec<1, genType>(Multiple)).x; } template class vecType> diff --git a/glm/gtc/type_aligned.hpp b/glm/gtc/type_aligned.hpp index 548cdb41..208631b2 100644 --- a/glm/gtc/type_aligned.hpp +++ b/glm/gtc/type_aligned.hpp @@ -30,205 +30,205 @@ namespace glm // -- *vec1 -- - typedef tvec1 aligned_highp_vec1; - typedef tvec1 aligned_mediump_vec1; - typedef tvec1 aligned_lowp_vec1; - typedef tvec1 aligned_highp_dvec1; - typedef tvec1 aligned_mediump_dvec1; - typedef tvec1 aligned_lowp_dvec1; - typedef tvec1 aligned_highp_ivec1; - typedef tvec1 aligned_mediump_ivec1; - typedef tvec1 aligned_lowp_ivec1; - typedef tvec1 aligned_highp_uvec1; - typedef tvec1 aligned_mediump_uvec1; - typedef tvec1 aligned_lowp_uvec1; - typedef tvec1 aligned_highp_bvec1; - typedef tvec1 aligned_mediump_bvec1; - typedef tvec1 aligned_lowp_bvec1; + typedef vec<1, float, aligned_highp> aligned_highp_vec1; + typedef vec<1, float, aligned_mediump> aligned_mediump_vec1; + typedef vec<1, float, aligned_lowp> aligned_lowp_vec1; + typedef vec<1, double, aligned_highp> aligned_highp_dvec1; + typedef vec<1, double, aligned_mediump> aligned_mediump_dvec1; + typedef vec<1, double, aligned_lowp> aligned_lowp_dvec1; + typedef vec<1, int, aligned_highp> aligned_highp_ivec1; + typedef vec<1, int, aligned_mediump> aligned_mediump_ivec1; + typedef vec<1, int, aligned_lowp> aligned_lowp_ivec1; + typedef vec<1, uint, aligned_highp> aligned_highp_uvec1; + typedef vec<1, uint, aligned_mediump> aligned_mediump_uvec1; + typedef vec<1, uint, aligned_lowp> aligned_lowp_uvec1; + typedef vec<1, bool, aligned_highp> aligned_highp_bvec1; + typedef vec<1, bool, aligned_mediump> aligned_mediump_bvec1; + typedef vec<1, bool, aligned_lowp> aligned_lowp_bvec1; - typedef tvec1 packed_highp_vec1; - typedef tvec1 packed_mediump_vec1; - typedef tvec1 packed_lowp_vec1; - typedef tvec1 packed_highp_dvec1; - typedef tvec1 packed_mediump_dvec1; - typedef tvec1 packed_lowp_dvec1; - typedef tvec1 packed_highp_ivec1; - typedef tvec1 packed_mediump_ivec1; - typedef tvec1 packed_lowp_ivec1; - typedef tvec1 packed_highp_uvec1; - typedef tvec1 packed_mediump_uvec1; - typedef tvec1 packed_lowp_uvec1; - typedef tvec1 packed_highp_bvec1; - typedef tvec1 packed_mediump_bvec1; - typedef tvec1 packed_lowp_bvec1; + typedef vec<1, float, packed_highp> packed_highp_vec1; + typedef vec<1, float, packed_mediump> packed_mediump_vec1; + typedef vec<1, float, packed_lowp> packed_lowp_vec1; + typedef vec<1, double, packed_highp> packed_highp_dvec1; + typedef vec<1, double, packed_mediump> packed_mediump_dvec1; + typedef vec<1, double, packed_lowp> packed_lowp_dvec1; + typedef vec<1, int, packed_highp> packed_highp_ivec1; + typedef vec<1, int, packed_mediump> packed_mediump_ivec1; + typedef vec<1, int, packed_lowp> packed_lowp_ivec1; + typedef vec<1, uint, packed_highp> packed_highp_uvec1; + typedef vec<1, uint, packed_mediump> packed_mediump_uvec1; + typedef vec<1, uint, packed_lowp> packed_lowp_uvec1; + typedef vec<1, bool, packed_highp> packed_highp_bvec1; + typedef vec<1, bool, packed_mediump> packed_mediump_bvec1; + typedef vec<1, bool, packed_lowp> packed_lowp_bvec1; // -- *vec2 -- /// 2 components vector of high single-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_highp_vec2; + typedef vec<2, float, aligned_highp> aligned_highp_vec2; /// 2 components vector of medium single-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_mediump_vec2; + typedef vec<2, float, aligned_mediump> aligned_mediump_vec2; /// 2 components vector of low single-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_lowp_vec2; + typedef vec<2, float, aligned_lowp> aligned_lowp_vec2; /// 2 components vector of high double-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_highp_dvec2; + typedef vec<2double, aligned_highp> aligned_highp_dvec2; /// 2 components vector of medium double-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_mediump_dvec2; + typedef vec<2double, aligned_mediump> aligned_mediump_dvec2; /// 2 components vector of low double-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_lowp_dvec2; + typedef vec<2double, aligned_lowp> aligned_lowp_dvec2; /// 2 components vector of high precision signed integer numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_highp_ivec2; + typedef vec<2, int, aligned_highp> aligned_highp_ivec2; /// 2 components vector of medium precision signed integer numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_mediump_ivec2; + typedef vec<2, int, aligned_mediump> aligned_mediump_ivec2; /// 2 components vector of low precision signed integer numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_lowp_ivec2; + typedef vec<2, int, aligned_lowp> aligned_lowp_ivec2; /// 2 components vector of high precision unsigned integer numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_highp_uvec2; + typedef vec<2, uint, aligned_highp> aligned_highp_uvec2; /// 2 components vector of medium precision unsigned integer numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_mediump_uvec2; + typedef vec<2, uint, aligned_mediump> aligned_mediump_uvec2; /// 2 components vector of low precision unsigned integer numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_lowp_uvec2; + typedef vec<2, uint, aligned_lowp> aligned_lowp_uvec2; /// 2 components vector of high precision bool numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_highp_bvec2; + typedef vec<2bool, aligned_highp> aligned_highp_bvec2; /// 2 components vector of medium precision bool numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_mediump_bvec2; + typedef vec<2bool, aligned_mediump> aligned_mediump_bvec2; /// 2 components vector of low precision bool numbers. /// There is no guarantee on the actual precision. - typedef tvec2 aligned_lowp_bvec2; + typedef vec<2bool, aligned_lowp> aligned_lowp_bvec2; // -- *vec3 -- /// 3 components vector of high single-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_highp_vec3; + typedef vec<3, float, aligned_highp> aligned_highp_vec3; /// 3 components vector of medium single-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_mediump_vec3; + typedef vec<3, float, aligned_mediump> aligned_mediump_vec3; /// 3 components vector of low single-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_lowp_vec3; + typedef vec<3, float, aligned_lowp> aligned_lowp_vec3; /// 3 components vector of high double-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_highp_dvec3; + typedef vec<3, double, aligned_highp> aligned_highp_dvec3; /// 3 components vector of medium double-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_mediump_dvec3; + typedef vec<3, double, aligned_mediump> aligned_mediump_dvec3; /// 3 components vector of low double-precision floating-point numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_lowp_dvec3; + typedef vec<3, double, aligned_lowp> aligned_lowp_dvec3; /// 3 components vector of high precision signed integer numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_highp_ivec3; + typedef vec<3, int, aligned_highp> aligned_highp_ivec3; /// 3 components vector of medium precision signed integer numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_mediump_ivec3; + typedef vec<3, int, aligned_mediump> aligned_mediump_ivec3; /// 3 components vector of low precision signed integer numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_lowp_ivec3; + typedef vec<3, int, aligned_lowp> aligned_lowp_ivec3; /// 3 components vector of high precision unsigned integer numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_highp_uvec3; + typedef vec<3, uint, aligned_highp> aligned_highp_uvec3; /// 3 components vector of medium precision unsigned integer numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_mediump_uvec3; + typedef vec<3, uint, aligned_mediump> aligned_mediump_uvec3; /// 3 components vector of low precision unsigned integer numbers. /// There is no guarantee on the actual precision. - typedef tvec3 aligned_lowp_uvec3; + typedef vec<3, uint, aligned_lowp> aligned_lowp_uvec3; /// 3 components vector of high precision bool numbers. - typedef tvec3 aligned_highp_bvec3; + typedef vec<3, bool, aligned_highp> aligned_highp_bvec3; /// 3 components vector of medium precision bool numbers. - typedef tvec3 aligned_mediump_bvec3; + typedef vec<3, bool, aligned_mediump> aligned_mediump_bvec3; /// 3 components vector of low precision bool numbers. - typedef tvec3 aligned_lowp_bvec3; + typedef vec<3, bool, aligned_lowp> aligned_lowp_bvec3; // -- *vec4 -- /// 4 components vector of high single-precision floating-point numbers. - typedef tvec4 aligned_highp_vec4; + typedef vec<4, float, aligned_highp> aligned_highp_vec4; /// 4 components vector of medium single-precision floating-point numbers. - typedef tvec4 aligned_mediump_vec4; + typedef vec<4, float, aligned_mediump> aligned_mediump_vec4; /// 4 components vector of low single-precision floating-point numbers. - typedef tvec4 aligned_lowp_vec4; + typedef vec<4, float, aligned_lowp> aligned_lowp_vec4; /// 4 components vector of high double-precision floating-point numbers. - typedef tvec4 aligned_highp_dvec4; + typedef vec<4, double, aligned_highp> aligned_highp_dvec4; /// 4 components vector of medium double-precision floating-point numbers. - typedef tvec4 aligned_mediump_dvec4; + typedef vec<4, double, aligned_mediump> aligned_mediump_dvec4; /// 4 components vector of low double-precision floating-point numbers. - typedef tvec4 aligned_lowp_dvec4; + typedef vec<4, double, aligned_lowp> aligned_lowp_dvec4; /// 4 components vector of high precision signed integer numbers. - typedef tvec4 aligned_highp_ivec4; + typedef vec<4, int, aligned_highp> aligned_highp_ivec4; /// 4 components vector of medium precision signed integer numbers. - typedef tvec4 aligned_mediump_ivec4; + typedef vec<4, int, aligned_mediump> aligned_mediump_ivec4; /// 4 components vector of low precision signed integer numbers. - typedef tvec4 aligned_lowp_ivec4; + typedef vec<4, int, aligned_lowp> aligned_lowp_ivec4; /// 4 components vector of high precision unsigned integer numbers. - typedef tvec4 aligned_highp_uvec4; + typedef vec<4, uint, aligned_highp> aligned_highp_uvec4; /// 4 components vector of medium precision unsigned integer numbers. - typedef tvec4 aligned_mediump_uvec4; + typedef vec<4, uint, aligned_mediump> aligned_mediump_uvec4; /// 4 components vector of low precision unsigned integer numbers. - typedef tvec4 aligned_lowp_uvec4; + typedef vec<4, uint, aligned_lowp> aligned_lowp_uvec4; /// 4 components vector of high precision bool numbers. - typedef tvec4 aligned_highp_bvec4; + typedef vec<4, bool, aligned_highp> aligned_highp_bvec4; /// 4 components vector of medium precision bool numbers. - typedef tvec4 aligned_mediump_bvec4; + typedef vec<4, bool, aligned_mediump> aligned_mediump_bvec4; /// 4 components vector of low precision bool numbers. - typedef tvec4 aligned_lowp_bvec4; + typedef vec<4, bool, aligned_lowp> aligned_lowp_bvec4; // -- default -- diff --git a/glm/gtc/type_precision.hpp b/glm/gtc/type_precision.hpp index 5e6f0b8e..268b330c 100644 --- a/glm/gtc/type_precision.hpp +++ b/glm/gtc/type_precision.hpp @@ -247,70 +247,70 @@ namespace glm /// 8 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 i8vec1; + typedef vec<1, i8, defaultp> i8vec1; /// 8 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 i8vec2; + typedef vec<2, i8, defaultp> i8vec2; /// 8 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 i8vec3; + typedef vec<3, i8, defaultp> i8vec3; /// 8 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 i8vec4; + typedef vec<4, i8, defaultp> i8vec4; /// 16 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 i16vec1; + typedef vec<1, i16, defaultp> i16vec1; /// 16 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 i16vec2; + typedef vec<2, i16, defaultp> i16vec2; /// 16 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 i16vec3; + typedef vec<3, i16, defaultp> i16vec3; /// 16 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 i16vec4; + typedef vec<4, i16, defaultp> i16vec4; /// 32 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 i32vec1; + typedef vec<1, i32, defaultp> i32vec1; /// 32 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 i32vec2; + typedef vec<2, i32, defaultp> i32vec2; /// 32 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 i32vec3; + typedef vec<3, i32, defaultp> i32vec3; /// 32 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 i32vec4; + typedef vec<4, i32, defaultp> i32vec4; /// 64 bit signed integer scalar type. /// @see gtc_type_precision - typedef tvec1 i64vec1; + typedef vec<1, i64, defaultp> i64vec1; /// 64 bit signed integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 i64vec2; + typedef vec<2, i64, defaultp> i64vec2; /// 64 bit signed integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 i64vec3; + typedef vec<3, i64, defaultp> i64vec3; /// 64 bit signed integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 i64vec4; + typedef vec<4, i64, defaultp> i64vec4; ///////////////////////////// @@ -519,70 +519,70 @@ namespace glm /// Default precision 8 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 u8vec1; + typedef vec<1, u8, defaultp> u8vec1; /// Default precision 8 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 u8vec2; + typedef vec<2, u8, defaultp> u8vec2; /// Default precision 8 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 u8vec3; + typedef vec<3, u8, defaultp> u8vec3; /// Default precision 8 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 u8vec4; + typedef vec<4, u8, defaultp> u8vec4; /// Default precision 16 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 u16vec1; + typedef vec<1, u16, defaultp> u16vec1; /// Default precision 16 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 u16vec2; + typedef vec<2, u16, defaultp> u16vec2; /// Default precision 16 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 u16vec3; + typedef vec<3, u16, defaultp> u16vec3; /// Default precision 16 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 u16vec4; + typedef vec<4, u16, defaultp> u16vec4; /// Default precision 32 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 u32vec1; + typedef vec<1, u32, defaultp> u32vec1; /// Default precision 32 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 u32vec2; + typedef vec<2, u32, defaultp> u32vec2; /// Default precision 32 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 u32vec3; + typedef vec<3, u32, defaultp> u32vec3; /// Default precision 32 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 u32vec4; + typedef vec<4, u32, defaultp> u32vec4; /// Default precision 64 bit unsigned integer scalar type. /// @see gtc_type_precision - typedef tvec1 u64vec1; + typedef vec<1, u64, defaultp> u64vec1; /// Default precision 64 bit unsigned integer vector of 2 components type. /// @see gtc_type_precision - typedef tvec2 u64vec2; + typedef vec<2, u64, defaultp> u64vec2; /// Default precision 64 bit unsigned integer vector of 3 components type. /// @see gtc_type_precision - typedef tvec3 u64vec3; + typedef vec<3, u64, defaultp> u64vec3; /// Default precision 64 bit unsigned integer vector of 4 components type. /// @see gtc_type_precision - typedef tvec4 u64vec4; + typedef vec<4, u64, defaultp> u64vec4; ////////////////////// @@ -617,53 +617,53 @@ namespace glm /// Single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 fvec1; + typedef vec<1, float, defaultp> fvec1; /// Single-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 fvec2; + typedef vec<2, float, defaultp> fvec2; /// Single-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 fvec3; + typedef vec<3, float, defaultp> fvec3; /// Single-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 fvec4; + typedef vec<4, float, defaultp> fvec4; /// Single-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 f32vec1; + typedef vec<1, f32, defaultp> f32vec1; /// Single-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 f32vec2; + typedef vec<2, f32, defaultp> f32vec2; /// Single-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 f32vec3; + typedef vec<3, f32, defaultp> f32vec3; /// Single-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 f32vec4; + typedef vec<4, f32, defaultp> f32vec4; /// Double-precision floating-point vector of 1 component. /// @see gtc_type_precision - typedef tvec1 f64vec1; + typedef vec<1, f64, defaultp> f64vec1; /// Double-precision floating-point vector of 2 components. /// @see gtc_type_precision - typedef tvec2 f64vec2; + typedef vec<2, f64, defaultp> f64vec2; /// Double-precision floating-point vector of 3 components. /// @see gtc_type_precision - typedef tvec3 f64vec3; + typedef vec<3, f64, defaultp> f64vec3; /// Double-precision floating-point vector of 4 components. /// @see gtc_type_precision - typedef tvec4 f64vec4; + typedef vec<4, f64, defaultp> f64vec4; ////////////////////// diff --git a/glm/gtc/type_ptr.hpp b/glm/gtc/type_ptr.hpp index b2977da0..fea159a6 100644 --- a/glm/gtc/type_ptr.hpp +++ b/glm/gtc/type_ptr.hpp @@ -65,17 +65,17 @@ namespace glm /// Build a vector from a pointer. /// @see gtc_type_ptr template - GLM_FUNC_DECL tvec2 make_vec2(T const * const ptr); + GLM_FUNC_DECL vec<2, T, defaultp> make_vec2(T const * const ptr); /// Build a vector from a pointer. /// @see gtc_type_ptr template - GLM_FUNC_DECL tvec3 make_vec3(T const * const ptr); + GLM_FUNC_DECL vec<3, T, defaultp> make_vec3(T const * const ptr); /// Build a vector from a pointer. /// @see gtc_type_ptr template - GLM_FUNC_DECL tvec4 make_vec4(T const * const ptr); + GLM_FUNC_DECL vec<4, T, defaultp> make_vec4(T const * const ptr); /// Build a matrix from a pointer. /// @see gtc_type_ptr diff --git a/glm/gtc/type_ptr.inl b/glm/gtc/type_ptr.inl index 3aa6ae6c..a2dbf91d 100644 --- a/glm/gtc/type_ptr.inl +++ b/glm/gtc/type_ptr.inl @@ -13,7 +13,7 @@ namespace glm template GLM_FUNC_QUALIFIER T const * value_ptr ( - tvec2 const & vec + vec<2, T, P> const & vec ) { return &(vec.x); @@ -24,7 +24,7 @@ namespace glm template GLM_FUNC_QUALIFIER T * value_ptr ( - tvec2 & vec + vec<2, T, P> & vec ) { return &(vec.x); @@ -35,7 +35,7 @@ namespace glm template GLM_FUNC_QUALIFIER T const * value_ptr ( - tvec3 const & vec + vec<3, T, P> const & vec ) { return &(vec.x); @@ -46,7 +46,7 @@ namespace glm template GLM_FUNC_QUALIFIER T * value_ptr ( - tvec3 & vec + vec<3, T, P> & vec ) { return &(vec.x); @@ -57,7 +57,7 @@ namespace glm template GLM_FUNC_QUALIFIER T const * value_ptr ( - tvec4 const & vec + vec<4, T, P> const & vec ) { return &(vec.x); @@ -68,7 +68,7 @@ namespace glm template GLM_FUNC_QUALIFIER T * value_ptr ( - tvec4 & vec + vec<4, T, P> & vec ) { return &(vec.x); @@ -294,30 +294,30 @@ namespace glm /// Build a vector from a pointer. /// @see gtc_type_ptr template - GLM_FUNC_QUALIFIER tvec2 make_vec2(T const * const ptr) + GLM_FUNC_QUALIFIER vec<2, T, defaultp> make_vec2(T const * const ptr) { - tvec2 Result; - memcpy(value_ptr(Result), ptr, sizeof(tvec2)); + vec<2, T, defaultp> Result; + memcpy(value_ptr(Result), ptr, sizeof(vec<2, T, defaultp>)); return Result; } /// Build a vector from a pointer. /// @see gtc_type_ptr template - GLM_FUNC_QUALIFIER tvec3 make_vec3(T const * const ptr) + GLM_FUNC_QUALIFIER vec<3, T, defaultp> make_vec3(T const * const ptr) { - tvec3 Result; - memcpy(value_ptr(Result), ptr, sizeof(tvec3)); + vec<3, T, defaultp> Result; + memcpy(value_ptr(Result), ptr, sizeof(vec<3, T, defaultp>)); return Result; } /// Build a vector from a pointer. /// @see gtc_type_ptr template - GLM_FUNC_QUALIFIER tvec4 make_vec4(T const * const ptr) + GLM_FUNC_QUALIFIER vec<4, T, defaultp> make_vec4(T const * const ptr) { - tvec4 Result; - memcpy(value_ptr(Result), ptr, sizeof(tvec4)); + vec<4, T, defaultp> Result; + memcpy(value_ptr(Result), ptr, sizeof(vec<4, T, defaultp>)); return Result; } diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp index 474e78fc..f43f9dd1 100644 --- a/glm/gtx/associated_min_max.hpp +++ b/glm/gtx/associated_min_max.hpp @@ -36,7 +36,7 @@ namespace glm /// Minimum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> - GLM_FUNC_DECL tvec2 associatedMin( + GLM_FUNC_DECL vec<2, U, P> associatedMin( vecType const & x, vecType const & a, vecType const & y, vecType const & b); @@ -114,7 +114,7 @@ namespace glm /// Maximum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template class vecType> - GLM_FUNC_DECL tvec2 associatedMax( + GLM_FUNC_DECL vec<2, U, P> associatedMax( vecType const & x, vecType const & a, vecType const & y, vecType const & b); diff --git a/glm/gtx/associated_min_max.inl b/glm/gtx/associated_min_max.inl index 85273759..70a1105c 100644 --- a/glm/gtx/associated_min_max.inl +++ b/glm/gtx/associated_min_max.inl @@ -11,7 +11,7 @@ GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) } template class vecType> -GLM_FUNC_QUALIFIER tvec2 associatedMin +GLM_FUNC_QUALIFIER vec<2, U, P> associatedMin ( vecType const & x, vecType const & a, vecType const & y, vecType const & b @@ -170,7 +170,7 @@ GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) // Max comparison between 2 variables template class vecType> -GLM_FUNC_QUALIFIER tvec2 associatedMax +GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax ( vecType const & x, vecType const & a, vecType const & y, vecType const & b diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index 8972cea2..ff8414c0 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -31,17 +31,17 @@ namespace glm /// Find the point on a straight line which is the closet of a point. /// @see gtx_closest_point template - GLM_FUNC_DECL tvec3 closestPointOnLine( - tvec3 const & point, - tvec3 const & a, - tvec3 const & b); + GLM_FUNC_DECL vec<3, T, P> closestPointOnLine( + vec<3, T, P> const & point, + vec<3, T, P> const & a, + vec<3, T, P> const & b); /// 2d lines work as well template - GLM_FUNC_DECL tvec2 closestPointOnLine( - tvec2 const & point, - tvec2 const & a, - tvec2 const & b); + GLM_FUNC_DECL vec<2, T, P> closestPointOnLine( + vec<2, T, P> const & point, + vec<2, T, P> const & a, + vec<2, T, P> const & b); /// @} }// namespace glm diff --git a/glm/gtx/closest_point.inl b/glm/gtx/closest_point.inl index 5c6a8793..619d987d 100644 --- a/glm/gtx/closest_point.inl +++ b/glm/gtx/closest_point.inl @@ -4,16 +4,16 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 closestPointOnLine + GLM_FUNC_QUALIFIER vec<3, T, P> closestPointOnLine ( - tvec3 const & point, - tvec3 const & a, - tvec3 const & b + vec<3, T, P> const & point, + vec<3, T, P> const & a, + vec<3, T, P> const & b ) { T LineLength = distance(a, b); - tvec3 Vector = point - a; - tvec3 LineDirection = (b - a) / LineLength; + vec<3, T, P> Vector = point - a; + vec<3, T, P> LineDirection = (b - a) / LineLength; // Project Vector to LineDirection to get the distance of point from a T Distance = dot(Vector, LineDirection); @@ -24,16 +24,16 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec2 closestPointOnLine + GLM_FUNC_QUALIFIER vec<2, T, P> closestPointOnLine ( - tvec2 const & point, - tvec2 const & a, - tvec2 const & b + vec<2, T, P> const & point, + vec<2, T, P> const & a, + vec<2, T, P> const & b ) { T LineLength = distance(a, b); - tvec2 Vector = point - a; - tvec2 LineDirection = (b - a) / LineLength; + vec<2, T, P> Vector = point - a; + vec<2, T, P> LineDirection = (b - a) / LineLength; // Project Vector to LineDirection to get the distance of point from a T Distance = dot(Vector, LineDirection); diff --git a/glm/gtx/color_encoding.hpp b/glm/gtx/color_encoding.hpp index 9537ecd1..f4150856 100644 --- a/glm/gtx/color_encoding.hpp +++ b/glm/gtx/color_encoding.hpp @@ -30,19 +30,19 @@ namespace glm /// Convert a linear sRGB color to D65 YUV. template - GLM_FUNC_DECL tvec3 convertLinearSRGBToD65XYZ(tvec3 const& ColorLinearSRGB); + GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB); /// Convert a linear sRGB color to D50 YUV. template - GLM_FUNC_DECL tvec3 convertLinearSRGBToD50XYZ(tvec3 const& ColorLinearSRGB); + GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB); /// Convert a D65 YUV color to linear sRGB. template - GLM_FUNC_DECL tvec3 convertD65XYZToLinearSRGB(tvec3 const& ColorD65XYZ); + GLM_FUNC_DECL vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ); /// Convert a D65 YUV color to D50 YUV. template - GLM_FUNC_DECL tvec3 convertD65XYZToD50XYZ(tvec3 const& ColorD65XYZ); + GLM_FUNC_DECL vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ); /// @} } //namespace glm diff --git a/glm/gtx/color_encoding.inl b/glm/gtx/color_encoding.inl index f7210462..497f25be 100644 --- a/glm/gtx/color_encoding.inl +++ b/glm/gtx/color_encoding.inl @@ -4,41 +4,41 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 convertLinearSRGBToD65XYZ(tvec3 const& ColorLinearSRGB) + GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB) { - tvec3 const M(0.490f, 0.17697f, 0.2f); - tvec3 const N(0.31f, 0.8124f, 0.01063f); - tvec3 const O(0.490f, 0.01f, 0.99f); + vec<3, T, P> const M(0.490f, 0.17697f, 0.2f); + vec<3, T, P> const N(0.31f, 0.8124f, 0.01063f); + vec<3, T, P> const O(0.490f, 0.01f, 0.99f); return (M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB) * static_cast(5.650675255693055f); } template - GLM_FUNC_QUALIFIER tvec3 convertLinearSRGBToD50XYZ(tvec3 const& ColorLinearSRGB) + GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB) { - tvec3 const M(0.436030342570117f, 0.222438466210245f, 0.013897440074263f); - tvec3 const N(0.385101860087134f, 0.716942745571917f, 0.097076381494207f); - tvec3 const O(0.143067806654203f, 0.060618777416563f, 0.713926257896652f); + vec<3, T, P> const M(0.436030342570117f, 0.222438466210245f, 0.013897440074263f); + vec<3, T, P> const N(0.385101860087134f, 0.716942745571917f, 0.097076381494207f); + vec<3, T, P> const O(0.143067806654203f, 0.060618777416563f, 0.713926257896652f); return M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB; } template - GLM_FUNC_QUALIFIER tvec3 convertD65XYZToLinearSRGB(tvec3 const& ColorD65XYZ) + GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ) { - tvec3 const M(0.41847f, -0.091169f, 0.0009209f); - tvec3 const N(-0.15866f, 0.25243f, 0.015708f); - tvec3 const O(0.0009209f, -0.0025498f, 0.1786f); + vec<3, T, P> const M(0.41847f, -0.091169f, 0.0009209f); + vec<3, T, P> const N(-0.15866f, 0.25243f, 0.015708f); + vec<3, T, P> const O(0.0009209f, -0.0025498f, 0.1786f); return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ; } template - GLM_FUNC_QUALIFIER tvec3 convertD65XYZToD50XYZ(tvec3 const& ColorD65XYZ) + GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ) { - tvec3 const M(+1.047844353856414f, +0.029549007606644f, -0.009250984365223f); - tvec3 const N(+0.022898981050086f, +0.990508028941971f, +0.015072338237051f); - tvec3 const O(-0.050206647741605f, -0.017074711360960f, +0.751717835079977f); + vec<3, T, P> const M(+1.047844353856414f, +0.029549007606644f, -0.009250984365223f); + vec<3, T, P> const N(+0.022898981050086f, +0.990508028941971f, +0.015072338237051f); + vec<3, T, P> const O(-0.050206647741605f, -0.017074711360960f, +0.751717835079977f); return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ; } diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index 4260ca0d..fb5e38c6 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -31,14 +31,14 @@ namespace glm /// Converts a color from HSV color space to its color in RGB color space. /// @see gtx_color_space template - GLM_FUNC_DECL tvec3 rgbColor( - tvec3 const & hsvValue); + GLM_FUNC_DECL vec<3, T, P> rgbColor( + vec<3, T, P> const & hsvValue); /// Converts a color from RGB color space to its color in HSV color space. /// @see gtx_color_space template - GLM_FUNC_DECL tvec3 hsvColor( - tvec3 const & rgbValue); + GLM_FUNC_DECL vec<3, T, P> hsvColor( + vec<3, T, P> const & rgbValue); /// Build a saturation matrix. /// @see gtx_color_space @@ -49,22 +49,22 @@ namespace glm /// Modify the saturation of a color. /// @see gtx_color_space template - GLM_FUNC_DECL tvec3 saturation( + GLM_FUNC_DECL vec<3, T, P> saturation( T const s, - tvec3 const & color); + vec<3, T, P> const & color); /// Modify the saturation of a color. /// @see gtx_color_space template - GLM_FUNC_DECL tvec4 saturation( + GLM_FUNC_DECL vec<4, T, P> saturation( T const s, - tvec4 const & color); + vec<4, T, P> const & color); /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. /// @see gtx_color_space template GLM_FUNC_DECL T luminosity( - tvec3 const & color); + vec<3, T, P> const & color); /// @} }//namespace glm diff --git a/glm/gtx/color_space.inl b/glm/gtx/color_space.inl index 11e0ac83..01414dcf 100644 --- a/glm/gtx/color_space.inl +++ b/glm/gtx/color_space.inl @@ -4,14 +4,14 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 rgbColor(const tvec3& hsvColor) + GLM_FUNC_QUALIFIER vec<3, T, P> rgbColor(const vec<3, T, P>& hsvColor) { - tvec3 hsv = hsvColor; - tvec3 rgbColor; + vec<3, T, P> hsv = hsvColor; + vec<3, T, P> rgbColor; if(hsv.y == static_cast(0)) // achromatic (grey) - rgbColor = tvec3(hsv.z); + rgbColor = vec<3, T, P>(hsv.z); else { T sector = floor(hsv.x * (T(1) / T(60))); @@ -61,9 +61,9 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 hsvColor(const tvec3& rgbColor) + GLM_FUNC_QUALIFIER vec<3, T, P> hsvColor(const vec<3, T, P>& rgbColor) { - tvec3 hsv = rgbColor; + vec<3, T, P> hsv = rgbColor; float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b); float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b); float Delta = Max - Min; @@ -103,7 +103,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 saturation(T const s) { - tvec3 rgbw = tvec3(T(0.2126), T(0.7152), T(0.0722)); + vec<3, T, defaultp> rgbw = vec<3, T, defaultp>(T(0.2126), T(0.7152), T(0.0722)); T col0 = (T(1) - s) * rgbw.r; T col1 = (T(1) - s) * rgbw.g; @@ -123,21 +123,21 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 saturation(const T s, const tvec3& color) + GLM_FUNC_QUALIFIER vec<3, T, P> saturation(const T s, const vec<3, T, P>& color) { - return tvec3(saturation(s) * tvec4(color, T(0))); + return vec<3, T, P>(saturation(s) * vec<4, T, P>(color, T(0))); } template - GLM_FUNC_QUALIFIER tvec4 saturation(const T s, const tvec4& color) + GLM_FUNC_QUALIFIER vec<4, T, P> saturation(const T s, const vec<4, T, P>& color) { return saturation(s) * color; } template - GLM_FUNC_QUALIFIER T luminosity(const tvec3& color) + GLM_FUNC_QUALIFIER T luminosity(const vec<3, T, P>& color) { - const tvec3 tmp = tvec3(0.33, 0.59, 0.11); + const vec<3, T, P> tmp = vec<3, T, P>(0.33, 0.59, 0.11); return dot(color, tmp); } }//namespace glm diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index ebe79744..0e418696 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -31,28 +31,28 @@ namespace glm /// Convert a color from RGB color space to YCoCg color space. /// @see gtx_color_space_YCoCg template - GLM_FUNC_DECL tvec3 rgb2YCoCg( - tvec3 const & rgbColor); + GLM_FUNC_DECL vec<3, T, P> rgb2YCoCg( + vec<3, T, P> const & rgbColor); /// Convert a color from YCoCg color space to RGB color space. /// @see gtx_color_space_YCoCg template - GLM_FUNC_DECL tvec3 YCoCg2rgb( - tvec3 const & YCoCgColor); + GLM_FUNC_DECL vec<3, T, P> YCoCg2rgb( + vec<3, T, P> 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 - GLM_FUNC_DECL tvec3 rgb2YCoCgR( - tvec3 const & rgbColor); + GLM_FUNC_DECL vec<3, T, P> rgb2YCoCgR( + vec<3, T, P> 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 - GLM_FUNC_DECL tvec3 YCoCgR2rgb( - tvec3 const & YCoCgColor); + GLM_FUNC_DECL vec<3, T, P> YCoCgR2rgb( + vec<3, T, P> const & YCoCgColor); /// @} }//namespace glm diff --git a/glm/gtx/color_space_YCoCg.inl b/glm/gtx/color_space_YCoCg.inl index bfff3519..ec759bfe 100644 --- a/glm/gtx/color_space_YCoCg.inl +++ b/glm/gtx/color_space_YCoCg.inl @@ -4,12 +4,12 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 rgb2YCoCg + GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCg ( - tvec3 const & rgbColor + vec<3, T, P> const & rgbColor ) { - tvec3 result; + vec<3, T, P> 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); @@ -17,12 +17,12 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 YCoCg2rgb + GLM_FUNC_QUALIFIER vec<3, T, P> YCoCg2rgb ( - tvec3 const & YCoCgColor + vec<3, T, P> const & YCoCgColor ) { - tvec3 result; + vec<3, T, P> result; result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; result.g = YCoCgColor.x + YCoCgColor.z; result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z; @@ -32,24 +32,24 @@ namespace glm template class compute_YCoCgR { public: - static GLM_FUNC_QUALIFIER tvec3 rgb2YCoCgR + static GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR ( - tvec3 const & rgbColor + vec<3, T, P> const & rgbColor ) { - tvec3 result; + vec<3, T, P> result; result.x/*Y */ = rgbColor.g * static_cast(0.5) + (rgbColor.r + rgbColor.b) * static_cast(0.25); result.y/*Co*/ = rgbColor.r - rgbColor.b; result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) * static_cast(0.5); return result; } - static GLM_FUNC_QUALIFIER tvec3 YCoCgR2rgb + static GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb ( - tvec3 const & YCoCgRColor + vec<3, T, P> const & YCoCgRColor ) { - tvec3 result; + vec<3, T, P> result; T tmp = YCoCgRColor.x - (YCoCgRColor.z * static_cast(0.5)); result.g = YCoCgRColor.z + tmp; result.b = tmp - (YCoCgRColor.y * static_cast(0.5)); @@ -61,12 +61,12 @@ namespace glm template class compute_YCoCgR { public: - static GLM_FUNC_QUALIFIER tvec3 rgb2YCoCgR + static GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR ( - tvec3 const & rgbColor + vec<3, T, P> const & rgbColor ) { - tvec3 result; + vec<3, T, P> result; result.y/*Co*/ = rgbColor.r - rgbColor.b; T tmp = rgbColor.b + (result.y >> 1); result.z/*Cg*/ = rgbColor.g - tmp; @@ -74,12 +74,12 @@ namespace glm return result; } - static GLM_FUNC_QUALIFIER tvec3 YCoCgR2rgb + static GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb ( - tvec3 const & YCoCgRColor + vec<3, T, P> const & YCoCgRColor ) { - tvec3 result; + vec<3, T, P> result; T tmp = YCoCgRColor.x - (YCoCgRColor.z >> 1); result.g = YCoCgRColor.z + tmp; result.b = tmp - (YCoCgRColor.y >> 1); @@ -89,18 +89,18 @@ namespace glm }; template - GLM_FUNC_QUALIFIER tvec3 rgb2YCoCgR + GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR ( - tvec3 const & rgbColor + vec<3, T, P> const & rgbColor ) { return compute_YCoCgR::is_integer>::rgb2YCoCgR(rgbColor); } template - GLM_FUNC_QUALIFIER tvec3 YCoCgR2rgb + GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb ( - tvec3 const & YCoCgRColor + vec<3, T, P> const & YCoCgRColor ) { return compute_YCoCgR::is_integer>::YCoCgR2rgb(YCoCgRColor); diff --git a/glm/gtx/common.inl b/glm/gtx/common.inl index 407f2d2b..fe8b9f84 100644 --- a/glm/gtx/common.inl +++ b/glm/gtx/common.inl @@ -38,53 +38,53 @@ namespace detail } template - GLM_FUNC_QUALIFIER typename tvec1::bool_type isdenormal + GLM_FUNC_QUALIFIER typename vec<1, T, P>::bool_type isdenormal ( - tvec1 const & x + vec<1, T, P> const & x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); - return typename tvec1::bool_type( + return typename vec<1, T, P>::bool_type( isdenormal(x.x)); } template - GLM_FUNC_QUALIFIER typename tvec2::bool_type isdenormal + GLM_FUNC_QUALIFIER typename vec<2, T, P>::bool_type isdenormal ( - tvec2 const & x + vec<2, T, P> const & x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); - return typename tvec2::bool_type( + return typename vec<2, T, P>::bool_type( isdenormal(x.x), isdenormal(x.y)); } template - GLM_FUNC_QUALIFIER typename tvec3::bool_type isdenormal + GLM_FUNC_QUALIFIER typename vec<3, T, P>::bool_type isdenormal ( - tvec3 const & x + vec<3, T, P> const & x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); - return typename tvec3::bool_type( + return typename vec<3, T, P>::bool_type( isdenormal(x.x), isdenormal(x.y), isdenormal(x.z)); } template - GLM_FUNC_QUALIFIER typename tvec4::bool_type isdenormal + GLM_FUNC_QUALIFIER typename vec<4, T, P>::bool_type isdenormal ( - tvec4 const & x + vec<4, T, P> const & x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); - return typename tvec4::bool_type( + return typename vec<4, T, P>::bool_type( isdenormal(x.x), isdenormal(x.y), isdenormal(x.z), @@ -95,7 +95,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType fmod(genType x, genType y) { - return fmod(tvec1(x), y).x; + return fmod(vec<1, genType>(x), y).x; } template class vecType> diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 00a0539c..fb3ddf9d 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -39,34 +39,34 @@ 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 tvec2 lerp(const tvec2& x, const 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 vec<2, T, P> lerp(const vec<2, T, P>& x, const vec<2, T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER tvec3 lerp(const tvec3& x, const 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 tvec4 lerp(const tvec4& x, const 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 tvec2 lerp(const tvec2& x, const tvec2& y, const 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 tvec3 lerp(const tvec3& x, const tvec3& y, const 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 tvec4 lerp(const tvec4& x, const tvec4& y, const 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 vec<3, T, P> lerp(const vec<3, T, P>& x, const vec<3, T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<4, T, P> lerp(const vec<4, T, P>& x, const vec<4, T, P>& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<2, T, P> lerp(const vec<2, T, P>& x, const vec<2, T, P>& y, const vec<2, T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<3, T, P> lerp(const vec<3, T, P>& x, const vec<3, T, P>& y, const vec<3, T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<4, T, P> lerp(const vec<4, T, P>& x, const vec<4, T, P>& y, const vec<4, T, P>& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template 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 tvec2 saturate(const 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 tvec3 saturate(const 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 tvec4 saturate(const 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 vec<2, T, P> saturate(const vec<2, T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<3, T, P> saturate(const vec<3, T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<4, T, P> saturate(const vec<4, T, P>& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) template 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 tvec2 atan2(const tvec2& x, const 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 tvec3 atan2(const tvec3& x, const 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 tvec4 atan2(const tvec4& x, const 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 vec<2, T, P> atan2(const vec<2, T, P>& x, const vec<2, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<3, T, P> atan2(const vec<3, T, P>& x, const vec<3, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER vec<4, T, P> atan2(const vec<4, T, P>& x, const vec<4, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) template GLM_FUNC_DECL bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec1 isfinite(const tvec1& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec2 isfinite(const tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec3 isfinite(const tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL tvec4 isfinite(const tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL vec<1, bool, P> isfinite(const vec<1, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL vec<2, bool, P> isfinite(const vec<2, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL vec<3, bool, P> isfinite(const vec<3, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL vec<4, bool, P> isfinite(const vec<4, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) - typedef tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) - typedef tvec3 bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension) - typedef tvec4 bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension) + typedef vec<2, bool, highp> bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) + typedef vec<3, bool, highp> bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension) + typedef vec<4, bool, highp> bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension) typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension) typedef tmat2x2 bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) @@ -80,9 +80,9 @@ namespace glm typedef tmat4x4 bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension) - typedef tvec2 int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension) - typedef tvec3 int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension) - typedef tvec4 int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension) + typedef vec<2, int, highp> int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension) + typedef vec<3, int, highp> int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension) + typedef vec<4, int, highp> int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension) typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension) typedef tmat2x2 int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) @@ -96,9 +96,9 @@ namespace glm typedef tmat4x4 int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef tvec2 float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef tvec3 float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) - typedef tvec4 float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + typedef vec<2, float, highp> float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef vec<3, float, highp> float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef vec<4, float, highp> float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) typedef tmat2x2 float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) @@ -112,9 +112,9 @@ namespace glm typedef tmat4x4 float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef tvec2 double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef tvec3 double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) - typedef tvec4 double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + typedef vec<2, double, highp> double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef vec<3, double, highp> double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef vec<4, double, highp> double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) typedef tmat2x2 double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) diff --git a/glm/gtx/compatibility.inl b/glm/gtx/compatibility.inl index 368527ac..2a80f9e5 100644 --- a/glm/gtx/compatibility.inl +++ b/glm/gtx/compatibility.inl @@ -25,37 +25,37 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec1 isfinite( - tvec1 const & x) + GLM_FUNC_QUALIFIER vec<1, bool, P> isfinite( + vec<1, T, P> const & x) { - return tvec1( + return vec<1, bool, P>( isfinite(x.x)); } template - GLM_FUNC_QUALIFIER tvec2 isfinite( - tvec2 const & x) + GLM_FUNC_QUALIFIER vec<2, bool, P> isfinite( + vec<2, T, P> const & x) { - return tvec2( + return vec<2, bool, P>( isfinite(x.x), isfinite(x.y)); } template - GLM_FUNC_QUALIFIER tvec3 isfinite( - tvec3 const & x) + GLM_FUNC_QUALIFIER vec<3, bool, P> isfinite( + vec<3, T, P> const & x) { - return tvec3( + return vec<3, bool, P>( isfinite(x.x), isfinite(x.y), isfinite(x.z)); } template - GLM_FUNC_QUALIFIER tvec4 isfinite( - tvec4 const & x) + GLM_FUNC_QUALIFIER vec<4, bool, P> isfinite( + vec<4, T, P> const & x) { - return tvec4( + return vec<4, bool, P>( isfinite(x.x), isfinite(x.y), isfinite(x.z), diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 416af456..ed251178 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -65,7 +65,7 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tdualquat(ctor); GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & real); - GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & orientation, tvec3 const & translation); + GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & orientation, vec<3, T, P> const & translation); GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & real, tquat const & dual); // -- Conversion constructors -- @@ -105,16 +105,16 @@ namespace glm GLM_FUNC_DECL tdualquat operator*(tdualquat const & q, tdualquat const & p); template - GLM_FUNC_DECL tvec3 operator*(tdualquat const & q, tvec3 const & v); + GLM_FUNC_DECL vec<3, T, P> operator*(tdualquat const & q, vec<3, T, P> const & v); template - GLM_FUNC_DECL tvec3 operator*(tvec3 const & v, tdualquat const & q); + GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tdualquat const & q); template - GLM_FUNC_DECL tvec4 operator*(tdualquat const & q, tvec4 const & v); + GLM_FUNC_DECL vec<4, T, P> operator*(tdualquat const & q, vec<4, T, P> const & v); template - GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, tdualquat const & q); + GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tdualquat const & q); template GLM_FUNC_DECL tdualquat operator*(tdualquat const & q, T const & s); diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index c3f2bc62..d988ce2a 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -61,7 +61,7 @@ namespace glm {} template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const & q, tvec3 const& p) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const & q, vec<3, T, P> const& p) : real(q), dual( T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z), T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y), @@ -163,27 +163,27 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 operator*(tdualquat const & q, tvec3 const & v) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tdualquat const & q, vec<3, T, P> const & v) { - tvec3 const real_v3(q.real.x,q.real.y,q.real.z); - tvec3 const dual_v3(q.dual.x,q.dual.y,q.dual.z); + vec<3, T, P> const real_v3(q.real.x,q.real.y,q.real.z); + vec<3, T, P> const dual_v3(q.dual.x,q.dual.y,q.dual.z); return (cross(real_v3, cross(real_v3,v) + v * q.real.w + dual_v3) + dual_v3 * q.real.w - real_v3 * q.dual.w) * T(2) + v; } template - GLM_FUNC_QUALIFIER tvec3 operator*(tvec3 const & v, tdualquat const & q) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tdualquat const & q) { return glm::inverse(q) * v; } template - GLM_FUNC_QUALIFIER tvec4 operator*(tdualquat const & q, tvec4 const & v) + GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tdualquat const & q, vec<4, T, P> const & v) { - return tvec4(q * tvec3(v), v.w); + return vec<4, T, P>(q * vec<3, T, P>(v), v.w); } template - GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, tdualquat const & q) + GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tdualquat const & q) { return glm::inverse(q) * v; } @@ -269,19 +269,19 @@ namespace glm T const wy = r.w * x.real.y; T const wz = r.w * x.real.z; - tvec4 const a( + vec<4, T, P> const a( rr.w + rr.x - rr.y - rr.z, xy - wz, xz + wy, -(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y)); - tvec4 const b( + vec<4, T, P> const b( xy + wz, rr.w + rr.y - rr.x - rr.z, yz - wx, -(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x)); - tvec4 const c( + vec<4, T, P> const c( xz - wy, yz + wx, rr.w + rr.z - rr.x - rr.y, diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp index 7aa7561a..3c30a0e8 100644 --- a/glm/gtx/euler_angles.hpp +++ b/glm/gtx/euler_angles.hpp @@ -125,12 +125,12 @@ namespace glm /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template - GLM_FUNC_DECL tmat3x3 orientate3(tvec3 const & angles); + GLM_FUNC_DECL tmat3x3 orientate3(vec<3, T, P> const & angles); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template - GLM_FUNC_DECL tmat4x4 orientate4(tvec3 const & angles); + GLM_FUNC_DECL tmat4x4 orientate4(vec<3, T, P> const & angles); /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M /// @see gtx_euler_angles diff --git a/glm/gtx/euler_angles.inl b/glm/gtx/euler_angles.inl index dbe0a48b..e425ff34 100644 --- a/glm/gtx/euler_angles.inl +++ b/glm/gtx/euler_angles.inl @@ -278,7 +278,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 orientate3 ( - tvec3 const & angles + vec<3, T, P> const & angles ) { return tmat3x3(yawPitchRoll(angles.z, angles.x, angles.y)); @@ -287,7 +287,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 orientate4 ( - tvec3 const & angles + vec<3, T, P> const & angles ) { return yawPitchRoll(angles.z, angles.x, angles.y); diff --git a/glm/gtx/extend.inl b/glm/gtx/extend.inl index 31555835..d8c0b6f6 100644 --- a/glm/gtx/extend.inl +++ b/glm/gtx/extend.inl @@ -15,10 +15,10 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec2 extend + GLM_FUNC_QUALIFIER vec<2, T, P> extend ( - tvec2 const & Origin, - tvec2 const & Source, + vec<2, T, P> const & Origin, + vec<2, T, P> const & Source, T const & Distance ) { @@ -26,10 +26,10 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 extend + GLM_FUNC_QUALIFIER vec<3, T, P> extend ( - tvec3 const & Origin, - tvec3 const & Source, + vec<3, T, P> const & Origin, + vec<3, T, P> const & Source, T const & Distance ) { @@ -37,10 +37,10 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 extend + GLM_FUNC_QUALIFIER vec<4, T, P> extend ( - tvec4 const & Origin, - tvec4 const & Source, + vec<4, T, P> const & Origin, + vec<4, T, P> const & Source, T const & Distance ) { diff --git a/glm/gtx/fast_square_root.inl b/glm/gtx/fast_square_root.inl index bc63cc53..40873460 100644 --- a/glm/gtx/fast_square_root.inl +++ b/glm/gtx/fast_square_root.inl @@ -23,10 +23,10 @@ namespace glm GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x) { # ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6 - tvec1 tmp(detail::compute_inversesqrt::value>::call(tvec1(x))); + vec<1, T, P> tmp(detail::compute_inversesqrt::value>::call(vec<1, genType, lowp>(x))); return tmp.x; # else - return detail::compute_inversesqrt<1, genType, highp, detail::is_aligned::value>::call(tvec1(x)).x; + return detail::compute_inversesqrt<1, genType, highp, detail::is_aligned::value>::call(vec<1, genType, lowp>(x)).x; # endif } diff --git a/glm/gtx/gradient_paint.hpp b/glm/gtx/gradient_paint.hpp index cf843d71..0afd276f 100644 --- a/glm/gtx/gradient_paint.hpp +++ b/glm/gtx/gradient_paint.hpp @@ -33,18 +33,18 @@ namespace glm /// @see - gtx_gradient_paint template GLM_FUNC_DECL T radialGradient( - tvec2 const & Center, + vec<2, T, P> const & Center, T const & Radius, - tvec2 const & Focal, - tvec2 const & Position); + vec<2, T, P> const & Focal, + vec<2, T, P> const & Position); /// Return a color from a linear gradient. /// @see - gtx_gradient_paint template GLM_FUNC_DECL T linearGradient( - tvec2 const & Point0, - tvec2 const & Point1, - tvec2 const & Position); + vec<2, T, P> const & Point0, + vec<2, T, P> const & Point1, + vec<2, T, P> const & Position); /// @} }// namespace glm diff --git a/glm/gtx/gradient_paint.inl b/glm/gtx/gradient_paint.inl index aaa5ce14..759cce5c 100644 --- a/glm/gtx/gradient_paint.inl +++ b/glm/gtx/gradient_paint.inl @@ -6,14 +6,14 @@ namespace glm template GLM_FUNC_QUALIFIER T radialGradient ( - tvec2 const & Center, + vec<2, T, P> const & Center, T const & Radius, - tvec2 const & Focal, - tvec2 const & Position + vec<2, T, P> const & Focal, + vec<2, T, P> const & Position ) { - tvec2 F = Focal - Center; - tvec2 D = Position - Focal; + vec<2, T, P> F = Focal - Center; + vec<2, T, P> D = Position - Focal; T Radius2 = pow2(Radius); T Fx2 = pow2(F.x); T Fy2 = pow2(F.y); @@ -26,12 +26,12 @@ namespace glm template GLM_FUNC_QUALIFIER T linearGradient ( - tvec2 const & Point0, - tvec2 const & Point1, - tvec2 const & Position + vec<2, T, P> const & Point0, + vec<2, T, P> const & Point1, + vec<2, T, P> const & Position ) { - tvec2 Dist = Point1 - Point0; + vec<2, T, P> Dist = Point1 - Point0; return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); } }//namespace glm diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp index cc01fcaf..8f29d313 100644 --- a/glm/gtx/handed_coordinate_space.hpp +++ b/glm/gtx/handed_coordinate_space.hpp @@ -32,17 +32,17 @@ namespace glm //! From GLM_GTX_handed_coordinate_space extension. template GLM_FUNC_DECL bool rightHanded( - tvec3 const & tangent, - tvec3 const & binormal, - tvec3 const & normal); + vec<3, T, P> const & tangent, + vec<3, T, P> const & binormal, + vec<3, T, P> const & normal); //! Return if a trihedron left handed or not. //! From GLM_GTX_handed_coordinate_space extension. template GLM_FUNC_DECL bool leftHanded( - tvec3 const & tangent, - tvec3 const & binormal, - tvec3 const & normal); + vec<3, T, P> const & tangent, + vec<3, T, P> const & binormal, + vec<3, T, P> const & normal); /// @} }// namespace glm diff --git a/glm/gtx/handed_coordinate_space.inl b/glm/gtx/handed_coordinate_space.inl index 2e55653c..0f3b548f 100644 --- a/glm/gtx/handed_coordinate_space.inl +++ b/glm/gtx/handed_coordinate_space.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool rightHanded ( - tvec3 const & tangent, - tvec3 const & binormal, - tvec3 const & normal + vec<3, T, P> const & tangent, + vec<3, T, P> const & binormal, + vec<3, T, P> const & normal ) { return dot(cross(normal, tangent), binormal) > T(0); @@ -17,9 +17,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool leftHanded ( - tvec3 const & tangent, - tvec3 const & binormal, - tvec3 const & normal + vec<3, T, P> const & tangent, + vec<3, T, P> const & binormal, + vec<3, T, P> const & normal ) { return dot(cross(normal, tangent), binormal) < T(0); diff --git a/glm/gtx/hash.hpp b/glm/gtx/hash.hpp index 5858d4ba..067d4786 100644 --- a/glm/gtx/hash.hpp +++ b/glm/gtx/hash.hpp @@ -45,27 +45,27 @@ namespace std { template - struct hash > + struct hash > { - GLM_FUNC_DECL size_t operator()(glm::tvec1 const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<1, T, P> const & v) const; }; template - struct hash > + struct hash > { - GLM_FUNC_DECL size_t operator()(glm::tvec2 const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<2, T, P> const & v) const; }; template - struct hash > + struct hash > { - GLM_FUNC_DECL size_t operator()(glm::tvec3 const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<3, T, P> const & v) const; }; template - struct hash > + struct hash > { - GLM_FUNC_DECL size_t operator()(glm::tvec4 const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<4, T, P> const & v) const; }; template diff --git a/glm/gtx/hash.inl b/glm/gtx/hash.inl index c42f4f0a..4b46b415 100644 --- a/glm/gtx/hash.inl +++ b/glm/gtx/hash.inl @@ -23,14 +23,14 @@ namespace detail namespace std { template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec1 const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<1, T, P> const & v) const { hash hasher; return hasher(v.x); } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec2 const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<2, T, P> const & v) const { size_t seed = 0; hash hasher; @@ -40,7 +40,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec3 const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<3, T, P> const & v) const { size_t seed = 0; hash hasher; @@ -51,7 +51,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tvec4 const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<4, T, P> const & v) const { size_t seed = 0; hash hasher; @@ -88,7 +88,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat2x2 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); return seed; @@ -98,7 +98,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat2x3 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); return seed; @@ -108,7 +108,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat2x4 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); return seed; @@ -118,7 +118,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat3x2 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); glm::detail::hash_combine(seed, hasher(m[2])); @@ -129,7 +129,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat3x3 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); glm::detail::hash_combine(seed, hasher(m[2])); @@ -140,7 +140,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat3x4 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); glm::detail::hash_combine(seed, hasher(m[2])); @@ -151,7 +151,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat4x2 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); glm::detail::hash_combine(seed, hasher(m[2])); @@ -163,7 +163,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat4x3 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); glm::detail::hash_combine(seed, hasher(m[2])); @@ -175,7 +175,7 @@ namespace std GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tmat4x4 const & m) const { size_t seed = 0; - hash> hasher; + hash> hasher; glm::detail::hash_combine(seed, hasher(m[0])); glm::detail::hash_combine(seed, hasher(m[1])); glm::detail::hash_combine(seed, hasher(m[2])); diff --git a/glm/gtx/integer.inl b/glm/gtx/integer.inl index 3a479e6c..84730c2c 100644 --- a/glm/gtx/integer.inl +++ b/glm/gtx/integer.inl @@ -80,29 +80,29 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec2 factorial( - tvec2 const & x) + GLM_FUNC_QUALIFIER vec<2, T, P> factorial( + vec<2, T, P> const & x) { - return tvec2( + return vec<2, T, P>( factorial(x.x), factorial(x.y)); } template - GLM_FUNC_QUALIFIER tvec3 factorial( - tvec3 const & x) + GLM_FUNC_QUALIFIER vec<3, T, P> factorial( + vec<3, T, P> const & x) { - return tvec3( + return vec<3, T, P>( factorial(x.x), factorial(x.y), factorial(x.z)); } template - GLM_FUNC_QUALIFIER tvec4 factorial( - tvec4 const & x) + GLM_FUNC_QUALIFIER vec<4, T, P> factorial( + vec<4, T, P> const & x) { - return tvec4( + return vec<4, T, P>( factorial(x.x), factorial(x.y), factorial(x.z), diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp index 129d2365..429c108f 100644 --- a/glm/gtx/intersect.hpp +++ b/glm/gtx/intersect.hpp @@ -48,9 +48,9 @@ namespace glm //! From GLM_GTX_intersect extension. template GLM_FUNC_DECL bool intersectRayTriangle( - tvec3 const& orig, tvec3 const& dir, - tvec3 const& v0, tvec3 const& v1, tvec3 const& v2, - tvec3& baryPosition, T& distance); + vec<3, T, P> const& orig, vec<3, T, P> const& dir, + vec<3, T, P> const& v0, vec<3, T, P> const& v1, vec<3, T, P> const& v2, + vec<3, T, P>& baryPosition, T& distance); //! Compute the intersection of a line and a triangle. //! From GLM_GTX_intersect extension. diff --git a/glm/gtx/intersect.inl b/glm/gtx/intersect.inl index fb9a29b1..e1cea2d4 100644 --- a/glm/gtx/intersect.inl +++ b/glm/gtx/intersect.inl @@ -26,27 +26,27 @@ namespace glm template GLM_FUNC_QUALIFIER bool intersectRayTriangle ( - tvec3 const& orig, tvec3 const& dir, - tvec3 const& vert0, tvec3 const& vert1, tvec3 const& vert2, - tvec2& baryPosition, T& distance + vec<3, T, P> const& orig, vec<3, T, P> const& dir, + vec<3, T, P> const& vert0, vec<3, T, P> const& vert1, vec<3, T, P> const& vert2, + vec<2, T, P>& baryPosition, T& distance ) { // find vectors for two edges sharing vert0 - tvec3 const edge1 = vert1 - vert0; - tvec3 const edge2 = vert2 - vert0; + vec<3, T, P> const edge1 = vert1 - vert0; + vec<3, T, P> const edge2 = vert2 - vert0; // begin calculating determinant - also used to calculate U parameter - tvec3 const p = glm::cross(dir, edge2); + vec<3, T, P> const p = glm::cross(dir, edge2); // if determinant is near zero, ray lies in plane of triangle T const det = glm::dot(edge1, p); - tvec3 qvec; + vec<3, T, P> qvec; if(det > std::numeric_limits::epsilon()) { // calculate distance from vert0 to ray origin - tvec3 const tvec = orig - vert0; + vec<3, T, P> const tvec = orig - vert0; // calculate U parameter and test bounds baryPosition.x = glm::dot(tvec, p); @@ -64,7 +64,7 @@ namespace glm else if(det < -std::numeric_limits::epsilon()) { // calculate distance from vert0 to ray origin - tvec3 const tvec = orig - vert0; + vec<3, T, P> const tvec = orig - vert0; // calculate U parameter and test bounds baryPosition.x = glm::dot(tvec, p); diff --git a/glm/gtx/io.hpp b/glm/gtx/io.hpp index 93281ffc..125ac74a 100644 --- a/glm/gtx/io.hpp +++ b/glm/gtx/io.hpp @@ -165,13 +165,13 @@ namespace glm template GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tquat const&); template - GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tvec1 const&); + GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, vec<1, T,P> const&); template - GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tvec2 const&); + GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, vec<2, T,P> const&); template - GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tvec3 const&); + GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, vec<3, T,P> const&); template - GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tvec4 const&); + GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, vec<4, T,P> const&); template GLM_FUNC_DECL std::basic_ostream& operator<<(std::basic_ostream&, tmat2x2 const&); template diff --git a/glm/gtx/io.inl b/glm/gtx/io.inl index 78fe2bd9..a0ad4d04 100644 --- a/glm/gtx/io.inl +++ b/glm/gtx/io.inl @@ -202,25 +202,25 @@ namespace detail } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec1 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, vec<1, T,P> const& a) { return detail::print_vector_on(os, a); } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec2 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, vec<2, T,P> const& a) { return detail::print_vector_on(os, a); } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec3 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, vec<3, T,P> const& a) { return detail::print_vector_on(os, a); } template - GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, tvec4 const& a) + GLM_FUNC_QUALIFIER std::basic_ostream& operator<<(std::basic_ostream& os, vec<4, T,P> const& a) { return detail::print_vector_on(os, a); } diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index 7d8559ce..96976bc4 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -33,13 +33,13 @@ namespace glm //! From GLM_GTX_matrix_cross_product extension. template GLM_FUNC_DECL tmat3x3 matrixCross3( - tvec3 const & x); + vec<3, T, P> const & x); //! Build a cross product matrix. //! From GLM_GTX_matrix_cross_product extension. template GLM_FUNC_DECL tmat4x4 matrixCross4( - tvec3 const & x); + vec<3, T, P> const & x); /// @} }//namespace glm diff --git a/glm/gtx/matrix_cross_product.inl b/glm/gtx/matrix_cross_product.inl index 16f07e96..696f6115 100644 --- a/glm/gtx/matrix_cross_product.inl +++ b/glm/gtx/matrix_cross_product.inl @@ -6,7 +6,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 matrixCross3 ( - tvec3 const & x + vec<3, T, P> const & x ) { tmat3x3 Result(T(0)); @@ -22,7 +22,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 matrixCross4 ( - tvec3 const & x + vec<3, T, P> const & x ) { tmat4x4 Result(T(0)); diff --git a/glm/gtx/matrix_decompose.hpp b/glm/gtx/matrix_decompose.hpp index 7fc56a30..08f3ae5e 100644 --- a/glm/gtx/matrix_decompose.hpp +++ b/glm/gtx/matrix_decompose.hpp @@ -38,7 +38,7 @@ namespace glm template GLM_FUNC_DECL bool decompose( tmat4x4 const & modelMatrix, - tvec3 & scale, tquat & orientation, tvec3 & translation, tvec3 & skew, tvec4 & perspective); + vec<3, T, P> & scale, tquat & orientation, vec<3, T, P> & translation, vec<3, T, P> & skew, vec<4, T, P> & perspective); /// @} }//namespace glm diff --git a/glm/gtx/matrix_decompose.inl b/glm/gtx/matrix_decompose.inl index 913f8f4d..88b17f57 100644 --- a/glm/gtx/matrix_decompose.inl +++ b/glm/gtx/matrix_decompose.inl @@ -7,16 +7,16 @@ namespace detail /// Make a linear combination of two vectors and return the result. // result = (a * ascl) + (b * bscl) template - GLM_FUNC_QUALIFIER tvec3 combine( - tvec3 const & a, - tvec3 const & b, + GLM_FUNC_QUALIFIER vec<3, T, P> combine( + vec<3, T, P> const & a, + vec<3, T, P> const & b, T ascl, T bscl) { return (a * ascl) + (b * bscl); } template - GLM_FUNC_QUALIFIER tvec3 scale(tvec3 const& v, T desiredLength) + GLM_FUNC_QUALIFIER vec<3, T, P> scale(vec<3, T, P> const& v, T desiredLength) { return v * desiredLength / length(v); } @@ -27,7 +27,7 @@ namespace detail // Decomposes the mode matrix to translations,rotation scale components template - GLM_FUNC_QUALIFIER bool decompose(tmat4x4 const & ModelMatrix, tvec3 & Scale, tquat & Orientation, tvec3 & Translation, tvec3 & Skew, tvec4 & Perspective) + GLM_FUNC_QUALIFIER bool decompose(tmat4x4 const & ModelMatrix, vec<3, T, P> & Scale, tquat & Orientation, vec<3, T, P> & Translation, vec<3, T, P> & Skew, vec<4, T, P> & Perspective) { tmat4x4 LocalMatrix(ModelMatrix); @@ -55,7 +55,7 @@ namespace detail if(LocalMatrix[0][3] != static_cast(0) || LocalMatrix[1][3] != static_cast(0) || LocalMatrix[2][3] != static_cast(0)) { // rightHandSide is the right hand side of the equation. - tvec4 RightHandSide; + vec<4, T, P> RightHandSide; RightHandSide[0] = LocalMatrix[0][3]; RightHandSide[1] = LocalMatrix[1][3]; RightHandSide[2] = LocalMatrix[2][3]; @@ -77,14 +77,14 @@ namespace detail else { // No perspective. - Perspective = tvec4(0, 0, 0, 1); + Perspective = vec<4, T, P>(0, 0, 0, 1); } // Next take care of translation (easy). - Translation = tvec3(LocalMatrix[3]); - LocalMatrix[3] = tvec4(0, 0, 0, LocalMatrix[3].w); + Translation = vec<3, T, P>(LocalMatrix[3]); + LocalMatrix[3] = vec<4, T, P>(0, 0, 0, LocalMatrix[3].w); - tvec3 Row[3], Pdum3; + vec<3, T, P> Row[3], Pdum3; // Now get scale and shear. for(length_t i = 0; i < 3; ++i) diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp index ec44f00e..ea056024 100644 --- a/glm/gtx/matrix_interpolation.hpp +++ b/glm/gtx/matrix_interpolation.hpp @@ -34,14 +34,14 @@ namespace glm template GLM_FUNC_DECL void axisAngle( tmat4x4 const & mat, - tvec3 & axis, + vec<3, T, P> & axis, T & angle); /// Build a matrix from axis and angle. /// From GLM_GTX_matrix_interpolation extension. template GLM_FUNC_DECL tmat4x4 axisAngleMatrix( - tvec3 const & axis, + vec<3, T, P> const & axis, T const angle); /// Extracts the rotation part of a matrix. diff --git a/glm/gtx/matrix_interpolation.inl b/glm/gtx/matrix_interpolation.inl index 12c1a5b5..35b224e5 100644 --- a/glm/gtx/matrix_interpolation.inl +++ b/glm/gtx/matrix_interpolation.inl @@ -7,7 +7,7 @@ namespace glm GLM_FUNC_QUALIFIER void axisAngle ( tmat4x4 const & mat, - tvec3 & axis, + vec<3, T, P> & axis, T & angle ) { @@ -81,14 +81,14 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 axisAngleMatrix ( - tvec3 const & axis, + vec<3, T, P> const & axis, T const angle ) { T c = cos(angle); T s = sin(angle); T t = static_cast(1) - c; - tvec3 n = normalize(axis); + vec<3, T, P> n = normalize(axis); return tmat4x4( t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0), @@ -122,7 +122,7 @@ namespace glm { tmat4x4 m1rot = extractMatrixRotation(m1); tmat4x4 dltRotation = m2 * transpose(m1rot); - tvec3 dltAxis; + vec<3, T, P> dltAxis; T dltAngle; axisAngle(dltRotation, dltAxis, dltAngle); tmat4x4 out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot; diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp index 5a6c47e4..f90423ef 100644 --- a/glm/gtx/matrix_major_storage.hpp +++ b/glm/gtx/matrix_major_storage.hpp @@ -33,8 +33,8 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat2x2 rowMajor2( - tvec2 const & v1, - tvec2 const & v2); + vec<2, T, P> const & v1, + vec<2, T, P> const & v2); //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -46,9 +46,9 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat3x3 rowMajor3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); + vec<3, T, P> const & v1, + vec<3, T, P> const & v2, + vec<3, T, P> const & v3); //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -60,10 +60,10 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat4x4 rowMajor4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4); + vec<4, T, P> const & v1, + vec<4, T, P> const & v2, + vec<4, T, P> const & v3, + vec<4, T, P> const & v4); //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -75,8 +75,8 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat2x2 colMajor2( - tvec2 const & v1, - tvec2 const & v2); + vec<2, T, P> const & v1, + vec<2, T, P> const & v2); //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -88,9 +88,9 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat3x3 colMajor3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); + vec<3, T, P> const & v1, + vec<3, T, P> const & v2, + vec<3, T, P> const & v3); //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -102,10 +102,10 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL tmat4x4 colMajor4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4); + vec<4, T, P> const & v1, + vec<4, T, P> const & v2, + vec<4, T, P> const & v3, + vec<4, T, P> const & v4); //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. diff --git a/glm/gtx/matrix_major_storage.inl b/glm/gtx/matrix_major_storage.inl index 70977390..c56ca02a 100644 --- a/glm/gtx/matrix_major_storage.inl +++ b/glm/gtx/matrix_major_storage.inl @@ -6,8 +6,8 @@ namespace glm template GLM_FUNC_QUALIFIER tmat2x2 rowMajor2 ( - tvec2 const & v1, - tvec2 const & v2 + vec<2, T, P> const & v1, + vec<2, T, P> const & v2 ) { tmat2x2 Result; @@ -32,9 +32,9 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 rowMajor3( - const tvec3& v1, - const tvec3& v2, - const tvec3& v3) + const vec<3, T, P>& v1, + const vec<3, T, P>& v2, + const vec<3, T, P>& v3) { tmat3x3 Result; Result[0][0] = v1.x; @@ -68,10 +68,10 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 rowMajor4( - const tvec4& v1, - const tvec4& v2, - const tvec4& v3, - const tvec4& v4) + const vec<4, T, P>& v1, + const vec<4, T, P>& v2, + const vec<4, T, P>& v3, + const vec<4, T, P>& v4) { tmat4x4 Result; Result[0][0] = v1.x; @@ -119,8 +119,8 @@ namespace glm template GLM_FUNC_QUALIFIER tmat2x2 colMajor2( - const tvec2& v1, - const tvec2& v2) + const vec<2, T, P>& v1, + const vec<2, T, P>& v2) { return tmat2x2(v1, v2); } @@ -134,9 +134,9 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 colMajor3( - const tvec3& v1, - const tvec3& v2, - const tvec3& v3) + const vec<3, T, P>& v1, + const vec<3, T, P>& v2, + const vec<3, T, P>& v3) { return tmat3x3(v1, v2, v3); } @@ -150,10 +150,10 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 colMajor4( - const tvec4& v1, - const tvec4& v2, - const tvec4& v3, - const tvec4& v4) + const vec<4, T, P>& v1, + const vec<4, T, P>& v2, + const vec<4, T, P>& v3, + const vec<4, T, P>& v4) { return tmat4x4(v1, v2, v3, v4); } diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index ad209a67..d824a51a 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -32,55 +32,55 @@ namespace glm //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat2x2 diagonal2x2( - tvec2 const & v); + vec<2, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat2x3 diagonal2x3( - tvec2 const & v); + vec<2, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat2x4 diagonal2x4( - tvec2 const & v); + vec<2, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat3x2 diagonal3x2( - tvec2 const & v); + vec<2, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat3x3 diagonal3x3( - tvec3 const & v); + vec<3, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat3x4 diagonal3x4( - tvec3 const & v); + vec<3, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat4x2 diagonal4x2( - tvec2 const & v); + vec<2, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat4x3 diagonal4x3( - tvec3 const & v); + vec<3, T, P> const & v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL tmat4x4 diagonal4x4( - tvec4 const & v); + vec<4, T, P> const & v); /// @} }//namespace glm diff --git a/glm/gtx/matrix_operation.inl b/glm/gtx/matrix_operation.inl index 15532156..634ff395 100644 --- a/glm/gtx/matrix_operation.inl +++ b/glm/gtx/matrix_operation.inl @@ -6,7 +6,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat2x2 diagonal2x2 ( - tvec2 const & v + vec<2, T, P> const & v ) { tmat2x2 Result(static_cast(1)); @@ -18,7 +18,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat2x3 diagonal2x3 ( - tvec2 const & v + vec<2, T, P> const & v ) { tmat2x3 Result(static_cast(1)); @@ -30,7 +30,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat2x4 diagonal2x4 ( - tvec2 const & v + vec<2, T, P> const & v ) { tmat2x4 Result(static_cast(1)); @@ -42,7 +42,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x2 diagonal3x2 ( - tvec2 const & v + vec<2, T, P> const & v ) { tmat3x2 Result(static_cast(1)); @@ -54,7 +54,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 diagonal3x3 ( - tvec3 const & v + vec<3, T, P> const & v ) { tmat3x3 Result(static_cast(1)); @@ -67,7 +67,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x4 diagonal3x4 ( - tvec3 const & v + vec<3, T, P> const & v ) { tmat3x4 Result(static_cast(1)); @@ -80,7 +80,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 diagonal4x4 ( - tvec4 const & v + vec<4, T, P> const & v ) { tmat4x4 Result(static_cast(1)); @@ -94,7 +94,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x3 diagonal4x3 ( - tvec3 const & v + vec<3, T, P> const & v ) { tmat4x3 Result(static_cast(1)); @@ -107,7 +107,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x2 diagonal4x2 ( - tvec2 const & v + vec<2, T, P> const & v ) { tmat4x2 Result(static_cast(1)); diff --git a/glm/gtx/matrix_transform_2d.hpp b/glm/gtx/matrix_transform_2d.hpp index bb6fc75b..ddf4af18 100644 --- a/glm/gtx/matrix_transform_2d.hpp +++ b/glm/gtx/matrix_transform_2d.hpp @@ -37,7 +37,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 translate( tmat3x3 const & m, - tvec2 const & v); + vec<2, T, P> const & v); /// Builds a rotation 3 * 3 matrix created from an angle. /// @@ -55,7 +55,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 scale( tmat3x3 const & m, - tvec2 const & v); + vec<2, T, P> const & v); /// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix. /// diff --git a/glm/gtx/matrix_transform_2d.inl b/glm/gtx/matrix_transform_2d.inl index bea5670a..c8c8371b 100644 --- a/glm/gtx/matrix_transform_2d.inl +++ b/glm/gtx/matrix_transform_2d.inl @@ -10,7 +10,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 translate( tmat3x3 const & m, - tvec2 const & v) + vec<2, T, P> const & v) { tmat3x3 Result(m); Result[2] = m[0] * v[0] + m[1] * v[1] + m[2]; @@ -37,7 +37,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 scale( tmat3x3 const & m, - tvec2 const & v) + vec<2, T, P> const & v) { tmat3x3 Result(uninitialize); Result[0] = m[0] * v[0]; diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index e7d3ecc1..60bebef7 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -31,9 +31,9 @@ namespace glm /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) template GLM_FUNC_DECL T mixedProduct( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); + vec<3, T, P> const & v1, + vec<3, T, P> const & v2, + vec<3, T, P> const & v3); /// @} }// namespace glm diff --git a/glm/gtx/mixed_product.inl b/glm/gtx/mixed_product.inl index a6ede596..dcd6d33d 100644 --- a/glm/gtx/mixed_product.inl +++ b/glm/gtx/mixed_product.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER T mixedProduct ( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3 + vec<3, T, P> const & v1, + vec<3, T, P> const & v2, + vec<3, T, P> const & v3 ) { return dot(cross(v1, v2), v3); diff --git a/glm/gtx/norm.hpp b/glm/gtx/norm.hpp index 6d5d755e..43732633 100644 --- a/glm/gtx/norm.hpp +++ b/glm/gtx/norm.hpp @@ -47,41 +47,41 @@ namespace glm //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l1Norm( - tvec3 const & x, - tvec3 const & y); + vec<3, T, P> const & x, + vec<3, T, P> const & y); //! Returns the L1 norm of v. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l1Norm( - tvec3 const & v); + vec<3, T, P> const & v); //! Returns the L2 norm between x and y. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l2Norm( - tvec3 const & x, - tvec3 const & y); + vec<3, T, P> const & x, + vec<3, T, P> const & y); //! Returns the L2 norm of v. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T l2Norm( - tvec3 const & x); + vec<3, T, P> const & x); //! Returns the L norm between x and y. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T lxNorm( - tvec3 const & x, - tvec3 const & y, + vec<3, T, P> const & x, + vec<3, T, P> const & y, unsigned int Depth); //! Returns the L norm of v. //! From GLM_GTX_norm extension. template GLM_FUNC_DECL T lxNorm( - tvec3 const & x, + vec<3, T, P> const & x, unsigned int Depth); /// @} diff --git a/glm/gtx/norm.inl b/glm/gtx/norm.inl index 2c18cb3e..a3cc54c3 100644 --- a/glm/gtx/norm.inl +++ b/glm/gtx/norm.inl @@ -47,8 +47,8 @@ namespace detail template GLM_FUNC_QUALIFIER T l1Norm ( - tvec3 const & a, - tvec3 const & b + vec<3, T, P> const & a, + vec<3, T, P> const & b ) { return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); @@ -57,7 +57,7 @@ namespace detail template GLM_FUNC_QUALIFIER T l1Norm ( - tvec3 const & v + vec<3, T, P> const & v ) { return abs(v.x) + abs(v.y) + abs(v.z); @@ -66,8 +66,8 @@ namespace detail template GLM_FUNC_QUALIFIER T l2Norm ( - tvec3 const & a, - tvec3 const & b + vec<3, T, P> const & a, + vec<3, T, P> const & b ) { return length(b - a); @@ -76,7 +76,7 @@ namespace detail template GLM_FUNC_QUALIFIER T l2Norm ( - tvec3 const & v + vec<3, T, P> const & v ) { return length(v); @@ -85,8 +85,8 @@ namespace detail template GLM_FUNC_QUALIFIER T lxNorm ( - tvec3 const & x, - tvec3 const & y, + vec<3, T, P> const & x, + vec<3, T, P> const & y, unsigned int Depth ) { @@ -96,7 +96,7 @@ namespace detail template GLM_FUNC_QUALIFIER T lxNorm ( - tvec3 const & v, + vec<3, T, P> const & v, unsigned int Depth ) { diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index 7a12dbaf..4b31946f 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -32,10 +32,10 @@ namespace glm //! Computes triangle normal from triangle points. //! From GLM_GTX_normal extension. template - GLM_FUNC_DECL tvec3 triangleNormal( - tvec3 const & p1, - tvec3 const & p2, - tvec3 const & p3); + GLM_FUNC_DECL vec<3, T, P> triangleNormal( + vec<3, T, P> const & p1, + vec<3, T, P> const & p2, + vec<3, T, P> const & p3); /// @} }//namespace glm diff --git a/glm/gtx/normal.inl b/glm/gtx/normal.inl index e4423176..d528fc0a 100644 --- a/glm/gtx/normal.inl +++ b/glm/gtx/normal.inl @@ -4,11 +4,11 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 triangleNormal + GLM_FUNC_QUALIFIER vec<3, T, P> triangleNormal ( - tvec3 const & p1, - tvec3 const & p2, - tvec3 const & p3 + vec<3, T, P> const & p1, + vec<3, T, P> const & p2, + vec<3, T, P> const & p3 ) { return normalize(cross(p1 - p2, p1 - p3)); diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index 75b8ae8e..b467ce19 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -41,7 +41,7 @@ namespace glm /// /// @see gtx_orthonormalize template - GLM_FUNC_DECL tvec3 orthonormalize(tvec3 const & x, tvec3 const & y); + GLM_FUNC_DECL vec<3, T, P> orthonormalize(vec<3, T, P> const & x, vec<3, T, P> const & y); /// @} }//namespace glm diff --git a/glm/gtx/orthonormalize.inl b/glm/gtx/orthonormalize.inl index 4796384e..722617ff 100644 --- a/glm/gtx/orthonormalize.inl +++ b/glm/gtx/orthonormalize.inl @@ -23,7 +23,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 orthonormalize(tvec3 const & x, tvec3 const & y) + GLM_FUNC_QUALIFIER vec<3, T, P> orthonormalize(vec<3, T, P> const & x, vec<3, T, P> const & y) { return normalize(x - y * dot(y, x)); } diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp index 9a3387f5..9eeb929f 100644 --- a/glm/gtx/polar_coordinates.hpp +++ b/glm/gtx/polar_coordinates.hpp @@ -32,15 +32,15 @@ namespace glm /// /// @see gtx_polar_coordinates template - GLM_FUNC_DECL tvec3 polar( - tvec3 const & euclidean); + GLM_FUNC_DECL vec<3, T, P> polar( + vec<3, T, P> const & euclidean); /// Convert Polar to Euclidean coordinates. /// /// @see gtx_polar_coordinates template - GLM_FUNC_DECL tvec3 euclidean( - tvec2 const & polar); + GLM_FUNC_DECL vec<3, T, P> euclidean( + vec<2, T, P> const & polar); /// @} }//namespace glm diff --git a/glm/gtx/polar_coordinates.inl b/glm/gtx/polar_coordinates.inl index afc9d2bc..a4c97f9d 100644 --- a/glm/gtx/polar_coordinates.inl +++ b/glm/gtx/polar_coordinates.inl @@ -4,31 +4,31 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 polar + GLM_FUNC_QUALIFIER vec<3, T, P> polar ( - tvec3 const & euclidean + vec<3, T, P> const & euclidean ) { T const Length(length(euclidean)); - tvec3 const tmp(euclidean / Length); + vec<3, T, P> const tmp(euclidean / Length); T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); - return tvec3( + return vec<3, T, P>( asin(tmp.y), // latitude atan(tmp.x, tmp.z), // longitude xz_dist); // xz distance } template - GLM_FUNC_QUALIFIER tvec3 euclidean + GLM_FUNC_QUALIFIER vec<3, T, P> euclidean ( - tvec2 const & polar + vec<2, T, P> const & polar ) { T const latitude(polar.x); T const longitude(polar.y); - return tvec3( + return vec<3, T, P>( cos(latitude) * sin(longitude), sin(latitude), cos(latitude) * cos(longitude)); diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index 475e1c4d..25216040 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -36,16 +36,16 @@ namespace glm /// /// @see gtx_quaternion template - GLM_FUNC_DECL tvec3 cross( + GLM_FUNC_DECL vec<3, T, P> cross( tquat const & q, - tvec3 const & v); + vec<3, T, P> const & v); //! Compute a cross product between a vector and a quaternion. /// /// @see gtx_quaternion template - GLM_FUNC_DECL tvec3 cross( - tvec3 const & v, + GLM_FUNC_DECL vec<3, T, P> cross( + vec<3, T, P> const & v, tquat const & q); //! Compute a point on a path according squad equation. @@ -102,17 +102,17 @@ namespace glm /// /// @see gtx_quaternion template - GLM_FUNC_DECL tvec3 rotate( + GLM_FUNC_DECL vec<3, T, P> rotate( tquat const & q, - tvec3 const & v); + vec<3, T, P> const & v); /// Rotates a 4 components vector by a quaternion. /// /// @see gtx_quaternion template - GLM_FUNC_DECL tvec4 rotate( + GLM_FUNC_DECL vec<4, T, P> rotate( tquat const & q, - tvec4 const & v); + vec<4, T, P> const & v); /// Extract the real component of a quaternion. /// @@ -174,8 +174,8 @@ namespace glm /// @see gtx_quaternion template GLM_FUNC_DECL tquat rotation( - tvec3 const & orig, - tvec3 const & dest); + vec<3, T, P> const & orig, + vec<3, T, P> const & dest); /// Returns the squared length of x. /// diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index c86ec187..ace63768 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -7,13 +7,13 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 cross(tvec3 const& v, tquat const& q) + GLM_FUNC_QUALIFIER vec<3, T, P> cross(vec<3, T, P> const& v, tquat const& q) { return inverse(q) * v; } template - GLM_FUNC_QUALIFIER tvec3 cross(tquat const& q, tvec3 const& v) + GLM_FUNC_QUALIFIER vec<3, T, P> cross(tquat const& q, vec<3, T, P> const& v) { return q * v; } @@ -45,19 +45,19 @@ namespace glm template GLM_FUNC_QUALIFIER tquat exp(tquat const& q) { - tvec3 u(q.x, q.y, q.z); + vec<3, T, P> u(q.x, q.y, q.z); T const Angle = glm::length(u); if (Angle < epsilon()) return tquat(); - tvec3 const v(u / Angle); + vec<3, T, P> const v(u / Angle); return tquat(cos(Angle), sin(Angle) * v); } template GLM_FUNC_QUALIFIER tquat log(tquat const& q) { - tvec3 u(q.x, q.y, q.z); + vec<3, T, P> u(q.x, q.y, q.z); T Vec3Len = length(u); if (Vec3Len < epsilon()) @@ -102,13 +102,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 rotate(tquat const& q, tvec3 const& v) + GLM_FUNC_QUALIFIER vec<3, T, P> rotate(tquat const& q, vec<3, T, P> const& v) { return q * v; } template - GLM_FUNC_QUALIFIER tvec4 rotate(tquat const& q, tvec4 const& v) + GLM_FUNC_QUALIFIER vec<4, T, P> rotate(tquat const& q, vec<4, T, P> const& v) { return q * v; } @@ -173,10 +173,10 @@ namespace glm } template - GLM_FUNC_QUALIFIER tquat rotation(tvec3 const& orig, tvec3 const& dest) + GLM_FUNC_QUALIFIER tquat rotation(vec<3, T, P> const& orig, vec<3, T, P> const& dest) { T cosTheta = dot(orig, dest); - tvec3 rotationAxis; + vec<3, T, P> rotationAxis; if(cosTheta >= static_cast(1) - epsilon()) return quat(); @@ -188,9 +188,9 @@ namespace glm // So guess one; any will do as long as it's perpendicular to start // This implementation favors a rotation around the Up axis (Y), // since it's often what you want to do. - rotationAxis = cross(tvec3(0, 0, 1), orig); + rotationAxis = cross(vec<3, T, P>(0, 0, 1), orig); if(length2(rotationAxis) < epsilon()) // bad luck, they were parallel, try again! - rotationAxis = cross(tvec3(1, 0, 0), orig); + rotationAxis = cross(vec<3, T, P>(1, 0, 0), orig); rotationAxis = normalize(rotationAxis); return angleAxis(pi(), rotationAxis); diff --git a/glm/gtx/range.hpp b/glm/gtx/range.hpp index db438989..b020fe4f 100644 --- a/glm/gtx/range.hpp +++ b/glm/gtx/range.hpp @@ -32,25 +32,25 @@ namespace glm /// @{ template - inline length_t components(tvec1 const & v) + inline length_t components(vec<1, T, P> const & v) { return v.length(); } template - inline length_t components(tvec2 const & v) + inline length_t components(vec<2, T, P> const & v) { return v.length(); } template - inline length_t components(tvec3 const & v) + inline length_t components(vec<3, T, P> const & v) { return v.length(); } template - inline length_t components(tvec4 const & v) + inline length_t components(vec<4, T, P> const & v) { return v.length(); } diff --git a/glm/gtx/rotate_normalized_axis.hpp b/glm/gtx/rotate_normalized_axis.hpp index b03def21..6c36bb54 100644 --- a/glm/gtx/rotate_normalized_axis.hpp +++ b/glm/gtx/rotate_normalized_axis.hpp @@ -42,12 +42,12 @@ namespace glm /// @see gtx_rotate_normalized_axis /// @see - rotate(T angle, T x, T y, T z) /// @see - rotate(tmat4x4 const & m, T angle, T x, T y, T z) - /// @see - rotate(T angle, tvec3 const & v) + /// @see - rotate(T angle, vec<3, T, P> const & v) template GLM_FUNC_DECL tmat4x4 rotateNormalizedAxis( tmat4x4 const & m, T const & angle, - tvec3 const & axis); + vec<3, T, P> const & axis); /// Rotates a quaternion from a vector of 3 components normalized axis and an angle. /// @@ -60,7 +60,7 @@ namespace glm GLM_FUNC_DECL tquat rotateNormalizedAxis( tquat const & q, T const & angle, - tvec3 const & axis); + vec<3, T, P> const & axis); /// @} }//namespace glm diff --git a/glm/gtx/rotate_normalized_axis.inl b/glm/gtx/rotate_normalized_axis.inl index dc1b1a85..6a102c55 100644 --- a/glm/gtx/rotate_normalized_axis.inl +++ b/glm/gtx/rotate_normalized_axis.inl @@ -8,16 +8,16 @@ namespace glm ( tmat4x4 const & m, T const & angle, - tvec3 const & v + vec<3, T, P> const & v ) { T const a = angle; T const c = cos(a); T const s = sin(a); - tvec3 const axis(v); + vec<3, T, P> const axis(v); - tvec3 const temp((static_cast(1) - c) * axis); + vec<3, T, P> const temp((static_cast(1) - c) * axis); tmat4x4 Rotate(uninitialize); Rotate[0][0] = c + temp[0] * axis[0]; @@ -45,10 +45,10 @@ namespace glm ( tquat const & q, T const & angle, - tvec3 const & v + vec<3, T, P> const & v ) { - tvec3 const Tmp(v); + vec<3, T, P> const Tmp(v); T const AngleRad(angle); T const Sin = sin(AngleRad * T(0.5)); diff --git a/glm/gtx/rotate_vector.hpp b/glm/gtx/rotate_vector.hpp index 246a01ec..10dd191d 100644 --- a/glm/gtx/rotate_vector.hpp +++ b/glm/gtx/rotate_vector.hpp @@ -38,82 +38,82 @@ namespace glm /// /// @see gtx_rotate_vector template - GLM_FUNC_DECL tvec3 slerp( - tvec3 const & x, - tvec3 const & y, + GLM_FUNC_DECL vec<3, T, P> slerp( + vec<3, T, P> const & x, + vec<3, T, P> const & y, T const & a); //! Rotate a two dimensional vector. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec2 rotate( - tvec2 const & v, + GLM_FUNC_DECL vec<2, T, P> rotate( + vec<2, T, P> const & v, T const & angle); //! Rotate a three dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec3 rotate( - tvec3 const & v, + GLM_FUNC_DECL vec<3, T, P> rotate( + vec<3, T, P> const & v, T const & angle, - tvec3 const & normal); + vec<3, T, P> const & normal); //! Rotate a four dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec4 rotate( - tvec4 const & v, + GLM_FUNC_DECL vec<4, T, P> rotate( + vec<4, T, P> const & v, T const & angle, - tvec3 const & normal); + vec<3, T, P> const & normal); //! Rotate a three dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec3 rotateX( - tvec3 const & v, + GLM_FUNC_DECL vec<3, T, P> rotateX( + vec<3, T, P> const & v, T const & angle); //! Rotate a three dimensional vector around the Y axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec3 rotateY( - tvec3 const & v, + GLM_FUNC_DECL vec<3, T, P> rotateY( + vec<3, T, P> const & v, T const & angle); //! Rotate a three dimensional vector around the Z axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec3 rotateZ( - tvec3 const & v, + GLM_FUNC_DECL vec<3, T, P> rotateZ( + vec<3, T, P> const & v, T const & angle); //! Rotate a four dimentionnals vector around the X axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec4 rotateX( - tvec4 const & v, + GLM_FUNC_DECL vec<4, T, P> rotateX( + vec<4, T, P> const & v, T const & angle); //! Rotate a four dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec4 rotateY( - tvec4 const & v, + GLM_FUNC_DECL vec<4, T, P> rotateY( + vec<4, T, P> const & v, T const & angle); //! Rotate a four dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template - GLM_FUNC_DECL tvec4 rotateZ( - tvec4 const & v, + GLM_FUNC_DECL vec<4, T, P> rotateZ( + vec<4, T, P> const & v, T const & angle); //! Build a rotation matrix from a normal and a up vector. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL tmat4x4 orientation( - tvec3 const & Normal, - tvec3 const & Up); + vec<3, T, P> const & Normal, + vec<3, T, P> const & Up); /// @} }//namespace glm diff --git a/glm/gtx/rotate_vector.inl b/glm/gtx/rotate_vector.inl index 5620e96c..f3de9f63 100644 --- a/glm/gtx/rotate_vector.inl +++ b/glm/gtx/rotate_vector.inl @@ -4,10 +4,10 @@ namespace glm { template - GLM_FUNC_QUALIFIER tvec3 slerp + GLM_FUNC_QUALIFIER vec<3, T, P> slerp ( - tvec3 const & x, - tvec3 const & y, + vec<3, T, P> const & x, + vec<3, T, P> const & y, T const & a ) { @@ -26,13 +26,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec2 rotate + GLM_FUNC_QUALIFIER vec<2, T, P> rotate ( - tvec2 const & v, + vec<2, T, P> const & v, T const & angle ) { - tvec2 Result; + vec<2, T, P> Result; T const Cos(cos(angle)); T const Sin(sin(angle)); @@ -42,21 +42,21 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 rotate + GLM_FUNC_QUALIFIER vec<3, T, P> rotate ( - tvec3 const & v, + vec<3, T, P> const & v, T const & angle, - tvec3 const & normal + vec<3, T, P> const & normal ) { return tmat3x3(glm::rotate(angle, normal)) * v; } /* template - GLM_FUNC_QUALIFIER tvec3 rotateGTX( - const tvec3& x, + GLM_FUNC_QUALIFIER vec<3, T, P> rotateGTX( + const vec<3, T, P>& x, T angle, - const tvec3& normal) + const vec<3, T, P>& normal) { const T Cos = cos(radians(angle)); const T Sin = sin(radians(angle)); @@ -64,24 +64,24 @@ namespace glm } */ template - GLM_FUNC_QUALIFIER tvec4 rotate + GLM_FUNC_QUALIFIER vec<4, T, P> rotate ( - tvec4 const & v, + vec<4, T, P> const & v, T const & angle, - tvec3 const & normal + vec<3, T, P> const & normal ) { return rotate(angle, normal) * v; } template - GLM_FUNC_QUALIFIER tvec3 rotateX + GLM_FUNC_QUALIFIER vec<3, T, P> rotateX ( - tvec3 const & v, + vec<3, T, P> const & v, T const & angle ) { - tvec3 Result(v); + vec<3, T, P> Result(v); T const Cos(cos(angle)); T const Sin(sin(angle)); @@ -91,13 +91,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 rotateY + GLM_FUNC_QUALIFIER vec<3, T, P> rotateY ( - tvec3 const & v, + vec<3, T, P> const & v, T const & angle ) { - tvec3 Result = v; + vec<3, T, P> Result = v; T const Cos(cos(angle)); T const Sin(sin(angle)); @@ -107,13 +107,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec3 rotateZ + GLM_FUNC_QUALIFIER vec<3, T, P> rotateZ ( - tvec3 const & v, + vec<3, T, P> const & v, T const & angle ) { - tvec3 Result = v; + vec<3, T, P> Result = v; T const Cos(cos(angle)); T const Sin(sin(angle)); @@ -123,13 +123,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 rotateX + GLM_FUNC_QUALIFIER vec<4, T, P> rotateX ( - tvec4 const & v, + vec<4, T, P> const & v, T const & angle ) { - tvec4 Result = v; + vec<4, T, P> Result = v; T const Cos(cos(angle)); T const Sin(sin(angle)); @@ -139,13 +139,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 rotateY + GLM_FUNC_QUALIFIER vec<4, T, P> rotateY ( - tvec4 const & v, + vec<4, T, P> const & v, T const & angle ) { - tvec4 Result = v; + vec<4, T, P> Result = v; T const Cos(cos(angle)); T const Sin(sin(angle)); @@ -155,13 +155,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 rotateZ + GLM_FUNC_QUALIFIER vec<4, T, P> rotateZ ( - tvec4 const & v, + vec<4, T, P> const & v, T const & angle ) { - tvec4 Result = v; + vec<4, T, P> Result = v; T const Cos(cos(angle)); T const Sin(sin(angle)); @@ -173,14 +173,14 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 orientation ( - tvec3 const & Normal, - tvec3 const & Up + vec<3, T, P> const & Normal, + vec<3, T, P> const & Up ) { if(all(equal(Normal, Up))) return tmat4x4(T(1)); - tvec3 RotationAxis = cross(Up, Normal); + vec<3, T, P> RotationAxis = cross(Up, Normal); T Angle = acos(dot(Normal, Up)); return rotate(Angle, RotationAxis); diff --git a/glm/gtx/std_based_type.hpp b/glm/gtx/std_based_type.hpp index 5b45335e..70530bbe 100644 --- a/glm/gtx/std_based_type.hpp +++ b/glm/gtx/std_based_type.hpp @@ -31,35 +31,35 @@ namespace glm /// Vector type based of one std::size_t component. /// @see GLM_GTX_std_based_type - typedef tvec1 size1; + typedef vec<1, std::size_t, defaultp> size1; /// Vector type based of two std::size_t components. /// @see GLM_GTX_std_based_type - typedef tvec2 size2; + typedef vec<2, std::size_t, defaultp> size2; /// Vector type based of three std::size_t components. /// @see GLM_GTX_std_based_type - typedef tvec3 size3; + typedef vec<3, std::size_t, defaultp> size3; /// Vector type based of four std::size_t components. /// @see GLM_GTX_std_based_type - typedef tvec4 size4; + typedef vec<4, std::size_t, defaultp> size4; /// Vector type based of one std::size_t component. /// @see GLM_GTX_std_based_type - typedef tvec1 size1_t; + typedef vec<1, std::size_t, defaultp> size1_t; /// Vector type based of two std::size_t components. /// @see GLM_GTX_std_based_type - typedef tvec2 size2_t; + typedef vec<2, std::size_t, defaultp> size2_t; /// Vector type based of three std::size_t components. /// @see GLM_GTX_std_based_type - typedef tvec3 size3_t; + typedef vec<3, std::size_t, defaultp> size3_t; /// Vector type based of four std::size_t components. /// @see GLM_GTX_std_based_type - typedef tvec4 size4_t; + typedef vec<4, std::size_t, defaultp> size4_t; /// @} }//namespace glm diff --git a/glm/gtx/string_cast.inl b/glm/gtx/string_cast.inl index ddcb7ed7..839265f7 100644 --- a/glm/gtx/string_cast.inl +++ b/glm/gtx/string_cast.inl @@ -130,9 +130,9 @@ namespace detail {}; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec1 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<1, bool, P> const & x) { return detail::format("bvec1(%s)", x[0] ? detail::LabelTrue : detail::LabelFalse); @@ -140,9 +140,9 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec2 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<2, bool, P> const & x) { return detail::format("bvec2(%s, %s)", x[0] ? detail::LabelTrue : detail::LabelFalse, @@ -151,9 +151,9 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec3 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<3, bool, P> const & x) { return detail::format("bvec3(%s, %s, %s)", x[0] ? detail::LabelTrue : detail::LabelFalse, @@ -163,9 +163,9 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec4 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<4, bool, P> const & x) { return detail::format("bvec4(%s, %s, %s, %s)", x[0] ? detail::LabelTrue : detail::LabelFalse, @@ -176,9 +176,9 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec1 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<1, T, P> const & x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -191,9 +191,9 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec2 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<2, T, P> const & x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -206,9 +206,9 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec3 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<3, T, P> const & x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -221,9 +221,9 @@ namespace detail }; template - struct compute_to_string> + struct compute_to_string> { - GLM_FUNC_QUALIFIER static std::string call(tvec4 const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<4, T, P> const & x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index f0fab19d..0a54430f 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -37,7 +37,7 @@ namespace glm /// @see gtx_transform template GLM_FUNC_DECL tmat4x4 translate( - tvec3 const & v); + vec<3, T, P> const & v); /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians. /// @see gtc_matrix_transform @@ -45,14 +45,14 @@ namespace glm template GLM_FUNC_DECL tmat4x4 rotate( T angle, - tvec3 const & v); + vec<3, T, P> const & v); /// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. /// @see gtc_matrix_transform /// @see gtx_transform template GLM_FUNC_DECL tmat4x4 scale( - tvec3 const & v); + vec<3, T, P> const & v); /// @} }// namespace glm diff --git a/glm/gtx/transform.inl b/glm/gtx/transform.inl index 516d8661..6d5aacd0 100644 --- a/glm/gtx/transform.inl +++ b/glm/gtx/transform.inl @@ -4,19 +4,19 @@ namespace glm { template - GLM_FUNC_QUALIFIER tmat4x4 translate(tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 translate(vec<3, T, P> const & v) { return translate(tmat4x4(static_cast(1)), v); } template - GLM_FUNC_QUALIFIER tmat4x4 rotate(T angle, tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 rotate(T angle, vec<3, T, P> const & v) { return rotate(tmat4x4(static_cast(1)), angle, v); } template - GLM_FUNC_QUALIFIER tmat4x4 scale(tvec3 const & v) + GLM_FUNC_QUALIFIER tmat4x4 scale(vec<3, T, P> const & v) { return scale(tmat4x4(static_cast(1)), v); } diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index 6a9b5c2f..0302504c 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -73,22 +73,22 @@ namespace glm // - dot(PointOnPlane, normal) * OnPlaneVector 1 // Reflect functions seem to don't work - //template tmat3x3 reflect2D(const tmat3x3 & m, const tvec3& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) - //template tmat4x4 reflect3D(const tmat4x4 & m, const tvec3& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + //template tmat3x3 reflect2D(const tmat3x3 & m, const vec<3, T, P>& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + //template tmat4x4 reflect3D(const tmat4x4 & m, const vec<3, T, P>& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) //! Build planar projection matrix along normal axis. //! From GLM_GTX_transform2 extension. template GLM_FUNC_DECL tmat3x3 proj2D( const tmat3x3 & m, - const tvec3& normal); + const vec<3, T, P>& normal); //! Build planar projection matrix along normal axis. //! From GLM_GTX_transform2 extension. template GLM_FUNC_DECL tmat4x4 proj3D( const tmat4x4 & m, - const tvec3& normal); + const vec<3, T, P>& normal); //! Build a scale bias matrix. //! From GLM_GTX_transform2 extension. diff --git a/glm/gtx/transform2.inl b/glm/gtx/transform2.inl index 6e0ab310..45951c19 100644 --- a/glm/gtx/transform2.inl +++ b/glm/gtx/transform2.inl @@ -47,7 +47,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat3x3 reflect2D(tmat3x3 const& m, tvec3 const& normal) + GLM_FUNC_QUALIFIER tmat3x3 reflect2D(tmat3x3 const& m, vec<3, T, P> const& normal) { tmat3x3 r(static_cast(1)); r[0][0] = static_cast(1) - static_cast(2) * normal.x * normal.x; @@ -58,7 +58,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat4x4 reflect3D(tmat4x4 const& m, tvec3 const& normal) + GLM_FUNC_QUALIFIER tmat4x4 reflect3D(tmat4x4 const& m, vec<3, T, P> const& normal) { tmat4x4 r(static_cast(1)); r[0][0] = static_cast(1) - static_cast(2) * normal.x * normal.x; @@ -78,7 +78,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat3x3 proj2D( const tmat3x3& m, - const tvec3& normal) + const vec<3, T, P>& normal) { tmat3x3 r(static_cast(1)); r[0][0] = static_cast(1) - normal.x * normal.x; @@ -91,7 +91,7 @@ namespace glm template GLM_FUNC_QUALIFIER tmat4x4 proj3D( const tmat4x4& m, - const tvec3& normal) + const vec<3, T, P>& normal) { tmat4x4 r(static_cast(1)); r[0][0] = static_cast(1) - normal.x * normal.x; @@ -110,7 +110,7 @@ namespace glm GLM_FUNC_QUALIFIER tmat4x4 scaleBias(T scale, T bias) { tmat4x4 result; - result[3] = tvec4(tvec3(bias), static_cast(1)); + result[3] = vec<4, T, P>(vec<3, T, P>(bias), static_cast(1)); result[0][0] = scale; result[1][1] = scale; result[2][2] = scale; diff --git a/glm/gtx/vec_swizzle.hpp b/glm/gtx/vec_swizzle.hpp index 9e9c8195..c325d30c 100644 --- a/glm/gtx/vec_swizzle.hpp +++ b/glm/gtx/vec_swizzle.hpp @@ -21,2758 +21,2758 @@ namespace glm { // xx template - GLM_INLINE glm::tvec2 xx(const glm::tvec1 &v) { - return glm::tvec2(v.x, v.x); + GLM_INLINE glm::vec<2, T, P> xx(const glm::vec<1, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.x); } template - GLM_INLINE glm::tvec2 xx(const glm::tvec2 &v) { - return glm::tvec2(v.x, v.x); + GLM_INLINE glm::vec<2, T, P> xx(const glm::vec<2, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.x); } template - GLM_INLINE glm::tvec2 xx(const glm::tvec3 &v) { - return glm::tvec2(v.x, v.x); + GLM_INLINE glm::vec<2, T, P> xx(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.x); } template - GLM_INLINE glm::tvec2 xx(const glm::tvec4 &v) { - return glm::tvec2(v.x, v.x); + GLM_INLINE glm::vec<2, T, P> xx(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.x); } // xy template - GLM_INLINE glm::tvec2 xy(const glm::tvec2 &v) { - return glm::tvec2(v.x, v.y); + GLM_INLINE glm::vec<2, T, P> xy(const glm::vec<2, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.y); } template - GLM_INLINE glm::tvec2 xy(const glm::tvec3 &v) { - return glm::tvec2(v.x, v.y); + GLM_INLINE glm::vec<2, T, P> xy(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.y); } template - GLM_INLINE glm::tvec2 xy(const glm::tvec4 &v) { - return glm::tvec2(v.x, v.y); + GLM_INLINE glm::vec<2, T, P> xy(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.y); } // xz template - GLM_INLINE glm::tvec2 xz(const glm::tvec3 &v) { - return glm::tvec2(v.x, v.z); + GLM_INLINE glm::vec<2, T, P> xz(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.z); } template - GLM_INLINE glm::tvec2 xz(const glm::tvec4 &v) { - return glm::tvec2(v.x, v.z); + GLM_INLINE glm::vec<2, T, P> xz(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.z); } // xw template - GLM_INLINE glm::tvec2 xw(const glm::tvec4 &v) { - return glm::tvec2(v.x, v.w); + GLM_INLINE glm::vec<2, T, P> xw(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.x, v.w); } // yx template - GLM_INLINE glm::tvec2 yx(const glm::tvec2 &v) { - return glm::tvec2(v.y, v.x); + GLM_INLINE glm::vec<2, T, P> yx(const glm::vec<2, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.x); } template - GLM_INLINE glm::tvec2 yx(const glm::tvec3 &v) { - return glm::tvec2(v.y, v.x); + GLM_INLINE glm::vec<2, T, P> yx(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.x); } template - GLM_INLINE glm::tvec2 yx(const glm::tvec4 &v) { - return glm::tvec2(v.y, v.x); + GLM_INLINE glm::vec<2, T, P> yx(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.x); } // yy template - GLM_INLINE glm::tvec2 yy(const glm::tvec2 &v) { - return glm::tvec2(v.y, v.y); + GLM_INLINE glm::vec<2, T, P> yy(const glm::vec<2, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.y); } template - GLM_INLINE glm::tvec2 yy(const glm::tvec3 &v) { - return glm::tvec2(v.y, v.y); + GLM_INLINE glm::vec<2, T, P> yy(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.y); } template - GLM_INLINE glm::tvec2 yy(const glm::tvec4 &v) { - return glm::tvec2(v.y, v.y); + GLM_INLINE glm::vec<2, T, P> yy(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.y); } // yz template - GLM_INLINE glm::tvec2 yz(const glm::tvec3 &v) { - return glm::tvec2(v.y, v.z); + GLM_INLINE glm::vec<2, T, P> yz(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.z); } template - GLM_INLINE glm::tvec2 yz(const glm::tvec4 &v) { - return glm::tvec2(v.y, v.z); + GLM_INLINE glm::vec<2, T, P> yz(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.z); } // yw template - GLM_INLINE glm::tvec2 yw(const glm::tvec4 &v) { - return glm::tvec2(v.y, v.w); + GLM_INLINE glm::vec<2, T, P> yw(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.y, v.w); } // zx template - GLM_INLINE glm::tvec2 zx(const glm::tvec3 &v) { - return glm::tvec2(v.z, v.x); + GLM_INLINE glm::vec<2, T, P> zx(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.z, v.x); } template - GLM_INLINE glm::tvec2 zx(const glm::tvec4 &v) { - return glm::tvec2(v.z, v.x); + GLM_INLINE glm::vec<2, T, P> zx(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.z, v.x); } // zy template - GLM_INLINE glm::tvec2 zy(const glm::tvec3 &v) { - return glm::tvec2(v.z, v.y); + GLM_INLINE glm::vec<2, T, P> zy(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.z, v.y); } template - GLM_INLINE glm::tvec2 zy(const glm::tvec4 &v) { - return glm::tvec2(v.z, v.y); + GLM_INLINE glm::vec<2, T, P> zy(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.z, v.y); } // zz template - GLM_INLINE glm::tvec2 zz(const glm::tvec3 &v) { - return glm::tvec2(v.z, v.z); + GLM_INLINE glm::vec<2, T, P> zz(const glm::vec<3, T, P> &v) { + return glm::vec<2, T, P>(v.z, v.z); } template - GLM_INLINE glm::tvec2 zz(const glm::tvec4 &v) { - return glm::tvec2(v.z, v.z); + GLM_INLINE glm::vec<2, T, P> zz(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.z, v.z); } // zw template - GLM_INLINE glm::tvec2 zw(const glm::tvec4 &v) { - return glm::tvec2(v.z, v.w); + GLM_INLINE glm::vec<2, T, P> zw(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.z, v.w); } // wx template - GLM_INLINE glm::tvec2 wx(const glm::tvec4 &v) { - return glm::tvec2(v.w, v.x); + GLM_INLINE glm::vec<2, T, P> wx(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.w, v.x); } // wy template - GLM_INLINE glm::tvec2 wy(const glm::tvec4 &v) { - return glm::tvec2(v.w, v.y); + GLM_INLINE glm::vec<2, T, P> wy(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.w, v.y); } // wz template - GLM_INLINE glm::tvec2 wz(const glm::tvec4 &v) { - return glm::tvec2(v.w, v.z); + GLM_INLINE glm::vec<2, T, P> wz(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.w, v.z); } // ww template - GLM_INLINE glm::tvec2 ww(const glm::tvec4 &v) { - return glm::tvec2(v.w, v.w); + GLM_INLINE glm::vec<2, T, P> ww(const glm::vec<4, T, P> &v) { + return glm::vec<2, T, P>(v.w, v.w); } // xxx template - GLM_INLINE glm::tvec3 xxx(const glm::tvec1 &v) { - return glm::tvec3(v.x, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> xxx(const glm::vec<1, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.x); } template - GLM_INLINE glm::tvec3 xxx(const glm::tvec2 &v) { - return glm::tvec3(v.x, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> xxx(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.x); } template - GLM_INLINE glm::tvec3 xxx(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> xxx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.x); } template - GLM_INLINE glm::tvec3 xxx(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> xxx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.x); } // xxy template - GLM_INLINE glm::tvec3 xxy(const glm::tvec2 &v) { - return glm::tvec3(v.x, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> xxy(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.y); } template - GLM_INLINE glm::tvec3 xxy(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> xxy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.y); } template - GLM_INLINE glm::tvec3 xxy(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> xxy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.y); } // xxz template - GLM_INLINE glm::tvec3 xxz(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.x, v.z); + GLM_INLINE glm::vec<3, T, P> xxz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.z); } template - GLM_INLINE glm::tvec3 xxz(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.x, v.z); + GLM_INLINE glm::vec<3, T, P> xxz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.z); } // xxw template - GLM_INLINE glm::tvec3 xxw(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.x, v.w); + GLM_INLINE glm::vec<3, T, P> xxw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.x, v.w); } // xyx template - GLM_INLINE glm::tvec3 xyx(const glm::tvec2 &v) { - return glm::tvec3(v.x, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> xyx(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.x); } template - GLM_INLINE glm::tvec3 xyx(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> xyx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.x); } template - GLM_INLINE glm::tvec3 xyx(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> xyx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.x); } // xyy template - GLM_INLINE glm::tvec3 xyy(const glm::tvec2 &v) { - return glm::tvec3(v.x, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> xyy(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.y); } template - GLM_INLINE glm::tvec3 xyy(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> xyy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.y); } template - GLM_INLINE glm::tvec3 xyy(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> xyy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.y); } // xyz template - GLM_INLINE glm::tvec3 xyz(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.y, v.z); + GLM_INLINE glm::vec<3, T, P> xyz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.z); } template - GLM_INLINE glm::tvec3 xyz(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.y, v.z); + GLM_INLINE glm::vec<3, T, P> xyz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.z); } // xyw template - GLM_INLINE glm::tvec3 xyw(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.y, v.w); + GLM_INLINE glm::vec<3, T, P> xyw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.y, v.w); } // xzx template - GLM_INLINE glm::tvec3 xzx(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.z, v.x); + GLM_INLINE glm::vec<3, T, P> xzx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.z, v.x); } template - GLM_INLINE glm::tvec3 xzx(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.z, v.x); + GLM_INLINE glm::vec<3, T, P> xzx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.z, v.x); } // xzy template - GLM_INLINE glm::tvec3 xzy(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.z, v.y); + GLM_INLINE glm::vec<3, T, P> xzy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.z, v.y); } template - GLM_INLINE glm::tvec3 xzy(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.z, v.y); + GLM_INLINE glm::vec<3, T, P> xzy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.z, v.y); } // xzz template - GLM_INLINE glm::tvec3 xzz(const glm::tvec3 &v) { - return glm::tvec3(v.x, v.z, v.z); + GLM_INLINE glm::vec<3, T, P> xzz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.z, v.z); } template - GLM_INLINE glm::tvec3 xzz(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.z, v.z); + GLM_INLINE glm::vec<3, T, P> xzz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.z, v.z); } // xzw template - GLM_INLINE glm::tvec3 xzw(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.z, v.w); + GLM_INLINE glm::vec<3, T, P> xzw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.z, v.w); } // xwx template - GLM_INLINE glm::tvec3 xwx(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.w, v.x); + GLM_INLINE glm::vec<3, T, P> xwx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.w, v.x); } // xwy template - GLM_INLINE glm::tvec3 xwy(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.w, v.y); + GLM_INLINE glm::vec<3, T, P> xwy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.w, v.y); } // xwz template - GLM_INLINE glm::tvec3 xwz(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.w, v.z); + GLM_INLINE glm::vec<3, T, P> xwz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.w, v.z); } // xww template - GLM_INLINE glm::tvec3 xww(const glm::tvec4 &v) { - return glm::tvec3(v.x, v.w, v.w); + GLM_INLINE glm::vec<3, T, P> xww(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.x, v.w, v.w); } // yxx template - GLM_INLINE glm::tvec3 yxx(const glm::tvec2 &v) { - return glm::tvec3(v.y, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> yxx(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.x); } template - GLM_INLINE glm::tvec3 yxx(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> yxx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.x); } template - GLM_INLINE glm::tvec3 yxx(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> yxx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.x); } // yxy template - GLM_INLINE glm::tvec3 yxy(const glm::tvec2 &v) { - return glm::tvec3(v.y, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> yxy(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.y); } template - GLM_INLINE glm::tvec3 yxy(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> yxy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.y); } template - GLM_INLINE glm::tvec3 yxy(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> yxy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.y); } // yxz template - GLM_INLINE glm::tvec3 yxz(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.x, v.z); + GLM_INLINE glm::vec<3, T, P> yxz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.z); } template - GLM_INLINE glm::tvec3 yxz(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.x, v.z); + GLM_INLINE glm::vec<3, T, P> yxz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.z); } // yxw template - GLM_INLINE glm::tvec3 yxw(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.x, v.w); + GLM_INLINE glm::vec<3, T, P> yxw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.x, v.w); } // yyx template - GLM_INLINE glm::tvec3 yyx(const glm::tvec2 &v) { - return glm::tvec3(v.y, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> yyx(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.x); } template - GLM_INLINE glm::tvec3 yyx(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> yyx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.x); } template - GLM_INLINE glm::tvec3 yyx(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> yyx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.x); } // yyy template - GLM_INLINE glm::tvec3 yyy(const glm::tvec2 &v) { - return glm::tvec3(v.y, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> yyy(const glm::vec<2, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.y); } template - GLM_INLINE glm::tvec3 yyy(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> yyy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.y); } template - GLM_INLINE glm::tvec3 yyy(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> yyy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.y); } // yyz template - GLM_INLINE glm::tvec3 yyz(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.y, v.z); + GLM_INLINE glm::vec<3, T, P> yyz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.z); } template - GLM_INLINE glm::tvec3 yyz(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.y, v.z); + GLM_INLINE glm::vec<3, T, P> yyz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.z); } // yyw template - GLM_INLINE glm::tvec3 yyw(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.y, v.w); + GLM_INLINE glm::vec<3, T, P> yyw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.y, v.w); } // yzx template - GLM_INLINE glm::tvec3 yzx(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.z, v.x); + GLM_INLINE glm::vec<3, T, P> yzx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.z, v.x); } template - GLM_INLINE glm::tvec3 yzx(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.z, v.x); + GLM_INLINE glm::vec<3, T, P> yzx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.z, v.x); } // yzy template - GLM_INLINE glm::tvec3 yzy(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.z, v.y); + GLM_INLINE glm::vec<3, T, P> yzy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.z, v.y); } template - GLM_INLINE glm::tvec3 yzy(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.z, v.y); + GLM_INLINE glm::vec<3, T, P> yzy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.z, v.y); } // yzz template - GLM_INLINE glm::tvec3 yzz(const glm::tvec3 &v) { - return glm::tvec3(v.y, v.z, v.z); + GLM_INLINE glm::vec<3, T, P> yzz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.z, v.z); } template - GLM_INLINE glm::tvec3 yzz(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.z, v.z); + GLM_INLINE glm::vec<3, T, P> yzz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.z, v.z); } // yzw template - GLM_INLINE glm::tvec3 yzw(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.z, v.w); + GLM_INLINE glm::vec<3, T, P> yzw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.z, v.w); } // ywx template - GLM_INLINE glm::tvec3 ywx(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.w, v.x); + GLM_INLINE glm::vec<3, T, P> ywx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.w, v.x); } // ywy template - GLM_INLINE glm::tvec3 ywy(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.w, v.y); + GLM_INLINE glm::vec<3, T, P> ywy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.w, v.y); } // ywz template - GLM_INLINE glm::tvec3 ywz(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.w, v.z); + GLM_INLINE glm::vec<3, T, P> ywz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.w, v.z); } // yww template - GLM_INLINE glm::tvec3 yww(const glm::tvec4 &v) { - return glm::tvec3(v.y, v.w, v.w); + GLM_INLINE glm::vec<3, T, P> yww(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.y, v.w, v.w); } // zxx template - GLM_INLINE glm::tvec3 zxx(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> zxx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.x, v.x); } template - GLM_INLINE glm::tvec3 zxx(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> zxx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.x, v.x); } // zxy template - GLM_INLINE glm::tvec3 zxy(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> zxy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.x, v.y); } template - GLM_INLINE glm::tvec3 zxy(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> zxy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.x, v.y); } // zxz template - GLM_INLINE glm::tvec3 zxz(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.x, v.z); + GLM_INLINE glm::vec<3, T, P> zxz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.x, v.z); } template - GLM_INLINE glm::tvec3 zxz(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.x, v.z); + GLM_INLINE glm::vec<3, T, P> zxz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.x, v.z); } // zxw template - GLM_INLINE glm::tvec3 zxw(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.x, v.w); + GLM_INLINE glm::vec<3, T, P> zxw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.x, v.w); } // zyx template - GLM_INLINE glm::tvec3 zyx(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> zyx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.y, v.x); } template - GLM_INLINE glm::tvec3 zyx(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> zyx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.y, v.x); } // zyy template - GLM_INLINE glm::tvec3 zyy(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> zyy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.y, v.y); } template - GLM_INLINE glm::tvec3 zyy(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> zyy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.y, v.y); } // zyz template - GLM_INLINE glm::tvec3 zyz(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.y, v.z); + GLM_INLINE glm::vec<3, T, P> zyz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.y, v.z); } template - GLM_INLINE glm::tvec3 zyz(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.y, v.z); + GLM_INLINE glm::vec<3, T, P> zyz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.y, v.z); } // zyw template - GLM_INLINE glm::tvec3 zyw(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.y, v.w); + GLM_INLINE glm::vec<3, T, P> zyw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.y, v.w); } // zzx template - GLM_INLINE glm::tvec3 zzx(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.z, v.x); + GLM_INLINE glm::vec<3, T, P> zzx(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.z, v.x); } template - GLM_INLINE glm::tvec3 zzx(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.z, v.x); + GLM_INLINE glm::vec<3, T, P> zzx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.z, v.x); } // zzy template - GLM_INLINE glm::tvec3 zzy(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.z, v.y); + GLM_INLINE glm::vec<3, T, P> zzy(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.z, v.y); } template - GLM_INLINE glm::tvec3 zzy(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.z, v.y); + GLM_INLINE glm::vec<3, T, P> zzy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.z, v.y); } // zzz template - GLM_INLINE glm::tvec3 zzz(const glm::tvec3 &v) { - return glm::tvec3(v.z, v.z, v.z); + GLM_INLINE glm::vec<3, T, P> zzz(const glm::vec<3, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.z, v.z); } template - GLM_INLINE glm::tvec3 zzz(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.z, v.z); + GLM_INLINE glm::vec<3, T, P> zzz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.z, v.z); } // zzw template - GLM_INLINE glm::tvec3 zzw(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.z, v.w); + GLM_INLINE glm::vec<3, T, P> zzw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.z, v.w); } // zwx template - GLM_INLINE glm::tvec3 zwx(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.w, v.x); + GLM_INLINE glm::vec<3, T, P> zwx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.w, v.x); } // zwy template - GLM_INLINE glm::tvec3 zwy(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.w, v.y); + GLM_INLINE glm::vec<3, T, P> zwy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.w, v.y); } // zwz template - GLM_INLINE glm::tvec3 zwz(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.w, v.z); + GLM_INLINE glm::vec<3, T, P> zwz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.w, v.z); } // zww template - GLM_INLINE glm::tvec3 zww(const glm::tvec4 &v) { - return glm::tvec3(v.z, v.w, v.w); + GLM_INLINE glm::vec<3, T, P> zww(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.z, v.w, v.w); } // wxx template - GLM_INLINE glm::tvec3 wxx(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.x, v.x); + GLM_INLINE glm::vec<3, T, P> wxx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.x, v.x); } // wxy template - GLM_INLINE glm::tvec3 wxy(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.x, v.y); + GLM_INLINE glm::vec<3, T, P> wxy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.x, v.y); } // wxz template - GLM_INLINE glm::tvec3 wxz(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.x, v.z); + GLM_INLINE glm::vec<3, T, P> wxz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.x, v.z); } // wxw template - GLM_INLINE glm::tvec3 wxw(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.x, v.w); + GLM_INLINE glm::vec<3, T, P> wxw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.x, v.w); } // wyx template - GLM_INLINE glm::tvec3 wyx(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.y, v.x); + GLM_INLINE glm::vec<3, T, P> wyx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.y, v.x); } // wyy template - GLM_INLINE glm::tvec3 wyy(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.y, v.y); + GLM_INLINE glm::vec<3, T, P> wyy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.y, v.y); } // wyz template - GLM_INLINE glm::tvec3 wyz(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.y, v.z); + GLM_INLINE glm::vec<3, T, P> wyz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.y, v.z); } // wyw template - GLM_INLINE glm::tvec3 wyw(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.y, v.w); + GLM_INLINE glm::vec<3, T, P> wyw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.y, v.w); } // wzx template - GLM_INLINE glm::tvec3 wzx(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.z, v.x); + GLM_INLINE glm::vec<3, T, P> wzx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.z, v.x); } // wzy template - GLM_INLINE glm::tvec3 wzy(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.z, v.y); + GLM_INLINE glm::vec<3, T, P> wzy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.z, v.y); } // wzz template - GLM_INLINE glm::tvec3 wzz(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.z, v.z); + GLM_INLINE glm::vec<3, T, P> wzz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.z, v.z); } // wzw template - GLM_INLINE glm::tvec3 wzw(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.z, v.w); + GLM_INLINE glm::vec<3, T, P> wzw(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.z, v.w); } // wwx template - GLM_INLINE glm::tvec3 wwx(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.w, v.x); + GLM_INLINE glm::vec<3, T, P> wwx(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.w, v.x); } // wwy template - GLM_INLINE glm::tvec3 wwy(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.w, v.y); + GLM_INLINE glm::vec<3, T, P> wwy(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.w, v.y); } // wwz template - GLM_INLINE glm::tvec3 wwz(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.w, v.z); + GLM_INLINE glm::vec<3, T, P> wwz(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.w, v.z); } // www template - GLM_INLINE glm::tvec3 www(const glm::tvec4 &v) { - return glm::tvec3(v.w, v.w, v.w); + GLM_INLINE glm::vec<3, T, P> www(const glm::vec<4, T, P> &v) { + return glm::vec<3, T, P>(v.w, v.w, v.w); } // xxxx template - GLM_INLINE glm::tvec4 xxxx(const glm::tvec1 &v) { - return glm::tvec4(v.x, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xxxx(const glm::vec<1, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.x); } template - GLM_INLINE glm::tvec4 xxxx(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xxxx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.x); } template - GLM_INLINE glm::tvec4 xxxx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xxxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.x); } template - GLM_INLINE glm::tvec4 xxxx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xxxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.x); } // xxxy template - GLM_INLINE glm::tvec4 xxxy(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xxxy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.y); } template - GLM_INLINE glm::tvec4 xxxy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xxxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.y); } template - GLM_INLINE glm::tvec4 xxxy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xxxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.y); } // xxxz template - GLM_INLINE glm::tvec4 xxxz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> xxxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.z); } template - GLM_INLINE glm::tvec4 xxxz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> xxxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.z); } // xxxw template - GLM_INLINE glm::tvec4 xxxw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> xxxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.x, v.w); } // xxyx template - GLM_INLINE glm::tvec4 xxyx(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xxyx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.x); } template - GLM_INLINE glm::tvec4 xxyx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xxyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.x); } template - GLM_INLINE glm::tvec4 xxyx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xxyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.x); } // xxyy template - GLM_INLINE glm::tvec4 xxyy(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xxyy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.y); } template - GLM_INLINE glm::tvec4 xxyy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xxyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.y); } template - GLM_INLINE glm::tvec4 xxyy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xxyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.y); } // xxyz template - GLM_INLINE glm::tvec4 xxyz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> xxyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.z); } template - GLM_INLINE glm::tvec4 xxyz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> xxyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.z); } // xxyw template - GLM_INLINE glm::tvec4 xxyw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> xxyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.y, v.w); } // xxzx template - GLM_INLINE glm::tvec4 xxzx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> xxzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.z, v.x); } template - GLM_INLINE glm::tvec4 xxzx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> xxzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.z, v.x); } // xxzy template - GLM_INLINE glm::tvec4 xxzy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> xxzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.z, v.y); } template - GLM_INLINE glm::tvec4 xxzy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> xxzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.z, v.y); } // xxzz template - GLM_INLINE glm::tvec4 xxzz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.x, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> xxzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.z, v.z); } template - GLM_INLINE glm::tvec4 xxzz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> xxzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.z, v.z); } // xxzw template - GLM_INLINE glm::tvec4 xxzw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> xxzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.z, v.w); } // xxwx template - GLM_INLINE glm::tvec4 xxwx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> xxwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.w, v.x); } // xxwy template - GLM_INLINE glm::tvec4 xxwy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> xxwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.w, v.y); } // xxwz template - GLM_INLINE glm::tvec4 xxwz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> xxwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.w, v.z); } // xxww template - GLM_INLINE glm::tvec4 xxww(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.x, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> xxww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.x, v.w, v.w); } // xyxx template - GLM_INLINE glm::tvec4 xyxx(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xyxx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.x); } template - GLM_INLINE glm::tvec4 xyxx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xyxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.x); } template - GLM_INLINE glm::tvec4 xyxx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xyxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.x); } // xyxy template - GLM_INLINE glm::tvec4 xyxy(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xyxy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.y); } template - GLM_INLINE glm::tvec4 xyxy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xyxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.y); } template - GLM_INLINE glm::tvec4 xyxy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xyxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.y); } // xyxz template - GLM_INLINE glm::tvec4 xyxz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> xyxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.z); } template - GLM_INLINE glm::tvec4 xyxz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> xyxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.z); } // xyxw template - GLM_INLINE glm::tvec4 xyxw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> xyxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.x, v.w); } // xyyx template - GLM_INLINE glm::tvec4 xyyx(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xyyx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.x); } template - GLM_INLINE glm::tvec4 xyyx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xyyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.x); } template - GLM_INLINE glm::tvec4 xyyx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xyyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.x); } // xyyy template - GLM_INLINE glm::tvec4 xyyy(const glm::tvec2 &v) { - return glm::tvec4(v.x, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xyyy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.y); } template - GLM_INLINE glm::tvec4 xyyy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xyyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.y); } template - GLM_INLINE glm::tvec4 xyyy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xyyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.y); } // xyyz template - GLM_INLINE glm::tvec4 xyyz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> xyyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.z); } template - GLM_INLINE glm::tvec4 xyyz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> xyyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.z); } // xyyw template - GLM_INLINE glm::tvec4 xyyw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> xyyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.y, v.w); } // xyzx template - GLM_INLINE glm::tvec4 xyzx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> xyzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.z, v.x); } template - GLM_INLINE glm::tvec4 xyzx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> xyzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.z, v.x); } // xyzy template - GLM_INLINE glm::tvec4 xyzy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> xyzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.z, v.y); } template - GLM_INLINE glm::tvec4 xyzy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> xyzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.z, v.y); } // xyzz template - GLM_INLINE glm::tvec4 xyzz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.y, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> xyzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.z, v.z); } template - GLM_INLINE glm::tvec4 xyzz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> xyzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.z, v.z); } // xyzw template - GLM_INLINE glm::tvec4 xyzw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> xyzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.z, v.w); } // xywx template - GLM_INLINE glm::tvec4 xywx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> xywx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.w, v.x); } // xywy template - GLM_INLINE glm::tvec4 xywy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> xywy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.w, v.y); } // xywz template - GLM_INLINE glm::tvec4 xywz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> xywz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.w, v.z); } // xyww template - GLM_INLINE glm::tvec4 xyww(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.y, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> xyww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.y, v.w, v.w); } // xzxx template - GLM_INLINE glm::tvec4 xzxx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xzxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.x, v.x); } template - GLM_INLINE glm::tvec4 xzxx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xzxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.x, v.x); } // xzxy template - GLM_INLINE glm::tvec4 xzxy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xzxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.x, v.y); } template - GLM_INLINE glm::tvec4 xzxy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xzxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.x, v.y); } // xzxz template - GLM_INLINE glm::tvec4 xzxz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> xzxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.x, v.z); } template - GLM_INLINE glm::tvec4 xzxz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> xzxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.x, v.z); } // xzxw template - GLM_INLINE glm::tvec4 xzxw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> xzxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.x, v.w); } // xzyx template - GLM_INLINE glm::tvec4 xzyx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xzyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.y, v.x); } template - GLM_INLINE glm::tvec4 xzyx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xzyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.y, v.x); } // xzyy template - GLM_INLINE glm::tvec4 xzyy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xzyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.y, v.y); } template - GLM_INLINE glm::tvec4 xzyy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xzyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.y, v.y); } // xzyz template - GLM_INLINE glm::tvec4 xzyz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> xzyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.y, v.z); } template - GLM_INLINE glm::tvec4 xzyz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> xzyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.y, v.z); } // xzyw template - GLM_INLINE glm::tvec4 xzyw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> xzyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.y, v.w); } // xzzx template - GLM_INLINE glm::tvec4 xzzx(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> xzzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.z, v.x); } template - GLM_INLINE glm::tvec4 xzzx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> xzzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.z, v.x); } // xzzy template - GLM_INLINE glm::tvec4 xzzy(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> xzzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.z, v.y); } template - GLM_INLINE glm::tvec4 xzzy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> xzzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.z, v.y); } // xzzz template - GLM_INLINE glm::tvec4 xzzz(const glm::tvec3 &v) { - return glm::tvec4(v.x, v.z, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> xzzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.z, v.z); } template - GLM_INLINE glm::tvec4 xzzz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> xzzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.z, v.z); } // xzzw template - GLM_INLINE glm::tvec4 xzzw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> xzzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.z, v.w); } // xzwx template - GLM_INLINE glm::tvec4 xzwx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> xzwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.w, v.x); } // xzwy template - GLM_INLINE glm::tvec4 xzwy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> xzwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.w, v.y); } // xzwz template - GLM_INLINE glm::tvec4 xzwz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> xzwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.w, v.z); } // xzww template - GLM_INLINE glm::tvec4 xzww(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.z, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> xzww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.z, v.w, v.w); } // xwxx template - GLM_INLINE glm::tvec4 xwxx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> xwxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.x, v.x); } // xwxy template - GLM_INLINE glm::tvec4 xwxy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> xwxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.x, v.y); } // xwxz template - GLM_INLINE glm::tvec4 xwxz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> xwxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.x, v.z); } // xwxw template - GLM_INLINE glm::tvec4 xwxw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> xwxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.x, v.w); } // xwyx template - GLM_INLINE glm::tvec4 xwyx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> xwyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.y, v.x); } // xwyy template - GLM_INLINE glm::tvec4 xwyy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> xwyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.y, v.y); } // xwyz template - GLM_INLINE glm::tvec4 xwyz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> xwyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.y, v.z); } // xwyw template - GLM_INLINE glm::tvec4 xwyw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> xwyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.y, v.w); } // xwzx template - GLM_INLINE glm::tvec4 xwzx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> xwzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.z, v.x); } // xwzy template - GLM_INLINE glm::tvec4 xwzy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> xwzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.z, v.y); } // xwzz template - GLM_INLINE glm::tvec4 xwzz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> xwzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.z, v.z); } // xwzw template - GLM_INLINE glm::tvec4 xwzw(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> xwzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.z, v.w); } // xwwx template - GLM_INLINE glm::tvec4 xwwx(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> xwwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.w, v.x); } // xwwy template - GLM_INLINE glm::tvec4 xwwy(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> xwwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.w, v.y); } // xwwz template - GLM_INLINE glm::tvec4 xwwz(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> xwwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.w, v.z); } // xwww template - GLM_INLINE glm::tvec4 xwww(const glm::tvec4 &v) { - return glm::tvec4(v.x, v.w, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> xwww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.x, v.w, v.w, v.w); } // yxxx template - GLM_INLINE glm::tvec4 yxxx(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yxxx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.x); } template - GLM_INLINE glm::tvec4 yxxx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yxxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.x); } template - GLM_INLINE glm::tvec4 yxxx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yxxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.x); } // yxxy template - GLM_INLINE glm::tvec4 yxxy(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yxxy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.y); } template - GLM_INLINE glm::tvec4 yxxy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yxxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.y); } template - GLM_INLINE glm::tvec4 yxxy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yxxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.y); } // yxxz template - GLM_INLINE glm::tvec4 yxxz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> yxxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.z); } template - GLM_INLINE glm::tvec4 yxxz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> yxxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.z); } // yxxw template - GLM_INLINE glm::tvec4 yxxw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> yxxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.x, v.w); } // yxyx template - GLM_INLINE glm::tvec4 yxyx(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yxyx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.x); } template - GLM_INLINE glm::tvec4 yxyx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yxyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.x); } template - GLM_INLINE glm::tvec4 yxyx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yxyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.x); } // yxyy template - GLM_INLINE glm::tvec4 yxyy(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yxyy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.y); } template - GLM_INLINE glm::tvec4 yxyy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yxyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.y); } template - GLM_INLINE glm::tvec4 yxyy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yxyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.y); } // yxyz template - GLM_INLINE glm::tvec4 yxyz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> yxyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.z); } template - GLM_INLINE glm::tvec4 yxyz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> yxyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.z); } // yxyw template - GLM_INLINE glm::tvec4 yxyw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> yxyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.y, v.w); } // yxzx template - GLM_INLINE glm::tvec4 yxzx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> yxzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.z, v.x); } template - GLM_INLINE glm::tvec4 yxzx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> yxzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.z, v.x); } // yxzy template - GLM_INLINE glm::tvec4 yxzy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> yxzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.z, v.y); } template - GLM_INLINE glm::tvec4 yxzy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> yxzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.z, v.y); } // yxzz template - GLM_INLINE glm::tvec4 yxzz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.x, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> yxzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.z, v.z); } template - GLM_INLINE glm::tvec4 yxzz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> yxzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.z, v.z); } // yxzw template - GLM_INLINE glm::tvec4 yxzw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> yxzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.z, v.w); } // yxwx template - GLM_INLINE glm::tvec4 yxwx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> yxwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.w, v.x); } // yxwy template - GLM_INLINE glm::tvec4 yxwy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> yxwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.w, v.y); } // yxwz template - GLM_INLINE glm::tvec4 yxwz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> yxwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.w, v.z); } // yxww template - GLM_INLINE glm::tvec4 yxww(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.x, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> yxww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.x, v.w, v.w); } // yyxx template - GLM_INLINE glm::tvec4 yyxx(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yyxx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.x); } template - GLM_INLINE glm::tvec4 yyxx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yyxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.x); } template - GLM_INLINE glm::tvec4 yyxx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yyxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.x); } // yyxy template - GLM_INLINE glm::tvec4 yyxy(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yyxy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.y); } template - GLM_INLINE glm::tvec4 yyxy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yyxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.y); } template - GLM_INLINE glm::tvec4 yyxy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yyxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.y); } // yyxz template - GLM_INLINE glm::tvec4 yyxz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> yyxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.z); } template - GLM_INLINE glm::tvec4 yyxz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> yyxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.z); } // yyxw template - GLM_INLINE glm::tvec4 yyxw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> yyxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.x, v.w); } // yyyx template - GLM_INLINE glm::tvec4 yyyx(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yyyx(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.x); } template - GLM_INLINE glm::tvec4 yyyx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yyyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.x); } template - GLM_INLINE glm::tvec4 yyyx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yyyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.x); } // yyyy template - GLM_INLINE glm::tvec4 yyyy(const glm::tvec2 &v) { - return glm::tvec4(v.y, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yyyy(const glm::vec<2, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.y); } template - GLM_INLINE glm::tvec4 yyyy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yyyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.y); } template - GLM_INLINE glm::tvec4 yyyy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yyyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.y); } // yyyz template - GLM_INLINE glm::tvec4 yyyz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> yyyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.z); } template - GLM_INLINE glm::tvec4 yyyz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> yyyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.z); } // yyyw template - GLM_INLINE glm::tvec4 yyyw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> yyyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.y, v.w); } // yyzx template - GLM_INLINE glm::tvec4 yyzx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> yyzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.z, v.x); } template - GLM_INLINE glm::tvec4 yyzx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> yyzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.z, v.x); } // yyzy template - GLM_INLINE glm::tvec4 yyzy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> yyzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.z, v.y); } template - GLM_INLINE glm::tvec4 yyzy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> yyzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.z, v.y); } // yyzz template - GLM_INLINE glm::tvec4 yyzz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.y, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> yyzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.z, v.z); } template - GLM_INLINE glm::tvec4 yyzz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> yyzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.z, v.z); } // yyzw template - GLM_INLINE glm::tvec4 yyzw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> yyzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.z, v.w); } // yywx template - GLM_INLINE glm::tvec4 yywx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> yywx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.w, v.x); } // yywy template - GLM_INLINE glm::tvec4 yywy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> yywy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.w, v.y); } // yywz template - GLM_INLINE glm::tvec4 yywz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> yywz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.w, v.z); } // yyww template - GLM_INLINE glm::tvec4 yyww(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.y, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> yyww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.y, v.w, v.w); } // yzxx template - GLM_INLINE glm::tvec4 yzxx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yzxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.x, v.x); } template - GLM_INLINE glm::tvec4 yzxx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> yzxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.x, v.x); } // yzxy template - GLM_INLINE glm::tvec4 yzxy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yzxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.x, v.y); } template - GLM_INLINE glm::tvec4 yzxy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> yzxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.x, v.y); } // yzxz template - GLM_INLINE glm::tvec4 yzxz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> yzxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.x, v.z); } template - GLM_INLINE glm::tvec4 yzxz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> yzxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.x, v.z); } // yzxw template - GLM_INLINE glm::tvec4 yzxw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> yzxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.x, v.w); } // yzyx template - GLM_INLINE glm::tvec4 yzyx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yzyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.y, v.x); } template - GLM_INLINE glm::tvec4 yzyx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> yzyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.y, v.x); } // yzyy template - GLM_INLINE glm::tvec4 yzyy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yzyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.y, v.y); } template - GLM_INLINE glm::tvec4 yzyy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> yzyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.y, v.y); } // yzyz template - GLM_INLINE glm::tvec4 yzyz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> yzyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.y, v.z); } template - GLM_INLINE glm::tvec4 yzyz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> yzyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.y, v.z); } // yzyw template - GLM_INLINE glm::tvec4 yzyw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> yzyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.y, v.w); } // yzzx template - GLM_INLINE glm::tvec4 yzzx(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> yzzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.z, v.x); } template - GLM_INLINE glm::tvec4 yzzx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> yzzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.z, v.x); } // yzzy template - GLM_INLINE glm::tvec4 yzzy(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> yzzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.z, v.y); } template - GLM_INLINE glm::tvec4 yzzy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> yzzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.z, v.y); } // yzzz template - GLM_INLINE glm::tvec4 yzzz(const glm::tvec3 &v) { - return glm::tvec4(v.y, v.z, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> yzzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.z, v.z); } template - GLM_INLINE glm::tvec4 yzzz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> yzzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.z, v.z); } // yzzw template - GLM_INLINE glm::tvec4 yzzw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> yzzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.z, v.w); } // yzwx template - GLM_INLINE glm::tvec4 yzwx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> yzwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.w, v.x); } // yzwy template - GLM_INLINE glm::tvec4 yzwy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> yzwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.w, v.y); } // yzwz template - GLM_INLINE glm::tvec4 yzwz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> yzwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.w, v.z); } // yzww template - GLM_INLINE glm::tvec4 yzww(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.z, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> yzww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.z, v.w, v.w); } // ywxx template - GLM_INLINE glm::tvec4 ywxx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> ywxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.x, v.x); } // ywxy template - GLM_INLINE glm::tvec4 ywxy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> ywxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.x, v.y); } // ywxz template - GLM_INLINE glm::tvec4 ywxz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> ywxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.x, v.z); } // ywxw template - GLM_INLINE glm::tvec4 ywxw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> ywxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.x, v.w); } // ywyx template - GLM_INLINE glm::tvec4 ywyx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> ywyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.y, v.x); } // ywyy template - GLM_INLINE glm::tvec4 ywyy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> ywyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.y, v.y); } // ywyz template - GLM_INLINE glm::tvec4 ywyz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> ywyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.y, v.z); } // ywyw template - GLM_INLINE glm::tvec4 ywyw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> ywyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.y, v.w); } // ywzx template - GLM_INLINE glm::tvec4 ywzx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> ywzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.z, v.x); } // ywzy template - GLM_INLINE glm::tvec4 ywzy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> ywzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.z, v.y); } // ywzz template - GLM_INLINE glm::tvec4 ywzz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> ywzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.z, v.z); } // ywzw template - GLM_INLINE glm::tvec4 ywzw(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> ywzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.z, v.w); } // ywwx template - GLM_INLINE glm::tvec4 ywwx(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> ywwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.w, v.x); } // ywwy template - GLM_INLINE glm::tvec4 ywwy(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> ywwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.w, v.y); } // ywwz template - GLM_INLINE glm::tvec4 ywwz(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> ywwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.w, v.z); } // ywww template - GLM_INLINE glm::tvec4 ywww(const glm::tvec4 &v) { - return glm::tvec4(v.y, v.w, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> ywww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.y, v.w, v.w, v.w); } // zxxx template - GLM_INLINE glm::tvec4 zxxx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> zxxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.x, v.x); } template - GLM_INLINE glm::tvec4 zxxx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> zxxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.x, v.x); } // zxxy template - GLM_INLINE glm::tvec4 zxxy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> zxxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.x, v.y); } template - GLM_INLINE glm::tvec4 zxxy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> zxxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.x, v.y); } // zxxz template - GLM_INLINE glm::tvec4 zxxz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> zxxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.x, v.z); } template - GLM_INLINE glm::tvec4 zxxz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> zxxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.x, v.z); } // zxxw template - GLM_INLINE glm::tvec4 zxxw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> zxxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.x, v.w); } // zxyx template - GLM_INLINE glm::tvec4 zxyx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> zxyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.y, v.x); } template - GLM_INLINE glm::tvec4 zxyx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> zxyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.y, v.x); } // zxyy template - GLM_INLINE glm::tvec4 zxyy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> zxyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.y, v.y); } template - GLM_INLINE glm::tvec4 zxyy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> zxyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.y, v.y); } // zxyz template - GLM_INLINE glm::tvec4 zxyz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> zxyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.y, v.z); } template - GLM_INLINE glm::tvec4 zxyz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> zxyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.y, v.z); } // zxyw template - GLM_INLINE glm::tvec4 zxyw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> zxyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.y, v.w); } // zxzx template - GLM_INLINE glm::tvec4 zxzx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> zxzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.z, v.x); } template - GLM_INLINE glm::tvec4 zxzx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> zxzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.z, v.x); } // zxzy template - GLM_INLINE glm::tvec4 zxzy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> zxzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.z, v.y); } template - GLM_INLINE glm::tvec4 zxzy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> zxzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.z, v.y); } // zxzz template - GLM_INLINE glm::tvec4 zxzz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.x, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> zxzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.z, v.z); } template - GLM_INLINE glm::tvec4 zxzz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> zxzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.z, v.z); } // zxzw template - GLM_INLINE glm::tvec4 zxzw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> zxzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.z, v.w); } // zxwx template - GLM_INLINE glm::tvec4 zxwx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> zxwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.w, v.x); } // zxwy template - GLM_INLINE glm::tvec4 zxwy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> zxwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.w, v.y); } // zxwz template - GLM_INLINE glm::tvec4 zxwz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> zxwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.w, v.z); } // zxww template - GLM_INLINE glm::tvec4 zxww(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.x, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> zxww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.x, v.w, v.w); } // zyxx template - GLM_INLINE glm::tvec4 zyxx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> zyxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.x, v.x); } template - GLM_INLINE glm::tvec4 zyxx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> zyxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.x, v.x); } // zyxy template - GLM_INLINE glm::tvec4 zyxy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> zyxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.x, v.y); } template - GLM_INLINE glm::tvec4 zyxy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> zyxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.x, v.y); } // zyxz template - GLM_INLINE glm::tvec4 zyxz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> zyxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.x, v.z); } template - GLM_INLINE glm::tvec4 zyxz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> zyxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.x, v.z); } // zyxw template - GLM_INLINE glm::tvec4 zyxw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> zyxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.x, v.w); } // zyyx template - GLM_INLINE glm::tvec4 zyyx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> zyyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.y, v.x); } template - GLM_INLINE glm::tvec4 zyyx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> zyyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.y, v.x); } // zyyy template - GLM_INLINE glm::tvec4 zyyy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> zyyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.y, v.y); } template - GLM_INLINE glm::tvec4 zyyy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> zyyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.y, v.y); } // zyyz template - GLM_INLINE glm::tvec4 zyyz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> zyyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.y, v.z); } template - GLM_INLINE glm::tvec4 zyyz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> zyyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.y, v.z); } // zyyw template - GLM_INLINE glm::tvec4 zyyw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> zyyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.y, v.w); } // zyzx template - GLM_INLINE glm::tvec4 zyzx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> zyzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.z, v.x); } template - GLM_INLINE glm::tvec4 zyzx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> zyzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.z, v.x); } // zyzy template - GLM_INLINE glm::tvec4 zyzy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> zyzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.z, v.y); } template - GLM_INLINE glm::tvec4 zyzy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> zyzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.z, v.y); } // zyzz template - GLM_INLINE glm::tvec4 zyzz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.y, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> zyzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.z, v.z); } template - GLM_INLINE glm::tvec4 zyzz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> zyzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.z, v.z); } // zyzw template - GLM_INLINE glm::tvec4 zyzw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> zyzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.z, v.w); } // zywx template - GLM_INLINE glm::tvec4 zywx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> zywx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.w, v.x); } // zywy template - GLM_INLINE glm::tvec4 zywy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> zywy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.w, v.y); } // zywz template - GLM_INLINE glm::tvec4 zywz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> zywz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.w, v.z); } // zyww template - GLM_INLINE glm::tvec4 zyww(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.y, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> zyww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.y, v.w, v.w); } // zzxx template - GLM_INLINE glm::tvec4 zzxx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> zzxx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.x, v.x); } template - GLM_INLINE glm::tvec4 zzxx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> zzxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.x, v.x); } // zzxy template - GLM_INLINE glm::tvec4 zzxy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> zzxy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.x, v.y); } template - GLM_INLINE glm::tvec4 zzxy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> zzxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.x, v.y); } // zzxz template - GLM_INLINE glm::tvec4 zzxz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> zzxz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.x, v.z); } template - GLM_INLINE glm::tvec4 zzxz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> zzxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.x, v.z); } // zzxw template - GLM_INLINE glm::tvec4 zzxw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> zzxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.x, v.w); } // zzyx template - GLM_INLINE glm::tvec4 zzyx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> zzyx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.y, v.x); } template - GLM_INLINE glm::tvec4 zzyx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> zzyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.y, v.x); } // zzyy template - GLM_INLINE glm::tvec4 zzyy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> zzyy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.y, v.y); } template - GLM_INLINE glm::tvec4 zzyy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> zzyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.y, v.y); } // zzyz template - GLM_INLINE glm::tvec4 zzyz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> zzyz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.y, v.z); } template - GLM_INLINE glm::tvec4 zzyz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> zzyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.y, v.z); } // zzyw template - GLM_INLINE glm::tvec4 zzyw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> zzyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.y, v.w); } // zzzx template - GLM_INLINE glm::tvec4 zzzx(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> zzzx(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.z, v.x); } template - GLM_INLINE glm::tvec4 zzzx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> zzzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.z, v.x); } // zzzy template - GLM_INLINE glm::tvec4 zzzy(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> zzzy(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.z, v.y); } template - GLM_INLINE glm::tvec4 zzzy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> zzzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.z, v.y); } // zzzz template - GLM_INLINE glm::tvec4 zzzz(const glm::tvec3 &v) { - return glm::tvec4(v.z, v.z, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> zzzz(const glm::vec<3, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.z, v.z); } template - GLM_INLINE glm::tvec4 zzzz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> zzzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.z, v.z); } // zzzw template - GLM_INLINE glm::tvec4 zzzw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> zzzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.z, v.w); } // zzwx template - GLM_INLINE glm::tvec4 zzwx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> zzwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.w, v.x); } // zzwy template - GLM_INLINE glm::tvec4 zzwy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> zzwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.w, v.y); } // zzwz template - GLM_INLINE glm::tvec4 zzwz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> zzwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.w, v.z); } // zzww template - GLM_INLINE glm::tvec4 zzww(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.z, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> zzww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.z, v.w, v.w); } // zwxx template - GLM_INLINE glm::tvec4 zwxx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> zwxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.x, v.x); } // zwxy template - GLM_INLINE glm::tvec4 zwxy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> zwxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.x, v.y); } // zwxz template - GLM_INLINE glm::tvec4 zwxz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> zwxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.x, v.z); } // zwxw template - GLM_INLINE glm::tvec4 zwxw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> zwxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.x, v.w); } // zwyx template - GLM_INLINE glm::tvec4 zwyx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> zwyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.y, v.x); } // zwyy template - GLM_INLINE glm::tvec4 zwyy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> zwyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.y, v.y); } // zwyz template - GLM_INLINE glm::tvec4 zwyz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> zwyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.y, v.z); } // zwyw template - GLM_INLINE glm::tvec4 zwyw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> zwyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.y, v.w); } // zwzx template - GLM_INLINE glm::tvec4 zwzx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> zwzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.z, v.x); } // zwzy template - GLM_INLINE glm::tvec4 zwzy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> zwzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.z, v.y); } // zwzz template - GLM_INLINE glm::tvec4 zwzz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> zwzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.z, v.z); } // zwzw template - GLM_INLINE glm::tvec4 zwzw(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> zwzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.z, v.w); } // zwwx template - GLM_INLINE glm::tvec4 zwwx(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> zwwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.w, v.x); } // zwwy template - GLM_INLINE glm::tvec4 zwwy(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> zwwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.w, v.y); } // zwwz template - GLM_INLINE glm::tvec4 zwwz(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> zwwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.w, v.z); } // zwww template - GLM_INLINE glm::tvec4 zwww(const glm::tvec4 &v) { - return glm::tvec4(v.z, v.w, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> zwww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.z, v.w, v.w, v.w); } // wxxx template - GLM_INLINE glm::tvec4 wxxx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> wxxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.x, v.x); } // wxxy template - GLM_INLINE glm::tvec4 wxxy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> wxxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.x, v.y); } // wxxz template - GLM_INLINE glm::tvec4 wxxz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> wxxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.x, v.z); } // wxxw template - GLM_INLINE glm::tvec4 wxxw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> wxxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.x, v.w); } // wxyx template - GLM_INLINE glm::tvec4 wxyx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> wxyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.y, v.x); } // wxyy template - GLM_INLINE glm::tvec4 wxyy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> wxyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.y, v.y); } // wxyz template - GLM_INLINE glm::tvec4 wxyz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> wxyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.y, v.z); } // wxyw template - GLM_INLINE glm::tvec4 wxyw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> wxyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.y, v.w); } // wxzx template - GLM_INLINE glm::tvec4 wxzx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> wxzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.z, v.x); } // wxzy template - GLM_INLINE glm::tvec4 wxzy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> wxzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.z, v.y); } // wxzz template - GLM_INLINE glm::tvec4 wxzz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> wxzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.z, v.z); } // wxzw template - GLM_INLINE glm::tvec4 wxzw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> wxzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.z, v.w); } // wxwx template - GLM_INLINE glm::tvec4 wxwx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> wxwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.w, v.x); } // wxwy template - GLM_INLINE glm::tvec4 wxwy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> wxwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.w, v.y); } // wxwz template - GLM_INLINE glm::tvec4 wxwz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> wxwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.w, v.z); } // wxww template - GLM_INLINE glm::tvec4 wxww(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.x, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> wxww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.x, v.w, v.w); } // wyxx template - GLM_INLINE glm::tvec4 wyxx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> wyxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.x, v.x); } // wyxy template - GLM_INLINE glm::tvec4 wyxy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> wyxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.x, v.y); } // wyxz template - GLM_INLINE glm::tvec4 wyxz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> wyxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.x, v.z); } // wyxw template - GLM_INLINE glm::tvec4 wyxw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> wyxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.x, v.w); } // wyyx template - GLM_INLINE glm::tvec4 wyyx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> wyyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.y, v.x); } // wyyy template - GLM_INLINE glm::tvec4 wyyy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> wyyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.y, v.y); } // wyyz template - GLM_INLINE glm::tvec4 wyyz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> wyyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.y, v.z); } // wyyw template - GLM_INLINE glm::tvec4 wyyw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> wyyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.y, v.w); } // wyzx template - GLM_INLINE glm::tvec4 wyzx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> wyzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.z, v.x); } // wyzy template - GLM_INLINE glm::tvec4 wyzy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> wyzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.z, v.y); } // wyzz template - GLM_INLINE glm::tvec4 wyzz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> wyzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.z, v.z); } // wyzw template - GLM_INLINE glm::tvec4 wyzw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> wyzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.z, v.w); } // wywx template - GLM_INLINE glm::tvec4 wywx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> wywx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.w, v.x); } // wywy template - GLM_INLINE glm::tvec4 wywy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> wywy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.w, v.y); } // wywz template - GLM_INLINE glm::tvec4 wywz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> wywz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.w, v.z); } // wyww template - GLM_INLINE glm::tvec4 wyww(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.y, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> wyww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.y, v.w, v.w); } // wzxx template - GLM_INLINE glm::tvec4 wzxx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> wzxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.x, v.x); } // wzxy template - GLM_INLINE glm::tvec4 wzxy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> wzxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.x, v.y); } // wzxz template - GLM_INLINE glm::tvec4 wzxz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> wzxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.x, v.z); } // wzxw template - GLM_INLINE glm::tvec4 wzxw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> wzxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.x, v.w); } // wzyx template - GLM_INLINE glm::tvec4 wzyx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> wzyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.y, v.x); } // wzyy template - GLM_INLINE glm::tvec4 wzyy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> wzyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.y, v.y); } // wzyz template - GLM_INLINE glm::tvec4 wzyz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> wzyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.y, v.z); } // wzyw template - GLM_INLINE glm::tvec4 wzyw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> wzyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.y, v.w); } // wzzx template - GLM_INLINE glm::tvec4 wzzx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> wzzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.z, v.x); } // wzzy template - GLM_INLINE glm::tvec4 wzzy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> wzzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.z, v.y); } // wzzz template - GLM_INLINE glm::tvec4 wzzz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> wzzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.z, v.z); } // wzzw template - GLM_INLINE glm::tvec4 wzzw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> wzzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.z, v.w); } // wzwx template - GLM_INLINE glm::tvec4 wzwx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> wzwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.w, v.x); } // wzwy template - GLM_INLINE glm::tvec4 wzwy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> wzwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.w, v.y); } // wzwz template - GLM_INLINE glm::tvec4 wzwz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> wzwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.w, v.z); } // wzww template - GLM_INLINE glm::tvec4 wzww(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.z, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> wzww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.z, v.w, v.w); } // wwxx template - GLM_INLINE glm::tvec4 wwxx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.x, v.x); + GLM_INLINE glm::vec<4, T, P> wwxx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.x, v.x); } // wwxy template - GLM_INLINE glm::tvec4 wwxy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.x, v.y); + GLM_INLINE glm::vec<4, T, P> wwxy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.x, v.y); } // wwxz template - GLM_INLINE glm::tvec4 wwxz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.x, v.z); + GLM_INLINE glm::vec<4, T, P> wwxz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.x, v.z); } // wwxw template - GLM_INLINE glm::tvec4 wwxw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.x, v.w); + GLM_INLINE glm::vec<4, T, P> wwxw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.x, v.w); } // wwyx template - GLM_INLINE glm::tvec4 wwyx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.y, v.x); + GLM_INLINE glm::vec<4, T, P> wwyx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.y, v.x); } // wwyy template - GLM_INLINE glm::tvec4 wwyy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.y, v.y); + GLM_INLINE glm::vec<4, T, P> wwyy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.y, v.y); } // wwyz template - GLM_INLINE glm::tvec4 wwyz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.y, v.z); + GLM_INLINE glm::vec<4, T, P> wwyz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.y, v.z); } // wwyw template - GLM_INLINE glm::tvec4 wwyw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.y, v.w); + GLM_INLINE glm::vec<4, T, P> wwyw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.y, v.w); } // wwzx template - GLM_INLINE glm::tvec4 wwzx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.z, v.x); + GLM_INLINE glm::vec<4, T, P> wwzx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.z, v.x); } // wwzy template - GLM_INLINE glm::tvec4 wwzy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.z, v.y); + GLM_INLINE glm::vec<4, T, P> wwzy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.z, v.y); } // wwzz template - GLM_INLINE glm::tvec4 wwzz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.z, v.z); + GLM_INLINE glm::vec<4, T, P> wwzz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.z, v.z); } // wwzw template - GLM_INLINE glm::tvec4 wwzw(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.z, v.w); + GLM_INLINE glm::vec<4, T, P> wwzw(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.z, v.w); } // wwwx template - GLM_INLINE glm::tvec4 wwwx(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.w, v.x); + GLM_INLINE glm::vec<4, T, P> wwwx(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.w, v.x); } // wwwy template - GLM_INLINE glm::tvec4 wwwy(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.w, v.y); + GLM_INLINE glm::vec<4, T, P> wwwy(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.w, v.y); } // wwwz template - GLM_INLINE glm::tvec4 wwwz(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.w, v.z); + GLM_INLINE glm::vec<4, T, P> wwwz(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.w, v.z); } // wwww template - GLM_INLINE glm::tvec4 wwww(const glm::tvec4 &v) { - return glm::tvec4(v.w, v.w, v.w, v.w); + GLM_INLINE glm::vec<4, T, P> wwww(const glm::vec<4, T, P> &v) { + return glm::vec<4, T, P>(v.w, v.w, v.w, v.w); } } diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp index a2284746..c8075e84 100644 --- a/glm/gtx/vector_angle.hpp +++ b/glm/gtx/vector_angle.hpp @@ -46,17 +46,17 @@ namespace glm /// @see gtx_vector_angle extension. template GLM_FUNC_DECL T orientedAngle( - tvec2 const & x, - tvec2 const & y); + vec<2, T, P> const & x, + vec<2, T, P> const & y); //! Returns the oriented angle between two 3d vectors based from a reference axis. //! Parameters need to be normalized. /// @see gtx_vector_angle extension. template GLM_FUNC_DECL T orientedAngle( - tvec3 const & x, - tvec3 const & y, - tvec3 const & ref); + vec<3, T, P> const & x, + vec<3, T, P> const & y, + vec<3, T, P> const & ref); /// @} }// namespace glm diff --git a/glm/gtx/vector_angle.inl b/glm/gtx/vector_angle.inl index 1f17f378..0d609cc6 100644 --- a/glm/gtx/vector_angle.inl +++ b/glm/gtx/vector_angle.inl @@ -29,8 +29,8 @@ namespace glm template GLM_FUNC_QUALIFIER T orientedAngle ( - tvec2 const & x, - tvec2 const & y + vec<2, T, P> const & x, + vec<2, T, P> const & y ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'orientedAngle' only accept floating-point inputs"); @@ -45,9 +45,9 @@ namespace glm template GLM_FUNC_QUALIFIER T orientedAngle ( - tvec3 const & x, - tvec3 const & y, - tvec3 const & ref + vec<3, T, P> const & x, + vec<3, T, P> const & y, + vec<3, T, P> const & ref ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'orientedAngle' only accept floating-point inputs"); diff --git a/glm/gtx/vector_query.inl b/glm/gtx/vector_query.inl index 75a9c3f3..8c5ff829 100644 --- a/glm/gtx/vector_query.inl +++ b/glm/gtx/vector_query.inl @@ -12,16 +12,16 @@ namespace detail template struct compute_areCollinear<2, T, P, vec> { - GLM_FUNC_QUALIFIER static bool call(tvec2 const & v0, tvec2 const & v1, T const & epsilon) + GLM_FUNC_QUALIFIER static bool call(vec<2, T, P> const & v0, vec<2, T, P> const & v1, T const & epsilon) { - return length(cross(tvec3(v0, static_cast(0)), tvec3(v1, static_cast(0)))) < epsilon; + return length(cross(vec<3, T, P>(v0, static_cast(0)), vec<3, T, P>(v1, static_cast(0)))) < epsilon; } }; template struct compute_areCollinear<3, T, P, vec> { - GLM_FUNC_QUALIFIER static bool call(tvec3 const & v0, tvec3 const & v1, T const & epsilon) + GLM_FUNC_QUALIFIER static bool call(vec<3, T, P> const & v0, vec<3, T, P> const & v1, T const & epsilon) { return length(cross(v0, v1)) < epsilon; } @@ -30,9 +30,9 @@ namespace detail template struct compute_areCollinear<4, T, P, vec> { - GLM_FUNC_QUALIFIER static bool call(tvec4 const & v0, tvec4 const & v1, T const & epsilon) + GLM_FUNC_QUALIFIER static bool call(vec<4, T, P> const & v0, vec<4, T, P> const & v1, T const & epsilon) { - return length(cross(tvec3(v0), tvec3(v1))) < epsilon; + return length(cross(vec<3, T, P>(v0), vec<3, T, P>(v1))) < epsilon; } }; @@ -42,9 +42,9 @@ namespace detail template struct compute_isCompNull<2, T, P, vec> { - GLM_FUNC_QUALIFIER static tvec2 call(tvec2 const & v, T const & epsilon) + GLM_FUNC_QUALIFIER static vec<2, bool, P> call(vec<2, T, P> const & v, T const & epsilon) { - return tvec2( + return vec<2, bool, P>( (abs(v.x) < epsilon), (abs(v.y) < epsilon)); } @@ -53,9 +53,9 @@ namespace detail template struct compute_isCompNull<3, T, P, vec> { - GLM_FUNC_QUALIFIER static tvec3 call(tvec3 const & v, T const & epsilon) + GLM_FUNC_QUALIFIER static vec<3, bool, P> call(vec<3, T, P> const & v, T const & epsilon) { - return tvec3( + return vec<3, bool, P>( (abs(v.x) < epsilon), (abs(v.y) < epsilon), (abs(v.z) < epsilon)); @@ -65,9 +65,9 @@ namespace detail template struct compute_isCompNull<4, T, P, vec> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v, T const & epsilon) + GLM_FUNC_QUALIFIER static vec<4, bool, P> call(vec<4, T, P> const & v, T const & epsilon) { - return tvec4( + return vec<4, bool, P>( (abs(v.x) < epsilon), (abs(v.y) < epsilon), (abs(v.z) < epsilon), @@ -142,37 +142,37 @@ namespace detail } template - GLM_FUNC_QUALIFIER tvec2 isCompNull + GLM_FUNC_QUALIFIER vec<2, bool, P> isCompNull ( - tvec2 const & v, + vec<2, T, P> const & v, T const & epsilon) { - return tvec2( + return vec<2, bool, P>( abs(v.x) < epsilon, abs(v.y) < epsilon); } template - GLM_FUNC_QUALIFIER tvec3 isCompNull + GLM_FUNC_QUALIFIER vec<3, bool, P> isCompNull ( - tvec3 const & v, + vec<3, T, P> const & v, T const & epsilon ) { - return tvec3( + return vec<3, bool, P>( abs(v.x) < epsilon, abs(v.y) < epsilon, abs(v.z) < epsilon); } template - GLM_FUNC_QUALIFIER tvec4 isCompNull + GLM_FUNC_QUALIFIER vec<4, bool, P> isCompNull ( - tvec4 const & v, + vec<4, T, P> const & v, T const & epsilon ) { - return tvec4( + return vec<4, bool, P>( abs(v.x) < epsilon, abs(v.y) < epsilon, abs(v.z) < epsilon, diff --git a/glm/gtx/wrap.inl b/glm/gtx/wrap.inl index 1f27224e..5d45d500 100644 --- a/glm/gtx/wrap.inl +++ b/glm/gtx/wrap.inl @@ -12,7 +12,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType clamp(genType const & Texcoord) { - return clamp(tvec1(Texcoord)).x; + return clamp(vec<1, genType, defaultp>(Texcoord)).x; } template class vecType> @@ -24,7 +24,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType repeat(genType const & Texcoord) { - return repeat(tvec1(Texcoord)).x; + return repeat(vec<1, genType, defaultp>(Texcoord)).x; } template class vecType> @@ -36,7 +36,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType mirrorClamp(genType const & Texcoord) { - return mirrorClamp(tvec1(Texcoord)).x; + return mirrorClamp(vec<1, genType, defaultp>(Texcoord)).x; } template class vecType> @@ -53,6 +53,6 @@ namespace glm template GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const& Texcoord) { - return mirrorRepeat(tvec1(Texcoord)).x; + return mirrorRepeat(vec<1, genType, defaultp>(Texcoord)).x; } }//namespace glm diff --git a/glm/simd/matrix.h b/glm/simd/matrix.h index 549d40cc..c5821a7e 100644 --- a/glm/simd/matrix.h +++ b/glm/simd/matrix.h @@ -410,7 +410,7 @@ GLM_FUNC_QUALIFIER glm_vec4 glm_mat4_determinant_lowp(glm_vec4 const m[4]) __m128 MulC = _mm_mul_ps(Swp2C, Swp3C); __m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC); - //tvec4 DetCof( + //vec<4, T, P> DetCof( // + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), // - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), // + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), @@ -473,7 +473,7 @@ GLM_FUNC_QUALIFIER glm_vec4 glm_mat4_determinant(glm_vec4 const m[4]) __m128 MulC = _mm_mul_ps(Swp2C, Swp3C); __m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC); - //tvec4 DetCof( + //vec<4, T, P> DetCof( // + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), // - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), // + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), @@ -962,7 +962,7 @@ GLM_FUNC_QUALIFIER void glm_mat4_rotate(__m128 const in[4], float Angle, float c __m128 Sin0 = _mm_set_ss(s); __m128 SinA = _mm_shuffle_ps(Sin0, Sin0, _MM_SHUFFLE(0, 0, 0, 0)); - // tvec3 temp = (valType(1) - c) * axis; + // vec<3, T, P> temp = (valType(1) - c) * axis; __m128 Temp0 = _mm_sub_ps(one, CosA); __m128 Temp1 = _mm_mul_ps(Temp0, AxisC); diff --git a/test/gtc/gtc_integer.cpp b/test/gtc/gtc_integer.cpp index cbaf5016..302ceec1 100644 --- a/test/gtc/gtc_integer.cpp +++ b/test/gtc/gtc_integer.cpp @@ -94,7 +94,7 @@ namespace log2_ for(std::size_t i = 0; i < Count; ++i) { - glm::tvec4 Tmp(glm::uninitialize); + glm::vec<4, unsigned long, glm::defaultp> Tmp(glm::uninitialize); _BitScanReverse(&Tmp.x, i); _BitScanReverse(&Tmp.y, i); _BitScanReverse(&Tmp.z, i); @@ -109,7 +109,7 @@ namespace log2_ { - std::vector > Result; + std::vector > Result; Result.resize(Count); std::clock_t Begin = clock(); diff --git a/test/gtx/gtx_io.cpp b/test/gtx/gtx_io.cpp index cc83a27a..5f91f247 100644 --- a/test/gtx/gtx_io.cpp +++ b/test/gtx/gtx_io.cpp @@ -35,9 +35,9 @@ namespace std::basic_ostringstream ostr; if (typeid(T) == typeid(glm::tquat)) { ostr << "quat"; } - else if (typeid(T) == typeid(glm::tvec2)) { ostr << "vec2"; } - else if (typeid(T) == typeid(glm::tvec3)) { ostr << "vec3"; } - else if (typeid(T) == typeid(glm::tvec4)) { ostr << "vec4"; } + else if (typeid(T) == typeid(glm::vec<2, U,P>)) { ostr << "vec2"; } + else if (typeid(T) == typeid(glm::vec<3, U,P>)) { ostr << "vec3"; } + else if (typeid(T) == typeid(glm::vec<4, U,P>)) { ostr << "vec4"; } else if (typeid(T) == typeid(glm::tmat2x2)) { ostr << "mat2x2"; } else if (typeid(T) == typeid(glm::tmat2x3)) { ostr << "mat2x3"; } else if (typeid(T) == typeid(glm::tmat2x4)) { ostr << "mat2x4"; } @@ -84,9 +84,9 @@ int test_io_vec(OS& os) { os << '\n' << typeid(OS).name() << '\n'; - glm::tvec2 const v2(0, 1); - glm::tvec3 const v3(2, 3, 4); - glm::tvec4 const v4(5, 6, 7, 8); + glm::vec<2, T,P> const v2(0, 1); + glm::vec<3, T,P> const v3(2, 3, 4); + glm::vec<4, T,P> const v4(5, 6, 7, 8); os << type_name(os, v2) << ": " << v2 << '\n' << type_name(os, v3) << ": " << v3 << '\n' @@ -107,18 +107,18 @@ int test_io_mat(OS& os, glm::io::order_type otype) { os << '\n' << typeid(OS).name() << '\n'; - glm::tvec2 const v2_1( 0, 1); - glm::tvec2 const v2_2( 2, 3); - glm::tvec2 const v2_3( 4, 5); - glm::tvec2 const v2_4( 6, 7); - glm::tvec3 const v3_1( 8, 9, 10); - glm::tvec3 const v3_2(11, 12, 13); - glm::tvec3 const v3_3(14, 15, 16); - glm::tvec3 const v3_4(17, 18, 19); - glm::tvec4 const v4_1(20, 21, 22, 23); - glm::tvec4 const v4_2(24, 25, 26, 27); - glm::tvec4 const v4_3(28, 29, 30, 31); - glm::tvec4 const v4_4(32, 33, 34, 35); + glm::vec<2, T,P> const v2_1( 0, 1); + glm::vec<2, T,P> const v2_2( 2, 3); + glm::vec<2, T,P> const v2_3( 4, 5); + glm::vec<2, T,P> const v2_4( 6, 7); + glm::vec<3, T,P> const v3_1( 8, 9, 10); + glm::vec<3, T,P> const v3_2(11, 12, 13); + glm::vec<3, T,P> const v3_3(14, 15, 16); + glm::vec<3, T,P> const v3_4(17, 18, 19); + glm::vec<4, T,P> const v4_1(20, 21, 22, 23); + glm::vec<4, T,P> const v4_2(24, 25, 26, 27); + glm::vec<4, T,P> const v4_3(28, 29, 30, 31); + glm::vec<4, T,P> const v4_4(32, 33, 34, 35); glm::io::basic_format_saver const iofs(os);