diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 1973e7a3..5c56045c 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -204,8 +204,10 @@ namespace detail GLM_FUNC_DECL tref2 & operator= (tref2 const & r); GLM_FUNC_DECL tref2 & operator= (tvec2 const & v); - T& x; - T& y; + GLM_FUNC_DECL tvec2 operator() (); + + T & x; + T & y; }; GLM_DETAIL_IS_VECTOR(tvec2); diff --git a/glm/core/type_vec2.inl b/glm/core/type_vec2.inl index 0b14ecf1..6345adab 100644 --- a/glm/core/type_vec2.inl +++ b/glm/core/type_vec2.inl @@ -1025,5 +1025,11 @@ namespace detail return *this; } + template + GLM_FUNC_QUALIFIER tvec2 tref2::operator() () + { + return tvec2(this->x, this->y); + } + }//namespace detail }//namespace glm diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index 2b5d9ab6..f5f6b4d8 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -217,6 +217,8 @@ namespace detail GLM_FUNC_DECL tref3 & operator= (tref3 const & r); GLM_FUNC_DECL tref3 & operator= (tvec3 const & v); + GLM_FUNC_DECL tvec3 operator() (); + T & x; T & y; T & z; diff --git a/glm/core/type_vec3.inl b/glm/core/type_vec3.inl index 84bf3a44..918fadb4 100644 --- a/glm/core/type_vec3.inl +++ b/glm/core/type_vec3.inl @@ -1148,5 +1148,11 @@ namespace detail return *this; } + template + GLM_FUNC_QUALIFIER tvec3 tref3::operator() () + { + return tvec3(this->x, this->y, this->z); + } + }//namespace detail }//namespace glm diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index 5c9283b7..f556bfef 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -249,6 +249,8 @@ namespace detail GLM_FUNC_DECL tref4 & operator= (tref4 const & r); GLM_FUNC_DECL tref4 & operator= (tvec4 const & v); + GLM_FUNC_DECL tvec4 operator() (); + T & x; T & y; T & z; diff --git a/glm/core/type_vec4.inl b/glm/core/type_vec4.inl index 363ada1f..af4c1b2d 100644 --- a/glm/core/type_vec4.inl +++ b/glm/core/type_vec4.inl @@ -1374,5 +1374,11 @@ namespace detail return *this; } + template + GLM_FUNC_QUALIFIER tvec4 tref4::operator() () + { + return tvec4(this->x, this->y, this->z, this->w); + } + }//namespace detail }//namespace glm