7 #ifndef __math_Vector3_h__ 8 #define __math_Vector3_h__ 13 typedef Vector<3,double> Vector3d;
14 typedef Vector<3,float> Vector3f;
15 typedef Vector<3,FE_UWORD> Vector3u;
16 typedef Vector<3,int> Vector3i;
17 typedef Vector<3,Real> Vector3;
20 inline Vector<3,T> &cross3(Vector<3,T> &r,
const Vector<3,T> &lhs,
21 const Vector<3,T> &rhs)
23 r[0] = (lhs[1] * rhs[2] - lhs[2] * rhs[1]);
24 r[1] = (lhs[2] * rhs[0] - lhs[0] * rhs[2]);
25 r[2] = (lhs[0] * rhs[1] - lhs[1] * rhs[0]);
30 inline Vector<3,T> cross3(
const Vector<3,T> &lhs,
const Vector<3,T> &rhs)
33 return cross3(v, lhs, rhs);
37 inline Vector<3,T> &cross(Vector<3,T> &r,
const Vector<3,T> &lhs,
38 const Vector<3,T> &rhs)
40 return cross3(r, lhs, rhs);
44 inline Vector<3,T> cross(
const Vector<3,T> &lhs,
const Vector<3,T> &rhs)
46 return cross3(lhs, rhs);
50 inline Vector<3,T>&
set(Vector<3,T> &lhs)
58 template<
class T,
typename U>
59 inline Vector<3,T>&
set(Vector<3,T> &lhs, U x)
67 template<
class T,
typename U,
typename V>
68 inline Vector<3,T>&
set(Vector<3,T> &lhs, U x, V y)
76 template<
class T,
typename U,
typename V,
typename W>
77 inline Vector<3,T>&
set(Vector<3,T> &lhs, U x, V y, W z)
87 typedef Vector<4,F64> Vector4d;
88 typedef Vector<4,F32> Vector4f;
89 typedef Vector<4,FE_UWORD> Vector4u;
90 typedef Vector<4,int> Vector4i;
91 typedef Vector<4,Real> Vector4;
94 inline Vector<4,T> &cross3(Vector<4,T> &r,
const Vector<4,T> &lhs,
95 const Vector<4,T> &rhs)
97 r[0] = (lhs[1] * rhs[2] - lhs[2] * rhs[1]);
98 r[1] = (lhs[2] * rhs[0] - lhs[0] * rhs[2]);
99 r[2] = (lhs[0] * rhs[1] - lhs[1] * rhs[0]);
105 inline Vector<4,T> cross3(
const Vector<4,T> &lhs,
const Vector<4,T> &rhs)
108 return cross3(v, lhs, rhs);
112 inline Vector<4,T>&
set(Vector<4,T> &lhs)
121 template<
class T,
typename U>
122 inline Vector<4,T>&
set(Vector<4,T> &lhs, U x)
131 template<
class T,
typename U,
typename V>
132 inline Vector<4,T>&
set(Vector<4,T> &lhs, U x, V y)
141 template<
class T,
typename U,
typename V,
typename W>
142 inline Vector<4,T>&
set(Vector<4,T> &lhs, U x, V y, W z)
151 template<
class T,
typename U,
typename V,
typename W,
typename X>
152 inline Vector<4,T>&
set(Vector<4,T> &lhs, U x, V y, W z, X w)
kernel
Definition: namespace.dox:3