Visualization Library 2.0.0-b3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Vector4.hpp
Go to the documentation of this file.
1 /**************************************************************************************/
2 /* */
3 /* Visualization Library */
4 /* http://visualizationlibrary.org */
5 /* */
6 /* Copyright (c) 2005-2017, Michele Bosi */
7 /* All rights reserved. */
8 /* */
9 /* Redistribution and use in source and binary forms, with or without modification, */
10 /* are permitted provided that the following conditions are met: */
11 /* */
12 /* - Redistributions of source code must retain the above copyright notice, this */
13 /* list of conditions and the following disclaimer. */
14 /* */
15 /* - Redistributions in binary form must reproduce the above copyright notice, this */
16 /* list of conditions and the following disclaimer in the documentation and/or */
17 /* other materials provided with the distribution. */
18 /* */
19 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */
20 /* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */
21 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
22 /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR */
23 /* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
24 /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
25 /* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
26 /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
27 /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
28 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
29 /* */
30 /**************************************************************************************/
31 
32 #ifndef Vector4_INCLUDE_ONCE
33 #define Vector4_INCLUDE_ONCE
34 
35 #include <vlCore/Vector3.hpp>
36 
37 namespace vl
38 {
43  template<typename T_Scalar>
44  class Vector4
45  {
46  public:
47  typedef T_Scalar scalar_type;
48  static const int scalar_count = 4;
49  Vector4(const Vector4& other) { *this = other; }
50  Vector4() { x() = y() = z() = w() = 0; }
51 
52  template<class T>
53  explicit Vector4(const T& other)
54  {
55  x() = (T_Scalar)other.x();
56  y() = (T_Scalar)other.y();
57  z() = (T_Scalar)other.z();
58  w() = (T_Scalar)other.w();
59  }
60 
61  explicit Vector4(T_Scalar val)
62  {
63  mScalar[0] = mScalar[1] = mScalar[2] = mScalar[3] = val;
64  }
65 
66  //explicit Vector4(const T_Scalar* pval)
67  //{
68  // mScalar[0] = pval[0];
69  // mScalar[1] = pval[1];
70  // mScalar[2] = pval[2];
71  // mScalar[3] = pval[3];
72  //}
73 
74  explicit Vector4(T_Scalar x, T_Scalar y, T_Scalar z, T_Scalar w)
75  {
76  mScalar[0] = x;
77  mScalar[1] = y;
78  mScalar[2] = z;
79  mScalar[3] = w;
80  }
81 
82  explicit Vector4(const Vector3<T_Scalar>& v, T_Scalar w)
83  {
84  mScalar[0] = v.x();
85  mScalar[1] = v.y();
86  mScalar[2] = v.z();
87  mScalar[3] = w;
88  }
89 
90  explicit Vector4(const Vector2<T_Scalar>& u, const Vector2<T_Scalar>& v)
91  {
92  mScalar[0] = u.x();
93  mScalar[1] = u.y();
94  mScalar[2] = v.x();
95  mScalar[3] = v.y();
96  }
97 
98  T_Scalar* ptr() { return mScalar; }
99  const T_Scalar* ptr() const { return mScalar; }
100 
101  const T_Scalar& x() const { return mScalar[0]; }
102  const T_Scalar& y() const { return mScalar[1]; }
103  const T_Scalar& z() const { return mScalar[2]; }
104  const T_Scalar& w() const { return mScalar[3]; }
105 
106  T_Scalar& x() { return mScalar[0]; }
107  T_Scalar& y() { return mScalar[1]; }
108  T_Scalar& z() { return mScalar[2]; }
109  T_Scalar& w() { return mScalar[3]; }
110 
111  const T_Scalar& r() const { return mScalar[0]; }
112  const T_Scalar& g() const { return mScalar[1]; }
113  const T_Scalar& b() const { return mScalar[2]; }
114  const T_Scalar& a() const { return mScalar[3]; }
115 
116  T_Scalar& r() { return mScalar[0]; }
117  T_Scalar& g() { return mScalar[1]; }
118  T_Scalar& b() { return mScalar[2]; }
119  T_Scalar& a() { return mScalar[3]; }
120 
121  const T_Scalar& s() const { return mScalar[0]; }
122  const T_Scalar& t() const { return mScalar[1]; }
123  const T_Scalar& p() const { return mScalar[2]; }
124  const T_Scalar& q() const { return mScalar[3]; }
125 
126  T_Scalar& s() { return mScalar[0]; }
127  T_Scalar& t() { return mScalar[1]; }
128  T_Scalar& p() { return mScalar[2]; }
129  T_Scalar& q() { return mScalar[3]; }
130 
131  Vector3<T_Scalar> xyz() const { return Vector3<T_Scalar>(x(),y(),z()); }
132  Vector3<T_Scalar> rgb() const { return Vector3<T_Scalar>(x(),y(),z()); }
133  Vector3<T_Scalar> stp() const { return Vector3<T_Scalar>(x(),y(),z()); }
134 
135  Vector2<T_Scalar> xy() const { return Vector2<T_Scalar>(x(),y()); }
136  Vector2<T_Scalar> rg() const { return Vector2<T_Scalar>(x(),y()); }
137  Vector2<T_Scalar> st() const { return Vector2<T_Scalar>(x(),y()); }
138 
139  Vector4 operator+(const Vector4& other) const
140  {
141  return Vector4(x()+other.x(), y()+other.y(), z()+other.z(), w()+other.w());
142  }
143  Vector4 operator-(const Vector4& other) const
144  {
145  return Vector4(x()-other.x(), y()-other.y(), z()-other.z(), w()-other.w());
146  }
147  Vector4 operator*(const Vector4& other) const
148  {
149  return Vector4(x()*other.x(), y()*other.y(), z()*other.z(), w()*other.w());
150  }
151  Vector4 operator/(const Vector4& other) const
152  {
153  return Vector4(x()/other.x(), y()/other.y(), z()/other.z(), w()/other.w());
154  }
155  Vector4 operator+(T_Scalar val) const
156  {
157  return Vector4(x()+val, y()+val, z()+val, w()+val);
158  }
159  Vector4 operator-(T_Scalar val) const
160  {
161  return Vector4(x()-val, y()-val, z()-val, w()-val);
162  }
163  Vector4 operator*(T_Scalar val) const
164  {
165  return Vector4(x()*val, y()*val, z()*val, w()*val);
166  }
167  Vector4 operator/(T_Scalar val) const
168  {
169  return Vector4(x()/val, y()/val, z()/val, w()/val);
170  }
172  {
173  return Vector4(-x(), -y(), -z(), -w());
174  }
175  Vector4& operator+=(const Vector4& other)
176  {
177  *this = *this + other;
178  return *this;
179  }
180  Vector4& operator-=(const Vector4& other)
181  {
182  *this = *this - other;
183  return *this;
184  }
185  Vector4& operator*=(const Vector4& other)
186  {
187  *this = *this * other;
188  return *this;
189  }
190  Vector4& operator/=(const Vector4& other)
191  {
192  *this = *this / other;
193  return *this;
194  }
195  Vector4& operator+=(T_Scalar val)
196  {
197  *this = *this + val;
198  return *this;
199  }
200  Vector4& operator-=(T_Scalar val)
201  {
202  *this = *this - val;
203  return *this;
204  }
205  Vector4& operator*=(T_Scalar val)
206  {
207  *this = *this * val;
208  return *this;
209  }
210  Vector4& operator/=(T_Scalar val)
211  {
212  *this = *this / val;
213  return *this;
214  }
215  Vector4& operator=(const Vector4& other)
216  {
217  x() = other.x();
218  y() = other.y();
219  z() = other.z();
220  w() = other.w();
221  return *this;
222  }
223  Vector4& operator=(T_Scalar val)
224  {
225  x() = y() = z() = w() = val;
226  return *this;
227  }
228  bool operator==(const Vector4& other) const
229  {
230  return x() == other.x() && y() == other.y() && z() == other.z() && w() == other.w();
231  }
232  bool operator!=(const Vector4& other) const
233  {
234  return !operator==(other);
235  }
236  bool operator<(const Vector4& other) const
237  {
238  if (x() != other.x())
239  return x() < other.x();
240  else
241  if (y() != other.y())
242  return y() < other.y();
243  else
244  if (z() != other.z())
245  return z() < other.z();
246  else
247  return w() < other.w();
248  }
249  T_Scalar& operator[](unsigned i) { return mScalar[i]; }
250  const T_Scalar& operator[](unsigned i) const { return mScalar[i]; }
251  T_Scalar length() const { return (T_Scalar)::sqrt(x()*x()+y()*y()+z()*z()+w()*w()); }
252  T_Scalar lengthSquared() const { return x()*x()+y()*y()+z()*z()+w()*w(); }
253  bool isNull() const { return !x() && !y() && !z() && !w(); }
254  const Vector4& normalize(T_Scalar *len=NULL)
255  {
256  T_Scalar l = length();
257  if (len)
258  *len = l;
259  if (l)
260  *this *= (T_Scalar)(1.0/l);
261  return *this;
262  }
263 
264  protected:
266  };
267 
268  template<typename T>
269  inline const Vector4<T> operator*(T val, const Vector4<T>& v)
270  {
271  return v * val;
272  }
273 
290 
291  #if VL_PIPELINE_PRECISION == 2
292  typedef dvec4 vec4;
294  #else
295  typedef fvec4 vec4;
297  #endif
298 
299  inline float dot(const fvec4& v1, const fvec4& v2) { return v1.x()*v2.x() + v1.y()*v2.y() + v1.z()*v2.z() + v1.w()*v2.w(); }
300  inline double dot(const dvec4& v1, const dvec4& v2) { return v1.x()*v2.x() + v1.y()*v2.y() + v1.z()*v2.z() + v1.w()*v2.w(); }
301  inline float dot(const ivec4& v1, const ivec4& v2) { return (float)(v1.x()*v2.x() + v1.y()*v2.y() + v1.z()*v2.z() + v1.w()*v2.w()); }
302  inline float dot(const uvec4& v1, const uvec4& v2) { return (float)(v1.x()*v2.x() + v1.y()*v2.y() + v1.z()*v2.z() + v1.w()*v2.w()); }
303 
304  inline fvec4 min(const fvec4& a, const fvec4& b)
305  {
306  return fvec4( a.x() < b.x() ? a.x() : b.x(),
307  a.y() < b.y() ? a.y() : b.y(),
308  a.z() < b.z() ? a.z() : b.z(),
309  a.w() < b.w() ? a.w() : b.w() );
310  }
311  inline fvec4 min(const fvec4& a, float b)
312  {
313  return fvec4( a.x() < b ? a.x() : b,
314  a.y() < b ? a.y() : b,
315  a.z() < b ? a.z() : b,
316  a.w() < b ? a.w() : b );
317  }
318  inline dvec4 min(const dvec4& a, const dvec4& b)
319  {
320  return dvec4( a.x() < b.x() ? a.x() : b.x(),
321  a.y() < b.y() ? a.y() : b.y(),
322  a.z() < b.z() ? a.z() : b.z(),
323  a.w() < b.w() ? a.w() : b.w() );
324  }
325  inline dvec4 min(const dvec4& a, double b)
326  {
327  return dvec4( a.x() < b ? a.x() : b,
328  a.y() < b ? a.y() : b,
329  a.z() < b ? a.z() : b,
330  a.w() < b ? a.w() : b );
331  }
332  inline ivec4 min(const ivec4& a, const ivec4& b)
333  {
334  return ivec4( a.x() < b.x() ? a.x() : b.x(),
335  a.y() < b.y() ? a.y() : b.y(),
336  a.z() < b.z() ? a.z() : b.z(),
337  a.w() < b.w() ? a.w() : b.w() );
338  }
339  inline ivec4 min(const ivec4& a, int b)
340  {
341  return ivec4( a.x() < b ? a.x() : b,
342  a.y() < b ? a.y() : b,
343  a.z() < b ? a.z() : b,
344  a.w() < b ? a.w() : b );
345  }
346  inline uvec4 min(const uvec4& a, const uvec4& b)
347  {
348  return uvec4( a.x() < b.x() ? a.x() : b.x(),
349  a.y() < b.y() ? a.y() : b.y(),
350  a.z() < b.z() ? a.z() : b.z(),
351  a.w() < b.w() ? a.w() : b.w() );
352  }
353  inline uvec4 min(const uvec4& a, unsigned int b)
354  {
355  return uvec4( a.x() < b ? a.x() : b,
356  a.y() < b ? a.y() : b,
357  a.z() < b ? a.z() : b,
358  a.w() < b ? a.w() : b );
359  }
360  inline fvec4 max(const fvec4& a, const fvec4& b)
361  {
362  return fvec4( a.x() > b.x() ? a.x() : b.x(),
363  a.y() > b.y() ? a.y() : b.y(),
364  a.z() > b.z() ? a.z() : b.z(),
365  a.w() > b.w() ? a.w() : b.w() );
366  }
367  inline fvec4 max(const fvec4& a, float b)
368  {
369  return fvec4( a.x() > b ? a.x() : b,
370  a.y() > b ? a.y() : b,
371  a.z() > b ? a.z() : b,
372  a.w() > b ? a.w() : b );
373  }
374  inline dvec4 max(const dvec4& a, const dvec4& b)
375  {
376  return dvec4( a.x() > b.x() ? a.x() : b.x(),
377  a.y() > b.y() ? a.y() : b.y(),
378  a.z() > b.z() ? a.z() : b.z(),
379  a.w() > b.w() ? a.w() : b.w() );
380  }
381  inline dvec4 max(const dvec4& a, double b)
382  {
383  return dvec4( a.x() > b ? a.x() : b,
384  a.y() > b ? a.y() : b,
385  a.z() > b ? a.z() : b,
386  a.w() > b ? a.w() : b );
387  }
388  inline ivec4 max(const ivec4& a, const ivec4& b)
389  {
390  return ivec4( a.x() > b.x() ? a.x() : b.x(),
391  a.y() > b.y() ? a.y() : b.y(),
392  a.z() > b.z() ? a.z() : b.z(),
393  a.w() > b.w() ? a.w() : b.w() );
394  }
395  inline ivec4 max(const ivec4& a, int b)
396  {
397  return ivec4( a.x() > b ? a.x() : b,
398  a.y() > b ? a.y() : b,
399  a.z() > b ? a.z() : b,
400  a.w() > b ? a.w() : b );
401  }
402  inline uvec4 max(const uvec4& a, const uvec4& b)
403  {
404  return uvec4( a.x() > b.x() ? a.x() : b.x(),
405  a.y() > b.y() ? a.y() : b.y(),
406  a.z() > b.z() ? a.z() : b.z(),
407  a.w() > b.w() ? a.w() : b.w() );
408  }
409  inline uvec4 max(const uvec4& a, unsigned int b)
410  {
411  return uvec4( a.x() > b ? a.x() : b,
412  a.y() > b ? a.y() : b,
413  a.z() > b ? a.z() : b,
414  a.w() > b ? a.w() : b );
415  }
416  inline fvec4 clamp(const fvec4& x, float minval, float maxval) { return min(max(x,minval),maxval); }
417  inline fvec4 clamp(const fvec4& x, const fvec4& minval, const fvec4& maxval) { return min(max(x,minval),maxval); }
418  inline dvec4 clamp(const dvec4& x, double minval, double maxval) { return min(max(x,minval),maxval); }
419  inline dvec4 clamp(const dvec4& x, const dvec4& minval, const dvec4& maxval) { return min(max(x,minval),maxval); }
420  inline ivec4 clamp(const ivec4& x, int minval, int maxval) { return min(max(x,minval),maxval); }
421  inline ivec4 clamp(const ivec4& x, const ivec4& minval, const ivec4& maxval) { return min(max(x,minval),maxval); }
422  inline uvec4 clamp(const uvec4& x, unsigned int minval, unsigned int maxval) { return min(max(x,minval),maxval); }
423  inline uvec4 clamp(const uvec4& x, const uvec4& minval, const uvec4& maxval) { return min(max(x,minval),maxval); }
424 }
425 
426 #endif
Vector4 & operator/=(T_Scalar val)
Definition: Vector4.hpp:210
const T_Scalar & z() const
Definition: Vector4.hpp:103
Vector4(T_Scalar x, T_Scalar y, T_Scalar z, T_Scalar w)
Definition: Vector4.hpp:74
float clamp(float x, float minval, float maxval)
Definition: Vector2.hpp:315
T_Scalar & g()
Definition: Vector4.hpp:117
Vector2< T_Scalar > xy() const
Definition: Vector4.hpp:135
T_Scalar & operator[](unsigned i)
Definition: Vector4.hpp:249
const T_Scalar & x() const
Definition: Vector4.hpp:101
T sqrt(T a)
Definition: glsl_math.hpp:592
T_Scalar & a()
Definition: Vector4.hpp:119
Vector4< float > fvec4
A 4 components vector with float precision.
Definition: Vector4.hpp:279
const T_Scalar & s() const
Definition: Vector4.hpp:121
Vector4< unsigned char > ubvec4
A 4 components vector with unsigned char precision.
Definition: Vector4.hpp:285
T_Scalar & x()
Definition: Vector4.hpp:106
const T_Scalar & z() const
Definition: Vector3.hpp:91
const T_Scalar & r() const
Definition: Vector4.hpp:111
Vector4(const Vector4 &other)
Definition: Vector4.hpp:49
T_Scalar length() const
Definition: Vector4.hpp:251
Vector4 operator-(T_Scalar val) const
Definition: Vector4.hpp:159
Vector4 operator-(const Vector4 &other) const
Definition: Vector4.hpp:143
Vector3< T_Scalar > stp() const
Definition: Vector4.hpp:133
Vector4 & operator/=(const Vector4 &other)
Definition: Vector4.hpp:190
Vector3< T_Scalar > xyz() const
Definition: Vector4.hpp:131
Vector4< unsigned int > uvec4
A 4 components vector with unsigned int precision.
Definition: Vector4.hpp:277
The Vector4 class is a template class that implements a generic 4 components vector, see also vl::fvec4, vl::dvec4, vl::uvec4, vl::ivec4, vl::svec4, vl::usvec4, vl::bvec4, vl::ubvec4.
Definition: Vector4.hpp:44
T_Scalar lengthSquared() const
Definition: Vector4.hpp:252
T_Scalar & y()
Definition: Vector4.hpp:107
Vector4 & operator+=(const Vector4 &other)
Definition: Vector4.hpp:175
T_Scalar & s()
Definition: Vector4.hpp:126
Visualization Library main namespace.
Vector4(const Vector3< T_Scalar > &v, T_Scalar w)
Definition: Vector4.hpp:82
float dot(float a, float b)
Definition: glsl_math.hpp:1111
Vector4 operator*(T_Scalar val) const
Definition: Vector4.hpp:163
Vector4(const Vector2< T_Scalar > &u, const Vector2< T_Scalar > &v)
Definition: Vector4.hpp:90
static const int scalar_count
Definition: Vector4.hpp:48
Vector4 & operator-=(T_Scalar val)
Definition: Vector4.hpp:200
Vector2< T_Scalar > st() const
Definition: Vector4.hpp:137
const T_Scalar & p() const
Definition: Vector4.hpp:123
const T_Scalar & g() const
Definition: Vector4.hpp:112
const T_Scalar * ptr() const
Definition: Vector4.hpp:99
Vector4 & operator-=(const Vector4 &other)
Definition: Vector4.hpp:180
The Vector3 class is a template class that implements a generic 3 components vector, see also vl::fvec3, vl::dvec3, vl::uvec3, vl::ivec3, vl::svec3, vl::usvec3, vl::bvec3, vl::ubvec3.
Definition: Vector3.hpp:44
Vector4 operator/(const Vector4 &other) const
Definition: Vector4.hpp:151
Vector4< int > ivec4
A 4 components vector with int precision.
Definition: Vector4.hpp:275
const T_Scalar & operator[](unsigned i) const
Definition: Vector4.hpp:250
float max(float a, float b)
Definition: Vector2.hpp:311
Vector4 & operator*=(T_Scalar val)
Definition: Vector4.hpp:205
float min(float a, float b)
Definition: Vector2.hpp:307
Vector4(T_Scalar val)
Definition: Vector4.hpp:61
bool operator==(const Vector4 &other) const
Definition: Vector4.hpp:228
Vector4< short > svec4
A 4 components vector with short precision.
Definition: Vector4.hpp:287
Vector2< T_Scalar > rg() const
Definition: Vector4.hpp:136
bool operator!=(const Vector4 &other) const
Definition: Vector4.hpp:232
const T_Scalar & y() const
Definition: Vector3.hpp:90
const T_Scalar & y() const
Definition: Vector4.hpp:102
Vector4< double > dvec4
A 4 components vector with double precision.
Definition: Vector4.hpp:281
Vector4 operator+(const Vector4 &other) const
Definition: Vector4.hpp:139
T_Scalar & q()
Definition: Vector4.hpp:129
T_Scalar & r()
Definition: Vector4.hpp:116
const T_Scalar & b() const
Definition: Vector4.hpp:113
#define NULL
Definition: OpenGLDefs.hpp:81
Vector4 operator-() const
Definition: Vector4.hpp:171
T_Scalar & z()
Definition: Vector4.hpp:108
Vector4 & operator*=(const Vector4 &other)
Definition: Vector4.hpp:185
Vector4 & operator=(const Vector4 &other)
Definition: Vector4.hpp:215
bool isNull() const
Definition: Vector4.hpp:253
The Vector2 class is a template class that implements a generic 2 components vector, see also vl::fvec2, vl::dvec2, vl::uvec2, vl::ivec2, vl::svec2, vl::usvec2, vl::bvec2, vl::ubvec2.
Definition: Vector2.hpp:97
T_Scalar scalar_type
Definition: Vector4.hpp:47
bool operator<(const Vector4 &other) const
Definition: Vector4.hpp:236
Vector4< char > bvec4
A 4 components vector with char precision.
Definition: Vector4.hpp:283
T_Scalar * ptr()
Definition: Vector4.hpp:98
Vector4 operator+(T_Scalar val) const
Definition: Vector4.hpp:155
const Vector4 & normalize(T_Scalar *len=NULL)
Definition: Vector4.hpp:254
Vector4 operator/(T_Scalar val) const
Definition: Vector4.hpp:167
const T_Scalar & t() const
Definition: Vector4.hpp:122
Vector4< unsigned short > usvec4
A 4 components vector with unsigned short precision.
Definition: Vector4.hpp:289
T_Scalar & p()
Definition: Vector4.hpp:128
Vector4 & operator+=(T_Scalar val)
Definition: Vector4.hpp:195
const T_Scalar & x() const
Definition: Vector3.hpp:89
T_Scalar & t()
Definition: Vector4.hpp:127
Vector4 operator*(const Vector4 &other) const
Definition: Vector4.hpp:147
Vector4 & operator=(T_Scalar val)
Definition: Vector4.hpp:223
const T_Scalar & x() const
Definition: Vector2.hpp:132
Vector3< T_Scalar > rgb() const
Definition: Vector4.hpp:132
T_Scalar & w()
Definition: Vector4.hpp:109
fvec4 vec4
Defined as: &#39;typedef fvec4 vec4&#39;. See also VL_PIPELINE_PRECISION.
Definition: Vector4.hpp:296
const T_Scalar & y() const
Definition: Vector2.hpp:133
const T_Scalar & q() const
Definition: Vector4.hpp:124
T_Scalar & b()
Definition: Vector4.hpp:118
Vector4(const T &other)
Definition: Vector4.hpp:53
T_Scalar mScalar[scalar_count]
Definition: Vector4.hpp:265
const T_Scalar & w() const
Definition: Vector4.hpp:104
const T_Scalar & a() const
Definition: Vector4.hpp:114