#include <TCMathCoord4D.h>
Public Types | |
typedef T | DataType |
Public Member Functions | |
Coord4D () | |
all four components are init with 0 | |
Coord4D (T vIn) | |
Init all components with one value. | |
Coord4D (T xIn, T yIn, T zIn, T wIn) | |
Constructor for setting all four components with different values. | |
Coord4D (const Coord4D< T > &coord) | |
Copy constructor. | |
const T & | operator[] (sint32 pos) const |
Get one of the 4 component values. | |
T & | operator[] (sint32 pos) |
Set one of the 4 component values. | |
Coord4D< T > & | operator= (const Coord4D< T > &a) |
Coord4D< T > & | operator+= (const Coord4D< T > &b) |
Coord4D< T > & | operator-= (const Coord4D< T > &b) |
Coord4D< T > & | operator*= (const T &vIn) |
Coord4D< T > & | operator/= (const T &vIn) |
operator T * () | |
operator const T * () const | |
double | Length2 () const |
double | Length () const |
void | Normalize () |
Normalize vector Check for 0 len is done. | |
Private Attributes | |
T | m_data [4] |
stores the four components of the coordinate |
Definition at line 65 of file TCMathCoord4D.h.
typedef T TC::Math::Coord4D< T >::DataType |
Definition at line 200 of file TCMathCoord4D.h.
TC::Math::Coord4D< T >::Coord4D | ( | ) | [inline] |
all four components are init with 0
Definition at line 69 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
TC::Math::Coord4D< T >::Coord4D | ( | T | vIn | ) | [inline, explicit] |
Init all components with one value.
Definition at line 80 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
TC::Math::Coord4D< T >::Coord4D | ( | T | xIn, | |
T | yIn, | |||
T | zIn, | |||
T | wIn | |||
) | [inline] |
Constructor for setting all four components with different values.
xIn | value to init first vector component | |
yIn | value to init second vector component | |
zIn | value to init third vector component |
Definition at line 96 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
TC::Math::Coord4D< T >::Coord4D | ( | const Coord4D< T > & | coord | ) | [inline] |
Copy constructor.
coord | value to copy |
Definition at line 109 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
const T& TC::Math::Coord4D< T >::operator[] | ( | sint32 | pos | ) | const [inline] |
Get one of the 4 component values.
Definition at line 119 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
T& TC::Math::Coord4D< T >::operator[] | ( | sint32 | pos | ) | [inline] |
Set one of the 4 component values.
Definition at line 121 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
Coord4D<T>& TC::Math::Coord4D< T >::operator= | ( | const Coord4D< T > & | a | ) | [inline] |
Coord4D<T>& TC::Math::Coord4D< T >::operator+= | ( | const Coord4D< T > & | b | ) | [inline] |
Coord4D<T>& TC::Math::Coord4D< T >::operator-= | ( | const Coord4D< T > & | b | ) | [inline] |
Coord4D<T>& TC::Math::Coord4D< T >::operator*= | ( | const T & | vIn | ) | [inline] |
Coord4D<T>& TC::Math::Coord4D< T >::operator/= | ( | const T & | vIn | ) | [inline] |
TC::Math::Coord4D< T >::operator T * | ( | ) | [inline] |
Definition at line 169 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
TC::Math::Coord4D< T >::operator const T * | ( | ) | const [inline] |
Definition at line 171 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
double TC::Math::Coord4D< T >::Length2 | ( | ) | const [inline] |
Definition at line 174 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::m_data.
Referenced by TC::Math::Coord4D< T >::Length(), and TC::Math::Coord4D< T >::Normalize().
double TC::Math::Coord4D< T >::Length | ( | ) | const [inline] |
Definition at line 182 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::Length2().
void TC::Math::Coord4D< T >::Normalize | ( | ) | [inline] |
Normalize vector Check for 0 len is done.
Definition at line 187 of file TCMathCoord4D.h.
References TC::Math::Coord4D< T >::Length2(), and TC::Math::Coord4D< T >::m_data.
T TC::Math::Coord4D< T >::m_data[4] [private] |
stores the four components of the coordinate
Definition at line 203 of file TCMathCoord4D.h.
Referenced by TC::Math::Coord4D< T >::Coord4D(), TC::Math::Coord4D< T >::Length2(), TC::Math::Coord4D< T >::Normalize(), TC::Math::Coord4D< T >::operator const T *(), TC::Math::Coord4D< T >::operator T *(), TC::Math::Coord4D< T >::operator*=(), TC::Math::Coord4D< T >::operator+=(), TC::Math::Coord4D< T >::operator-=(), TC::Math::Coord4D< T >::operator/=(), TC::Math::Coord4D< T >::operator=(), and TC::Math::Coord4D< T >::operator[]().