Template to handle 3 dimensional vector. More...
Public Member Functions | |
Vector3D () | |
Vector3D (const T x, const T y, const T z) | |
Vector3D< T > | operator= (const struct Vector3D< T > &v) |
Vector3D< T > | operator- () const |
T & | operator[] (unsigned i) |
T | operator[] (unsigned i) const |
T & | operator() (unsigned i) |
bool | operator== (const struct Vector3D< T > &v) const |
Vector3D< T > | operator+ (const struct Vector3D< T > &v) const |
Vector3D< T > | operator- (const struct Vector3D< T > &v) const |
void | operator+= (const struct Vector3D< T > &v) |
void | operator-= (const struct Vector3D< T > &v) |
Vector3D< T > | operator* (const T &t) const |
T | operator* (const Vector3D< T > &v) const |
Vector3D< T > | operator/ (const T &t) const |
void | operator*= (const T &t) |
void | operator/= (const T &t) |
void | normalize () |
T | norm () const |
bool | IsZero () const |
T | normsquared () const |
struct Vector3D< T > | operator^ (const struct Vector3D< T > &v2) const |
Public Attributes | |
T | m_x |
T | m_y |
T | m_z |
Friends | |
std::ostream & | operator<< (std::ostream &os, Vector3D< T > const &v) |
Template to handle 3 dimensional vector.
jrlMathTools::Vector3D< T >::Vector3D | ( | ) | [inline] |
Basic constructor: all the field are set to zero.
jrlMathTools::Vector3D< T >::Vector3D | ( | const T | x, | |
const T | y, | |||
const T | z | |||
) | [inline] |
bool jrlMathTools::Vector3D< T >::IsZero | ( | ) | const [inline] |
T jrlMathTools::Vector3D< T >::norm | ( | ) | const [inline] |
Get the norm.
void jrlMathTools::Vector3D< T >::normalize | ( | ) | [inline] |
Normalize .
T jrlMathTools::Vector3D< T >::normsquared | ( | ) | const [inline] |
Get the norm squared
T& jrlMathTools::Vector3D< T >::operator() | ( | unsigned | i | ) | [inline] |
Array operator
T jrlMathTools::Vector3D< T >::operator* | ( | const Vector3D< T > & | v | ) | const [inline] |
Binary operator * : dot product
Vector3D<T> jrlMathTools::Vector3D< T >::operator* | ( | const T & | t | ) | const [inline] |
Binary operator *
void jrlMathTools::Vector3D< T >::operator*= | ( | const T & | t | ) | [inline] |
Binary operator *=
Vector3D<T> jrlMathTools::Vector3D< T >::operator+ | ( | const struct Vector3D< T > & | v | ) | const [inline] |
Binary operator +
void jrlMathTools::Vector3D< T >::operator+= | ( | const struct Vector3D< T > & | v | ) | [inline] |
Binary operator +=
Vector3D<T> jrlMathTools::Vector3D< T >::operator- | ( | const struct Vector3D< T > & | v | ) | const [inline] |
Binary operator -
Vector3D<T> jrlMathTools::Vector3D< T >::operator- | ( | ) | const [inline] |
Unary operator -
void jrlMathTools::Vector3D< T >::operator-= | ( | const struct Vector3D< T > & | v | ) | [inline] |
Binary operator -=
Vector3D<T> jrlMathTools::Vector3D< T >::operator/ | ( | const T & | t | ) | const [inline] |
Binary operator /
void jrlMathTools::Vector3D< T >::operator/= | ( | const T & | t | ) | [inline] |
Binary operator /=
Vector3D<T> jrlMathTools::Vector3D< T >::operator= | ( | const struct Vector3D< T > & | v | ) | [inline] |
Assignement operator
bool jrlMathTools::Vector3D< T >::operator== | ( | const struct Vector3D< T > & | v | ) | const [inline] |
Binary operator ==
T jrlMathTools::Vector3D< T >::operator[] | ( | unsigned | i | ) | const [inline] |
Array operator
T& jrlMathTools::Vector3D< T >::operator[] | ( | unsigned | i | ) | [inline] |
Array operator
struct Vector3D< T > jrlMathTools::Vector3D< T >::operator^ | ( | const struct Vector3D< T > & | v2 | ) | const [inline, read] |
Cross product
std::ostream& operator<< | ( | std::ostream & | os, | |
Vector3D< T > const & | v | |||
) | [friend] |
T jrlMathTools::Vector3D< T >::m_x |
T jrlMathTools::Vector3D< T >::m_y |
T jrlMathTools::Vector3D< T >::m_z |