Home | History | Annotate | Download | only in common

Lines Matching defs:Vector

23  * \brief Generic vector template.
40 explicit VecAccess (Vector<T, VecSize>& v, int x, int y);
41 explicit VecAccess (Vector<T, VecSize>& v, int x, int y, int z);
42 explicit VecAccess (Vector<T, VecSize>& v, int x, int y, int z, int w);
44 VecAccess& operator= (const Vector<T, Size>& v);
46 operator Vector<T, Size> (void) const;
49 Vector<T, VecSize>& m_vector;
54 VecAccess<T, VecSize, Size>::VecAccess (Vector<T, VecSize>& v, int x, int y)
63 VecAccess<T, VecSize, Size>::VecAccess (Vector<T, VecSize>& v, int x, int y, int z)
73 VecAccess<T, VecSize, Size>::VecAccess (Vector<T, VecSize>& v, int x, int y, int z, int w)
84 VecAccess<T, VecSize, Size>& VecAccess<T, VecSize, Size>::operator= (const Vector<T, Size>& v)
91 // Vector class.
93 class Vector
105 explicit Vector (void);
106 explicit Vector (T s_); // replicate
107 Vector (T x_, T y_);
108 Vector (T x_, T y_, T z_);
109 Vector (T x_, T y_, T z_, T w_);
110 Vector (const Vector<T, Size>& v);
111 Vector (const T (&v)[Size]);
112 ~Vector (void);
146 Vector<T, 2> swizzle (int a, int b) const { DE_ASSERT(a >= 0 && a < Size); DE_ASSERT(b >= 0 && b < Size); return Vector<T, 2>(m_data[a], m_data[b]); }
147 Vector<T, 3> swizzle (int a, int b, int c) const { DE_ASSERT(a >= 0 && a < Size); DE_ASSERT(b >= 0 && b < Size); DE_ASSERT(c >= 0 && c < Size); return Vector<T, 3>(m_data[a], m_data[b], m_data[c]); }
148 Vector<T, 4> swizzle (int a, int b, int c, int d) const { DE_ASSERT(a >= 0 && a < Size); DE_ASSERT(b >= 0 && b < Size); DE_ASSERT(c >= 0 && c < Size); DE_ASSERT(d >= 0 && d < Size); return Vector<T, 4>(m_data[a], m_data[b], m_data[c], m_data[d]); }
150 Vector<float, Size> asFloat (void) const { return cast<float>(); }
151 Vector<int, Size> asInt (void) const { return cast<int>(); }
152 Vector<deUint32, Size> asUint (void) const { return cast<deUint32>(); }
153 Vector<bool, Size> asBool (void) const { return cast<bool>(); }
156 Vector<T, Size>& operator= (const Vector<T, Size>& v) { for (int i = 0; i < Size; i++) m_data[i] = v.m_data[i]; return *this; }
157 Vector<T, Size>& operator+= (const Vector<T, Size>& v);
162 bool operator== (const Vector<T, Size>& v) const { for (int i = 0; i < Size; i++) if (m_data[i] != v.m_data[i]) return false; return true; }
163 bool operator!= (const Vector<T, Size>& v) const { return !(*this == v); }
167 Vector<NewT, Size> cast (void) const;
170 Vector<T, NewSize> toWidth (void) const;
174 inline Vector<T, Size>::Vector (void)
181 inline Vector<T, Size>::Vector (T s)
188 inline Vector<T, Size>::Vector (T x_, T y_)
196 inline Vector<T, Size>::Vector (T x_, T y_, T z_)
205 inline Vector<T, Size>::Vector (T x_, T y_, T z_, T w_)
215 inline Vector<T, Size>::Vector (const Vector<T, Size>& v)
222 inline Vector<T, Size>::Vector (const T (&v)[Size])
228 // VecAccess to Vector cast.
230 VecAccess<T, VecSize, Size>::operator Vector<T, Size> (void) const
232 Vector<T, Size> vec;
241 inline Vector<NewT, Size> Vector<T, Size>::cast (void) const
243 Vector<NewT, Size> res;
252 inline Vector<T, NewSize> Vector<T, Size>::toWidth (void) const
254 Vector<T, NewSize> res;
266 inline Vector<T, Size>::~Vector (void)
273 inline Vector<T, Size> operator- (const Vector<T, Size>& a)
275 Vector<T, Size> res;
282 inline Vector<T, Size> operator+ (const Vector<T, Size>& a, const Vector<T, Size>& b)
284 Vector<T, Size> res;
291 inline Vector<T, Size> operator- (const Vector<T, Size>& a, const Vector<T, Size>& b)
293 Vector<T, Size> res;
300 inline Vector<T, Size> operator* (const Vector<T, Size>& a, const Vector<T, Size>& b)
302 Vector<T, Size> res;
309 inline Vector<T, Size> operator/ (const Vector<T, Size>& a, const Vector<T, Size>& b)
311 Vector<T, Size> res;
318 inline Vector<T, Size> operator<< (const Vector<T, Size>& a, const Vector<T, Size>& b)
320 Vector<T, Size> res;
327 inline Vector<T, Size> operator>> (const Vector<T, Size>& a, const Vector<T, Size>& b)
329 Vector<T, Size> res;
336 inline Vector<T, Size> operator* (T s, const Vector<T, Size>& a)
338 Vector<T, Size> res;
345 inline Vector<T, Size> operator+ (T s, const Vector<T, Size>& a)
347 Vector<T, Size> res;
354 inline Vector<T, Size> operator- (T s, const Vector<T, Size>& a)
356 Vector<T, Size> res;
363 inline Vector<T, Size> operator- (const Vector<T, Size>& a, T s)
365 Vector<T, Size> res;
372 inline Vector<T, Size> operator/ (T s, const Vector<T, Size>& a)
374 Vector<T, Size> res;
381 inline Vector<T, Size> operator* (const Vector<T, Size>& a, T s) { return s * a; }
384 inline Vector<T, Size> operator+ (const Vector<T, Size>& a, T s) { return s + a; }
387 inline Vector<T, Size> operator/ (const Vector<T, Size>& a, T s)
389 Vector<T, Size> res;
396 inline Vector<T, Size>& Vector<T, Size>::operator+= (const Vector<T, Size>& v)
405 std::ostream& operator<< (std::ostream& stream, const tcu::Vector<T, Size>& vec)