Go to the documentation of this file.
9 #ifndef _VECTOR4D_MAL_DEFAULT_
10 #define _VECTOR4D_MAL_DEFAULT_
55 return ((i == 0) ?
m_x : (i == 1) ?
m_y : (i == 2) ?
m_z :
m_w);
61 return ((i == 0) ?
m_x : (i == 1) ?
m_y : (i == 2) ?
m_z :
m_w);
67 return ((i == 0) ?
m_x : (i == 1) ?
m_y : (i == 2) ?
m_z :
m_w);
180 os << v.
m_x <<
" " << v.
m_y <<
" " << v.
m_z <<
" " << v.
m_w;
const T & operator[](unsigned i) const
Array operator.
Definition: SmallVector4T.h:59
T m_z
Definition: SmallVector4T.h:22
T & operator[](unsigned i)
Array operator.
Definition: SmallVector4T.h:53
T normsquared() const
Get the norm squared.
Definition: SmallVector4T.h:173
Vector4T< T > operator*(const T &t) const
Binary operator *.
Definition: SmallVector4T.h:117
T m_y
Definition: SmallVector4T.h:22
Template to handle 3 dimensional vector.
Definition: SmallVector4T.h:19
void normalize()
Normalize .
Definition: SmallVector4T.h:157
void operator-=(const Vector4T< T > &v)
Binary operator -=.
Definition: SmallVector4T.h:108
Vector4T< T > operator-(const Vector4T< T > &v) const
Binary operator -.
Definition: SmallVector4T.h:88
Vector4T< T > operator-() const
Unary operator -.
Definition: SmallVector4T.h:47
Vector4T< T > operator=(const Vector4T< T > &v)
Assignement operator.
Definition: SmallVector4T.h:37
bool operator==(const Vector4T< T > &v) const
Binary operator ==.
Definition: SmallVector4T.h:71
void operator/=(const T &t)
Binary operator /=.
Definition: SmallVector4T.h:148
T m_w
Definition: SmallVector4T.h:22
Vector4T()
Basic constructor: all the field are set to zero.
Definition: SmallVector4T.h:26
T m_x
Definition: SmallVector4T.h:22
Definition: QuaternionT.h:6
friend std::ostream & operator<<(std::ostream &os, Vector4T< T > const &v)
Definition: SmallVector4T.h:178
void operator+=(const Vector4T< T > &v)
Binary operator +=.
Definition: SmallVector4T.h:99
Vector4T< T > operator/(const T &t) const
Binary operator /.
Definition: SmallVector4T.h:128
T norm() const
Get the norm.
Definition: SmallVector4T.h:167
Vector4T< T > operator+(const Vector4T< T > &v) const
Binary operator +.
Definition: SmallVector4T.h:77
T & operator()(unsigned i)
Array operator.
Definition: SmallVector4T.h:65
void operator*=(const T &t)
Binary operator *=.
Definition: SmallVector4T.h:139