jrlMathTools::Vector3D< T > Struct Template Reference

Generic 3d vector. More...

#include <jrl/mathtools/vector3.hh>

List of all members.

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.
operator[] (unsigned i) const
 Array operator.
T & operator() (unsigned i)
 Array operator.
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 *.
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 .
norm () const
 Get the norm.
bool IsZero () const
 Check if the vector is set to zero.
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

m_x
m_y
m_z

Detailed Description

template<typename T>
struct jrlMathTools::Vector3D< T >

Generic 3d vector.


Constructor & Destructor Documentation

template<typename T>
jrlMathTools::Vector3D< T >::Vector3D ( ) [inline]

Default constructor: all fields are set to zero.

template<typename T>
jrlMathTools::Vector3D< T >::Vector3D ( const T  x,
const T  y,
const T  z 
) [inline]

Member Function Documentation

template<typename T>
std::ostream& jrlMathTools::Vector3D< T >::display ( std::ostream &  os) const [inline]
template<typename T>
bool jrlMathTools::Vector3D< T >::IsZero ( ) const [inline]
template<typename T>
T jrlMathTools::Vector3D< T >::norm ( ) const [inline]
template<typename T>
T jrlMathTools::Vector3D< T >::normsquared ( ) const [inline]
template<typename T>
bool jrlMathTools::Vector3D< T >::operator!= ( const Vector3D< T > &  v) const [inline]
template<typename T>
T& jrlMathTools::Vector3D< T >::operator() ( unsigned  i) [inline]

Array operator.

template<typename T>
T jrlMathTools::Vector3D< T >::operator() ( unsigned  i) const [inline]

Array operator.

template<typename T>
Vector3D<T> jrlMathTools::Vector3D< T >::operator* ( const T &  t) const [inline]
template<typename T>
T jrlMathTools::Vector3D< T >::operator* ( const Vector3D< T > &  v) const [inline]
template<typename T>
void jrlMathTools::Vector3D< T >::operator*= ( const T &  t) [inline]
template<typename T>
Vector3D<T> jrlMathTools::Vector3D< T >::operator+ ( const Vector3D< T > &  v) const [inline]
template<typename T>
void jrlMathTools::Vector3D< T >::operator+= ( const Vector3D< T > &  v) [inline]
template<typename T>
Vector3D<T> jrlMathTools::Vector3D< T >::operator- ( ) const [inline]
template<typename T>
Vector3D<T> jrlMathTools::Vector3D< T >::operator- ( const Vector3D< T > &  v) const [inline]
template<typename T>
void jrlMathTools::Vector3D< T >::operator-= ( const Vector3D< T > &  v) [inline]
template<typename T>
Vector3D<T> jrlMathTools::Vector3D< T >::operator/ ( const T &  t) const [inline]
template<typename T>
void jrlMathTools::Vector3D< T >::operator/= ( const T &  t) [inline]
template<typename T>
Vector3D<T>& jrlMathTools::Vector3D< T >::operator= ( const Vector3D< T > &  v) [inline]
template<typename T>
bool jrlMathTools::Vector3D< T >::operator== ( const Vector3D< T > &  v) const [inline]
template<typename T>
T& jrlMathTools::Vector3D< T >::operator[] ( unsigned  i) [inline]
template<typename T>
T jrlMathTools::Vector3D< T >::operator[] ( unsigned  i) const [inline]
template<typename T>
Vector3D<T> jrlMathTools::Vector3D< T >::operator^ ( const Vector3D< T > &  v2) const [inline]

Member Data Documentation

 All Classes Namespaces Files Functions Variables Typedefs Defines