Generic 4D vector. More...
#include <jrl/mathtools/vector4.hh>
Public Member Functions | |
Vector4D () | |
Default constructor: all fields are set to zero. | |
Vector4D (const T &x, const T &y, const T &z, const T &w=1.) | |
Vector4D< T > | operator= (const Vector4D< T > &v) |
Assignement operator. | |
Vector4D< T > | operator= (const Vector3D< T > &v) |
Assignement operator from vector3d. | |
Vector4D< T > | operator- () |
Unary operator -. | |
T & | operator[] (unsigned i) |
Array operator. | |
const T & | operator[] (unsigned i) const |
Array operator. | |
T & | operator() (unsigned i) |
Array operator. | |
T | operator() (unsigned i) const |
Array operator. | |
bool | operator== (const Vector4D< T > &v) const |
Binary operator ==. | |
Vector4D< T > | operator+ (const Vector4D< T > &v) const |
Binary operator +. | |
Vector4D< T > | operator- (const Vector4D< T > &v) const |
Binary operator -. | |
void | operator+= (const Vector4D< T > &v) |
Binary operator +=. | |
void | operator-= (const Vector4D< T > &v) |
Binary operator -=. | |
Vector4D< T > | operator* (const T &t) const |
Binary operator *. | |
Vector4D< T > | operator/ (const T &t) const |
Binary operator /. | |
void | operator*= (const T &t) |
Binary operator *=. | |
void | operator/= (const T &t) |
Binary operator /=. | |
void | normalize () |
Normalize. | |
T | norm () const |
Get the norm. | |
T | normsquared () const |
Get the norm squared. | |
std::ostream & | display (std::ostream &os) const |
Public Attributes | |
T | m_x |
T | m_y |
T | m_z |
T | m_w |
Generic 4D vector.
|
inline |
Default constructor: all fields are set to zero.
References m_w, m_x, m_y, and m_z.
Referenced by operator*(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator=(), operator=(), and operator==().
|
inlineexplicit |
|
inline |
References m_w, m_x, m_y, and m_z.
Referenced by jrlMathTools::operator<<().
|
inline |
|
inline |
|
inline |
|
inline |
Array operator.
|
inline |
Array operator.
|
inline |
Binary operator *.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
|
inline |
Binary operator +.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
Binary operator +=.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
Unary operator -.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
Binary operator -.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
Binary operator -=.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
Binary operator /.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
|
inline |
Assignement operator from vector3d.
Set last component to 1.
References m_w, jrlMathTools::Vector3D< T >::m_x, m_x, jrlMathTools::Vector3D< T >::m_y, m_y, jrlMathTools::Vector3D< T >::m_z, m_z, and Vector4D().
|
inline |
Assignement operator.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
Binary operator ==.
References m_w, m_x, m_y, m_z, and Vector4D().
|
inline |
|
inline |
T jrlMathTools::Vector4D< T >::m_w |
Referenced by jrlMathTools::Matrix4x4< T >::CeqthismulB(), display(), norm(), normalize(), normsquared(), jrlMathTools::Matrix4x4< T >::operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator=(), operator==(), operator[](), operator[](), and Vector4D().
T jrlMathTools::Vector4D< T >::m_x |
Referenced by jrlMathTools::Matrix4x4< T >::CeqthismulB(), display(), norm(), normalize(), normsquared(), jrlMathTools::Matrix4x4< T >::operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator=(), operator==(), operator[](), operator[](), and Vector4D().
T jrlMathTools::Vector4D< T >::m_y |
Referenced by jrlMathTools::Matrix4x4< T >::CeqthismulB(), display(), norm(), normalize(), normsquared(), jrlMathTools::Matrix4x4< T >::operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator=(), operator==(), operator[](), operator[](), and Vector4D().
T jrlMathTools::Vector4D< T >::m_z |
Referenced by jrlMathTools::Matrix4x4< T >::CeqthismulB(), display(), norm(), normalize(), normsquared(), jrlMathTools::Matrix4x4< T >::operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator=(), operator==(), operator[](), operator[](), and Vector4D().