36template <
class DT>
class Tvec2;
37template <
class DT>
class Tvec3;
38template <
class DT>
class Tvec4;
39template <
class DT>
class Tmat5;
74 inline Tvec5(
const DT x,
const DT y,
const DT z,
const DT c,
const DT t)
76 Superclass::_buffer[0] = x;
77 Superclass::_buffer[1] = y;
78 Superclass::_buffer[2] = z;
79 Superclass::_buffer[3] = c;
80 Superclass::_buffer[4] = t;
86 Superclass::_buffer[0] = v[0];
87 Superclass::_buffer[1] = v[1];
88 Superclass::_buffer[2] = z;
89 Superclass::_buffer[3] = c;
90 Superclass::_buffer[4] = t;
96 Superclass::_buffer[0] = v[0];
97 Superclass::_buffer[1] = v[1];
98 Superclass::_buffer[2] = v[2];
99 Superclass::_buffer[3] = c;
100 Superclass::_buffer[4] = t;
106 Superclass::_buffer[0] = v[0];
107 Superclass::_buffer[1] = v[1];
108 Superclass::_buffer[2] = v[2];
109 Superclass::_buffer[3] = v[3];
110 Superclass::_buffer[4] = t;
119 inline void assign(
const DT x,
const DT y,
const DT z,
const DT c,
const DT t)
121 Superclass::_buffer[0] = x;
122 Superclass::_buffer[1] = y;
123 Superclass::_buffer[2] = z;
124 Superclass::_buffer[3] = c;
125 Superclass::_buffer[4] = t;
131 Superclass::_buffer[0] += v[0];
132 Superclass::_buffer[1] += v[1];
139 Superclass::_buffer[0] += v[0];
140 Superclass::_buffer[1] += v[1];
141 Superclass::_buffer[2] += v[2];
148 Superclass::_buffer[0] += v[0];
149 Superclass::_buffer[1] += v[1];
150 Superclass::_buffer[2] += v[2];
151 Superclass::_buffer[3] += v[3];
159 Superclass::_buffer[1],
160 Superclass::_buffer[2]);
167 Superclass::_buffer[1],
168 Superclass::_buffer[2],
169 Superclass::_buffer[3]);
175#define _ML_VEC5_RC(i) a[i][0]*v[0] + a[i][1]*v[1] + a[i][2]*v[2] + a[i][3]*v[3] + a[i][4]*v[4]
Template class for vector arithmetic with floating point data types.
A five by five matrix class of five row vectors.
Tmat5 transpose() const
Returns the transposed of this matrix.
Declaration of float vector type traits:
Forward declarations to resolve header file dependencies.
Forward declarations to resolve header file dependencies.
Forward declarations to resolve header file dependencies.
Tvec5< DT > & operator+=(const Tvec2< DT > &v)
Incrementation by a Tvec2.
FloatingPointVector< DT, 5 > Superclass
A typedef as a shorthand for the base class.
void assign(const DT x, const DT y, const DT z, const DT c, const DT t)
Sets all components to the passed values.
Tvec5(const Tvec3< DT > &v, const DT c, const DT t)
Casts Tvec3 to Tvec5. Last components are set to c and t.
Tvec5(const DT value=0)
Default and value constructor.
Tvec5< DT > & operator+=(const Tvec4< DT > &v)
Incrementation by a Tvec4.
Tvec5(const DT x, const DT y, const DT z, const DT c, const DT t)
Builds the vector from the scalars x, y, z, c and t to the components 0 to 4, respectively.
Tvec5(const Tvec2< DT > &v, const DT z, const DT c, const DT t)
Casts Tvec2 to Tvec5. Last components are set to z, c and t.
Tvec5< DT > & operator+=(const Tvec3< DT > &v)
Incrementation by a Tvec3.
Tvec5(const Tvec4< DT > &v, const DT t)
Casts Tvec4 to Tvec5. Last component is set to t and u.
const Tvec4< DT > getVec4() const
Returns a Tvec4 from components 0, 1, 2, and 3.
DT ComponentType
A typedef to "export" the type of components.
const Tvec3< DT > getVec3() const
Returns a Tvec3 from components 0,1, and 2.
Tvec5(const Superclass &v)
Copy constructor from FloatingPointVector.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define _ML_VEC5_RC(i)
Internal helper macro for tMat5 with Tvec5 multiplications. Do not use.
T operator*(const FloatingPointVector< T, size, DataContainer > &a, const FloatingPointVector< T, size, DataContainer > &b)
Dot product, returns a.dot(b).