|
| operator Vector< T, sizeof... (Indices) |
| Builds the swizzled vector object. More...
|
|
| false () const |
|
| operator Vector< T, sizeof... (Indices) |
| Builds the swizzled vector object. More...
|
|
| true () const |
|
Swizzle & | operator= (const Vector< T, sizeof...(Indices), false > &rhs) |
| Sets the parent vector's elements from the right-side argument. More...
|
|
Swizzle & | operator= (const Vector< T, sizeof...(Indices), true > &rhs) |
| Sets the parent vector's elements from the right-side argument. More...
|
|
template<class T2 , int... Indices2, typename std::enable_if< sizeof...(Indices)==sizeof...(Indices2), int >::type = 0> |
Swizzle & | operator= (const Swizzle< T2, Indices2... > &rhs) |
| Sets the parent vector's elements from the right-side argument. More...
|
|
T & | operator[] (int idx) |
| Returns the nth element of the swizzled vector. Example: v.zxy[2] returns y. More...
|
|
T | operator[] (int idx) const |
| Returns the nth element of the swizzled vector. Example: v.zxy[2] returns y. More...
|
|
T & | operator() (int idx) |
| Returns the nth element of the swizzled vector. Example: v.zxy(2) returns y. More...
|
|
T | operator() (int idx) const |
| Returns the nth element of the swizzled vector. Example: v.zxy(2) returns y. More...
|
|
template<bool Packed = false> |
const auto | ToVector () const |
| Builds the swizzled vector object. More...
|
|
template<class T, int... Indices>
class mathter::Swizzle< T, Indices >
Enables element swizzling (reordering elements) for vectors.
To access swizzlers, use the xx, xy, xyz and similar elements of vectors. Swizzlers can be used with assignments, concatenation, casting and constructors. To perform arithmetic, cast swizzlers to corresponding vector type.
template<class T , int... Indices>
Sets the parent vector's elements from the right-side argument.
Example: b = {1,2,3}; a.yxz = b; -> a contains {2,1,3}. You don't have to worry about aliasing (a.xyz = a is totally fine).
template<class T , int... Indices>
Sets the parent vector's elements from the right-side argument.
Example: b = {1,2,3}; a.yxz = b; -> a contains {2,1,3}. You don't have to worry about aliasing (a.xyz = a is totally fine).
template<class T, int... Indices>
template<class T2 , int... Indices2, typename std::enable_if< sizeof...(Indices)==sizeof...(Indices2), int >::type = 0>
Sets the parent vector's elements from the right-side argument.
Example: b = {1,2,3}; a.yxz = b.xyz; -> a contains {2,1,3}. You don't have to worry about aliasing (a.xyz = a.zyx is totally fine).