Lines Matching refs:Size

132 template <typename T, int Size>
133 inline T dot (const Vector<T, Size>& a, const Vector<T, Size>& b)
136 for (int i = 0; i < Size; i++)
141 template <typename T, int Size>
142 inline T lengthSquared (const Vector<T, Size>& a)
145 for (int i = 0; i < Size; i++)
150 template <typename T, int Size>
151 inline T length (const Vector<T, Size>& a)
156 template <typename T, int Size>
157 inline T distance (const Vector<T, Size>& a, const Vector<T, Size>& b)
162 template <typename T, int Size>
163 inline Vector<T, Size> cross (const Vector<T, Size>& a, const Vector<T, Size>& b)
165 DE_STATIC_ASSERT(Size == 3);
166 return Vector<T, Size>(
172 template <typename T, int Size>
173 inline Vector<T, Size> normalize (const Vector<T, Size>& a)
176 Vector<T, Size> res;
177 for (int i = 0; i < Size; i++)
182 template <typename T, int Size>
183 inline Vector<T, Size> faceForward (const Vector<T, Size>& n, const Vector<T, Size>& i, const Vector<T, Size>& ref)
188 template <typename T, int Size>
189 inline Vector<T, Size> reflect (const Vector<T, Size>& i, const Vector<T, Size>& n)
194 template <typename T, int Size>
195 inline Vector<T, Size> refract (const Vector<T, Size>& i, const Vector<T, Size>& n, T eta)
200 return Vector<T, Size>(T(0));
205 template <int Size>
206 Vector<float, Size> mix (const Vector<float, Size>& x, const Vector<float, Size>& y, float a)
208 Vector<float, Size> res;
209 for (int i = 0; i < Size; i++)
214 template <int Size>
215 Vector<double, Size> mix (const Vector<double, Size>& x, const Vector<double, Size>& y, double a)
217 Vector<double, Size> res;
218 for (int i = 0; i < Size; i++)
225 template <typename T, int Size>
226 inline Vector<bool, Size> equal (const Vector<T, Size>& a, const Vector<T, Size>& b)
228 Vector<bool, Size> res;
229 for (int i = 0; i < Size; i++)
234 template <typename T, int Size>
235 inline Vector<bool, Size> notEqual (const Vector<T, Size>& a, const Vector<T, Size>& b)
237 Vector<bool, Size> res;
238 for (int i = 0; i < Size; i++)
243 template <typename T, int Size>
244 inline Vector<bool, Size> lessThan (const Vector<T, Size>& a, const Vector<T, Size>& b)
246 Vector<bool, Size> res;
247 for (int i = 0; i < Size; i++)
252 template <typename T, int Size>
253 inline Vector<bool, Size> lessThanEqual (const Vector<T, Size>& a, const Vector<T, Size>& b)
255 Vector<bool, Size> res;
256 for (int i = 0; i < Size; i++)
261 template <typename T, int Size>
262 inline Vector<bool, Size> greaterThan (const Vector<T, Size>& a, const Vector<T, Size>& b)
264 Vector<bool, Size> res;
265 for (int i = 0; i < Size; i++)
270 template <typename T, int Size>
271 inline Vector<bool, Size> greaterThanEqual (const Vector<T, Size>& a, const Vector<T, Size>& b)
273 Vector<bool, Size> res;
274 for (int i = 0; i < Size; i++)
281 template <typename T, int Size>
282 inline bool allEqual (const Vector<T, Size>& a, const Vector<T, Size>& b)
285 for (int i = 0; i < Size; i++)
290 template <typename T, int Size>
291 inline bool anyNotEqual (const Vector<T, Size>& a, const Vector<T, Size>& b)
294 for (int i = 0; i < Size; i++)
301 template <int Size>
302 inline Vector<bool, Size> boolNot (const Vector<bool, Size>& a)
304 Vector<bool, Size> res;
305 for (int i = 0; i < Size; i++)
310 template <int Size>
311 inline bool boolAny (const Vector<bool, Size>& a)
313 for (int i = 0; i < Size; i++)
319 template <int Size>
320 inline bool boolAll (const Vector<bool, Size>& a)
322 for (int i = 0; i < Size; i++)
328 template <int Size>
329 Vector<int, Size> chopToInt (const Vector<float, Size>& v)
331 Vector<int, Size> res;
332 for (int i = 0; i < Size; i++)
339 template <typename T, int Size>
340 inline Vector<T, Size> select (T trueVal, T falseVal, const Vector<bool, Size>& cond)
342 Vector<T, Size> res;
343 for (int i = 0; i < Size; i++)
350 template <typename T, int Size>
351 inline Vector<T, Size> select (const Vector<T, Size>& trueVal, const Vector<T, Size>& falseVal, const Vector<bool, Size>& cond)
353 Vector<T, Size> res;
354 for (int i = 0; i < Size; i++)
361 template<typename T, int Size>
362 static inline Vector<T, Size> absDiff (const Vector<T, Size>& a, const Vector<T, Size>& b)
364 Vector<T, Size> res;
366 for (int ndx = 0; ndx < Size; ndx++)
375 template <typename T, int Size> \
376 Vector<T, Size> FUNC_NAME (const Vector<T, Size>& v) \
378 Vector<T, Size> res; \
379 for (int i = 0; i < Size; i++) \
385 template <typename T, int Size> \
386 Vector<T, Size> FUNC_NAME (const Vector<T, Size>& a, const Vector<T, Size>& b) \
388 Vector<T, Size> res; \
389 for (int i = 0; i < Size; i++) \
395 template <typename T, int Size> \
396 Vector<T, Size> FUNC_NAME (const Vector<T, Size>& a, const Vector<T, Size>& b, const Vector<T, Size>& c) \
398 Vector<T, Size> res; \
399 for (int i = 0; i < Size; i++) \