Generic 3d vector. More...
#include <jrl/mathtools/vector3.hh>
Public Member Functions | |
Vector3D () | |
Default constructor: all fields are set to zero. | |
Vector3D (const T x, const T y, const T z) | |
Vector3D< T > & | operator= (const Vector3D< T > &v) |
Assignment operator. | |
Vector3D< T > | operator- () const |
Unary operator -. | |
T & | operator[] (unsigned i) |
Array operator. | |
T | operator[] (unsigned i) const |
Array operator. | |
T & | operator() (unsigned i) |
Array operator. | |
T | operator() (unsigned i) const |
Array operator. | |
bool | operator== (const Vector3D< T > &v) const |
Binary operator ==. | |
bool | operator!= (const Vector3D< T > &v) const |
Binary operator !=. | |
Vector3D< T > | operator+ (const Vector3D< T > &v) const |
Binary operator +. | |
Vector3D< T > | operator- (const Vector3D< T > &v) const |
Binary operator -. | |
void | operator+= (const Vector3D< T > &v) |
Binary operator +=. | |
void | operator-= (const Vector3D< T > &v) |
Binary operator -=. | |
Vector3D< T > | operator* (const T &t) const |
Binary operator *. | |
T | operator* (const Vector3D< T > &v) const |
Binary operator * : dot product. | |
Vector3D< 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. | |
bool | IsZero () const |
Check if the vector is set to zero. | |
T | normsquared () const |
Get the norm squared. | |
Vector3D< T > | operator^ (const Vector3D< T > &v2) const |
Cross product. | |
std::ostream & | display (std::ostream &os) const |
Public Attributes | |
T | m_x |
T | m_y |
T | m_z |
Generic 3d vector.
|
inline |
Default constructor: all fields are set to zero.
Referenced by operator!=(), operator*(), operator*(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator=(), operator==(), and operator^().
|
inline |
|
inline |
Referenced by jrlMathTools::operator<<().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Binary operator !=.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Array operator.
|
inline |
Array operator.
|
inline |
Binary operator *.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Binary operator * : dot product.
References m_x, m_y, m_z, and Vector3D().
|
inline |
|
inline |
Binary operator +.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Binary operator +=.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Unary operator -.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Binary operator -.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Binary operator -=.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Binary operator /.
References m_x, m_y, m_z, and Vector3D().
|
inline |
|
inline |
Assignment operator.
References m_x, m_y, m_z, and Vector3D().
|
inline |
Binary operator ==.
References m_x, m_y, m_z, and Vector3D().
|
inline |
|
inline |
|
inline |
Cross product.
References m_x, m_y, m_z, and Vector3D().
T jrlMathTools::Vector3D< T >::m_x |
Referenced by display(), IsZero(), norm(), normalize(), normsquared(), operator!=(), jrlMathTools::Matrix4x4< T >::operator*(), operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator=(), jrlMathTools::Vector4D< T >::operator=(), operator==(), operator[](), operator[](), operator^(), Vector3D(), and Vector3D().
T jrlMathTools::Vector3D< T >::m_y |
Referenced by display(), IsZero(), norm(), normalize(), normsquared(), operator!=(), jrlMathTools::Matrix4x4< T >::operator*(), operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator=(), jrlMathTools::Vector4D< T >::operator=(), operator==(), operator[](), operator[](), operator^(), Vector3D(), and Vector3D().
T jrlMathTools::Vector3D< T >::m_z |
Referenced by display(), IsZero(), norm(), normalize(), normsquared(), operator!=(), jrlMathTools::Matrix4x4< T >::operator*(), operator*(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator=(), jrlMathTools::Vector4D< T >::operator=(), operator==(), operator[](), operator[](), operator^(), Vector3D(), and Vector3D().