CD_Matrix::Vector4T< T > Class Template Reference

Template to handle 3 dimensional vector. More...

#include <sch/Matrix/SmallVector4T.h>

Inheritance diagram for CD_Matrix::Vector4T< T >:

Public Member Functions

 Vector4T ()
 Basic constructor: all the field are set to zero. More...
 
 Vector4T (const T &x, const T &y, const T &z, const T &w)
 
Vector4T< T > operator= (const Vector4T< T > &v)
 Assignement operator. More...
 
Vector4T< T > operator- () const
 Unary operator -. More...
 
T & operator[] (unsigned i)
 Array operator. More...
 
const T & operator[] (unsigned i) const
 Array operator. More...
 
T & operator() (unsigned i)
 Array operator. More...
 
bool operator== (const Vector4T< T > &v) const
 Binary operator ==. More...
 
Vector4T< T > operator+ (const Vector4T< T > &v) const
 Binary operator +. More...
 
Vector4T< T > operator- (const Vector4T< T > &v) const
 Binary operator -. More...
 
void operator+= (const Vector4T< T > &v)
 Binary operator +=. More...
 
void operator-= (const Vector4T< T > &v)
 Binary operator -=. More...
 
Vector4T< T > operator* (const T &t) const
 Binary operator *. More...
 
Vector4T< T > operator/ (const T &t) const
 Binary operator /. More...
 
void operator*= (const T &t)
 Binary operator *=. More...
 
void operator/= (const T &t)
 Binary operator /=. More...
 
void normalize ()
 Normalize . More...
 
norm () const
 Get the norm. More...
 
normsquared () const
 Get the norm squared. More...
 

Public Attributes

m_x
 
m_y
 
m_z
 
m_w
 

Friends

std::ostream & operator<< (std::ostream &os, Vector4T< T > const &v)
 

Detailed Description

template<typename T>
class CD_Matrix::Vector4T< T >

Template to handle 3 dimensional vector.

Constructor & Destructor Documentation

◆ Vector4T() [1/2]

template<typename T >
CD_Matrix::Vector4T< T >::Vector4T ( )
inline

Basic constructor: all the field are set to zero.

◆ Vector4T() [2/2]

template<typename T >
CD_Matrix::Vector4T< T >::Vector4T ( const T &  x,
const T &  y,
const T &  z,
const T &  w 
)
inlineexplicit

Member Function Documentation

◆ norm()

template<typename T >
T CD_Matrix::Vector4T< T >::norm ( ) const
inline

Get the norm.

◆ normalize()

template<typename T >
void CD_Matrix::Vector4T< T >::normalize ( )
inline

Normalize .

◆ normsquared()

template<typename T >
T CD_Matrix::Vector4T< T >::normsquared ( ) const
inline

Get the norm squared.

◆ operator()()

template<typename T >
T& CD_Matrix::Vector4T< T >::operator() ( unsigned  i)
inline

Array operator.

◆ operator*()

template<typename T >
Vector4T<T> CD_Matrix::Vector4T< T >::operator* ( const T &  t) const
inline

Binary operator *.

◆ operator*=()

template<typename T >
void CD_Matrix::Vector4T< T >::operator*= ( const T &  t)
inline

Binary operator *=.

◆ operator+()

template<typename T >
Vector4T<T> CD_Matrix::Vector4T< T >::operator+ ( const Vector4T< T > &  v) const
inline

Binary operator +.

◆ operator+=()

template<typename T >
void CD_Matrix::Vector4T< T >::operator+= ( const Vector4T< T > &  v)
inline

Binary operator +=.

◆ operator-() [1/2]

template<typename T >
Vector4T<T> CD_Matrix::Vector4T< T >::operator- ( ) const
inline

Unary operator -.

◆ operator-() [2/2]

template<typename T >
Vector4T<T> CD_Matrix::Vector4T< T >::operator- ( const Vector4T< T > &  v) const
inline

Binary operator -.

◆ operator-=()

template<typename T >
void CD_Matrix::Vector4T< T >::operator-= ( const Vector4T< T > &  v)
inline

Binary operator -=.

◆ operator/()

template<typename T >
Vector4T<T> CD_Matrix::Vector4T< T >::operator/ ( const T &  t) const
inline

Binary operator /.

◆ operator/=()

template<typename T >
void CD_Matrix::Vector4T< T >::operator/= ( const T &  t)
inline

Binary operator /=.

◆ operator=()

template<typename T >
Vector4T<T> CD_Matrix::Vector4T< T >::operator= ( const Vector4T< T > &  v)
inline

Assignement operator.

◆ operator==()

template<typename T >
bool CD_Matrix::Vector4T< T >::operator== ( const Vector4T< T > &  v) const
inline

Binary operator ==.

◆ operator[]() [1/2]

template<typename T >
T& CD_Matrix::Vector4T< T >::operator[] ( unsigned  i)
inline

Array operator.

◆ operator[]() [2/2]

template<typename T >
const T& CD_Matrix::Vector4T< T >::operator[] ( unsigned  i) const
inline

Array operator.

Friends And Related Function Documentation

◆ operator<<

template<typename T >
std::ostream& operator<< ( std::ostream &  os,
Vector4T< T > const &  v 
)
friend

Member Data Documentation

◆ m_w

template<typename T >
T CD_Matrix::Vector4T< T >::m_w

◆ m_x

template<typename T >
T CD_Matrix::Vector4T< T >::m_x

◆ m_y

template<typename T >
T CD_Matrix::Vector4T< T >::m_y

◆ m_z

template<typename T >
T CD_Matrix::Vector4T< T >::m_z

The documentation for this class was generated from the following file: