35template <
class DT>
class Tvec2;
36template <
class DT>
class Tvec3;
37template <
class DT>
class Tvec4;
74 inline Tvec6(
const DT x,
const DT y,
const DT z,
const DT c,
const DT t,
const DT u)
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;
81 Superclass::_buffer[5] = u;
85 inline Tvec6(
const Tvec2<DT>& v,
const DT z,
const DT c,
const DT t,
const DT u)
87 Superclass::_buffer[0] = v[0];
88 Superclass::_buffer[1] = v[1];
89 Superclass::_buffer[2] = z;
90 Superclass::_buffer[3] = c;
91 Superclass::_buffer[4] = t;
92 Superclass::_buffer[5] = u;
98 Superclass::_buffer[0] = v[0];
99 Superclass::_buffer[1] = v[1];
100 Superclass::_buffer[2] = v[2];
101 Superclass::_buffer[3] = c;
102 Superclass::_buffer[4] = t;
103 Superclass::_buffer[5] = u;
109 Superclass::_buffer[0] = v[0];
110 Superclass::_buffer[1] = v[1];
111 Superclass::_buffer[2] = v[2];
112 Superclass::_buffer[3] = v[3];
113 Superclass::_buffer[4] = t;
114 Superclass::_buffer[5] = u;
123 inline void assign(
const DT x,
const DT y,
const DT z,
const DT c,
const DT t,
const DT u)
125 Superclass::_buffer[0] = x;
126 Superclass::_buffer[1] = y;
127 Superclass::_buffer[2] = z;
128 Superclass::_buffer[3] = c;
129 Superclass::_buffer[4] = t;
130 Superclass::_buffer[5] = u;
136 Superclass::_buffer[0] += v[0];
137 Superclass::_buffer[1] += v[1];
144 Superclass::_buffer[0] += v[0];
145 Superclass::_buffer[1] += v[1];
146 Superclass::_buffer[2] += v[2];
153 Superclass::_buffer[0] += v[0];
154 Superclass::_buffer[1] += v[1];
155 Superclass::_buffer[2] += v[2];
156 Superclass::_buffer[3] += v[3];
164 Superclass::_buffer[1],
165 Superclass::_buffer[2]);
172 Superclass::_buffer[1],
173 Superclass::_buffer[2],
174 Superclass::_buffer[3]);
Template class for vector arithmetic with floating point data types.
Declaration of float vector type traits:
Forward declarations to resolve header file dependencies.
Forward declarations to resolve header file dependencies.
A six dimensional vector class for floating point types.
Tvec6(const DT x, const DT y, const DT z, const DT c, const DT t, const DT u)
Builds the vector from the scalars x, y, z, c, t and u to the components 0 to 5, respectively.
Tvec6< DT > & operator+=(const Tvec2< DT > &v)
Incrementation by a Tvec2.
FloatingPointVector< DT, 6 > Superclass
A typedef as a shorthand for the base class.
Tvec6(const Superclass &v)
Copy constructor from FloatingPointVector.
Tvec6(const DT value=0)
Default and value constructor.
const Tvec3< DT > getVec3() const
Returns a Tvec3 from components 0,1, and 2.
Tvec6(const Tvec3< DT > &v, const DT c, const DT t, const DT u)
Casts Tvec3 to Tvec6. Last components are set to c, t and u whose defaults are 0.
const Tvec4< DT > getVec4() const
Returns a Tvec4 from components 0, 1, 2, and 3.
void assign(const DT x, const DT y, const DT z, const DT c, const DT t, const DT u)
Sets all components to the passed values.
Tvec6< DT > & operator+=(const Tvec3< DT > &v)
Incrementation by a Tvec3.
DT ComponentType
A typedef to "export" the type of components.
Tvec6(const Tvec2< DT > &v, const DT z, const DT c, const DT t, const DT u)
Casts Tvec2 to Tvec6. Last components are set to z, c, t and u whose defaults are 0.
Tvec6(const Tvec4< DT > &v, const DT t, const DT u)
Casts Tvec4 to Tvec6. Last components are set to t and u whose defaults are 0.
Tvec6< DT > & operator+=(const Tvec4< DT > &v)
Incrementation by a Tvec4.