Added () operator for swizzling
This commit is contained in:
parent
fe47d4e2e2
commit
8df8569563
@ -185,8 +185,10 @@ namespace detail
|
|||||||
GLM_FUNC_DECL tref2<T> & operator= (tref2<T> const & r);
|
GLM_FUNC_DECL tref2<T> & operator= (tref2<T> const & r);
|
||||||
GLM_FUNC_DECL tref2<T> & operator= (tvec2<T> const & v);
|
GLM_FUNC_DECL tref2<T> & operator= (tvec2<T> const & v);
|
||||||
|
|
||||||
T& x;
|
GLM_FUNC_DECL tvec2<T> operator() ();
|
||||||
T& y;
|
|
||||||
|
T & x;
|
||||||
|
T & y;
|
||||||
};
|
};
|
||||||
|
|
||||||
GLM_DETAIL_IS_VECTOR(tvec2);
|
GLM_DETAIL_IS_VECTOR(tvec2);
|
||||||
|
@ -1006,5 +1006,11 @@ namespace detail
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
GLM_FUNC_QUALIFIER tvec2<T> tref2<T>::operator() ()
|
||||||
|
{
|
||||||
|
return tvec2<T>(this->x, this->y);
|
||||||
|
}
|
||||||
|
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -198,6 +198,8 @@ namespace detail
|
|||||||
GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
|
GLM_FUNC_DECL tref3<T> & operator= (tref3<T> const & r);
|
||||||
GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
|
GLM_FUNC_DECL tref3<T> & operator= (tvec3<T> const & v);
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec3<T> operator() ();
|
||||||
|
|
||||||
T & x;
|
T & x;
|
||||||
T & y;
|
T & y;
|
||||||
T & z;
|
T & z;
|
||||||
|
@ -1129,5 +1129,11 @@ namespace detail
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
GLM_FUNC_QUALIFIER tvec3<T> tref3<T>::operator() ()
|
||||||
|
{
|
||||||
|
return tvec3<T>(this->x, this->y, this->z);
|
||||||
|
}
|
||||||
|
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -230,6 +230,8 @@ namespace detail
|
|||||||
GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r);
|
GLM_FUNC_DECL tref4<T> & operator= (tref4<T> const & r);
|
||||||
GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v);
|
GLM_FUNC_DECL tref4<T> & operator= (tvec4<T> const & v);
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec4<T> operator() ();
|
||||||
|
|
||||||
T & x;
|
T & x;
|
||||||
T & y;
|
T & y;
|
||||||
T & z;
|
T & z;
|
||||||
|
@ -1355,5 +1355,11 @@ namespace detail
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<T> tref4<T>::operator() ()
|
||||||
|
{
|
||||||
|
return tvec4<T>(this->x, this->y, this->z, this->w);
|
||||||
|
}
|
||||||
|
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user