# TVector4Template< T > Class Template Reference
[Math classes]

Inheritance diagram for TVector4Template< T >:

List of all members.

## Public Member Functions
| TVector4Template (void)
| TVector4Template (const T &xx, const T &yy, const T &zz, const T &ww)
template<class U >
| TVector4Template (const TVector4Template< U > &v)
void | SetValues (const T &xx, const T &yy, const T &zz, const T &ww)
uint32 | GetDimension (void) const
void | SetFromXYZ (const TVector3Template< T > &v, const T &w)
TVector3Template< T > & | CastToXYZ (void)
const TVector3Template< T > & | CastToXYZ (void) const
TVector2Template< T > & | CastToXY (void)
const TVector2Template< T > & | CastToXY (void) const
const T & | operator() (const uint32 elemNum) const
T & | operator() (const uint32 elemNum)
const T & | operator[] (const uint32 elemNum) const
T & | operator[] (const uint32 elemNum)
T & | X (void)
T & | Y (void)
T & | Z (void)
T & | W (void)
const T & | X (void) const
const T & | Y (void) const
const T & | Z (void) const
const T & | W (void) const
T | GetMagnitude (void) const
T | GetMagnitudeSquared (void) const
T | GetDistance (const TVector4Template< T > &rhs) const
boolean | SetMagnitude (const T &newMagnitude)
void | SetToCenter (const TVector4Template< T > &v0, const TVector4Template< T > &v1)
boolean | Normalize (const T &zeroTolerance=0.0f)
boolean | NormalizeOrReplaceWith (const TVector4Template< T > &replacement, const T &zeroTolerance=0.0f)
boolean | IsEqual (const TVector4Template< T > &compareVec, const T &zeroTolerance=0.0f) const
void | ClampValue (const TVector4Template< T > &min, const TVector4Template< T > &max)
void | Negate (void)
void | Interpolate (const TVector4Template< T > &vstart, const TVector4Template< T > &vend, const T &t)
void | Swap (TVector4Template< T > &v)
TVector4Template< T > & | operator/= (const T &scalar)
TVector4Template< T > & | operator*= (const T &scalar)
TVector4Template< T > & | operator+= (const TVector4Template< T > &v)
TVector4Template< T > & | operator-= (const TVector4Template< T > &v)
TVector4Template< T > | operator/ (const T &s) const
TVector4Template< T > | operator* (const T &s) const
TVector4Template< T > | operator+ (const TVector4Template< T > &b) const
TVector4Template< T > | operator- (const TVector4Template< T > &b) const
TVector4Template< T > | operator- () const
boolean | operator== (const TVector4 &rhs) const
boolean | operator!= (const TVector4 &rhs) const
T | operator* (const TVector4 &b) const
TVector4Template< T > | operator% (const TVector4Template< T > &b) const
T | Normalize (TVector4Template< T > &result) const
## Public Attributes
T | x
T | y
T | z
T | w
## Static Public Attributes
static const TVector4Template< T > | kZero
| ( 0.0, 0.0, 0.0, 0.0 );
static const TVector4Template< T > | kOnes
| ( 1.0, 1.0, 1.0, 1.0 );
static const TVector4Template< T > | kUnitX
| ( 1.0, 0.0, 0.0, 0.0 );
static const TVector4Template< T > | kUnitY
| ( 0.0, 1.0, 0.0, 0.0 );
static const TVector4Template< T > | kUnitZ
| ( 0.0, 0.0, 1.0, 0.0 );
static const TVector4Template< T > | kUnitW
| ( 0.0, 0.0, 0.0, 1.0 );
static const TVector4Template< T > | kNegativeX
| ( -1.0, 0.0, 0.0, 0.0 );
static const TVector4Template< T > | kNegativeY
| ( 0.0, -1.0, 0.0, 0.0 );
static const TVector4Template< T > | kNegativeZ
| ( 0.0, 0.0, -1.0, 0.0 );
static const TVector4Template< T > | kNegativeW
| ( 0.0, 0.0, 0.0, -1.0 );

## Detailed Description

### template<class T>
class TVector4Template< T >

Defines a 4 dimensional floating point vector.

## Constructor & Destructor Documentation

template<class T >

TVector4Template< T >::TVector4Template | ( | void |  | ) | `[inline]`

template<class T >

TVector4Template< T >::TVector4Template | ( | const T & | xx,
|  | const T & | yy,
|  | const T & | zz,
|  | const T & | ww |
| ) |  |  | `[inline]`

template<class T >
template<class U >

TVector4Template< T >::TVector4Template | ( | const TVector4Template< U > & | v | ) | `[inline]`

## Member Function Documentation

template<class T >

const TVector2Template< T > & TVector4Template< T >::CastToXY | ( | void |  | ) | const`[inline]`

template<class T >

TVector2Template< T > & TVector4Template< T >::CastToXY | ( | void |  | ) | `[inline]`

template<class T >

const TVector3Template< T > & TVector4Template< T >::CastToXYZ | ( | void |  | ) | const`[inline]`

template<class T >

TVector3Template< T > & TVector4Template< T >::CastToXYZ | ( | void |  | ) | `[inline]`

template<class T >

void TVector4Template< T >::ClampValue | ( | const TVector4Template< T > & | min,
|  | const TVector4Template< T > & | max |
| ) |  |  |

template<class T >

uint32 TVector4Template< T >::GetDimension | ( | void |  | ) | const`[inline]`

template<class T >

T TVector4Template< T >::GetDistance | ( | const TVector4Template< T > & | rhs | ) | const`[inline]`

template<class T >

T TVector4Template< T >::GetMagnitude | ( | void |  | ) | const`[inline]`

template<class T >

T TVector4Template< T >::GetMagnitudeSquared | ( | void |  | ) | const`[inline]`

template<class T >

void TVector4Template< T >::Interpolate | ( | const TVector4Template< T > & | vstart,
|  | const TVector4Template< T > & | vend,
|  | const T & | t |
| ) |  |  |

template<class T >

boolean TVector4Template< T >::IsEqual | ( | const TVector4Template< T > & | compareVec,
|  | const T & | zeroTolerance = `0.0f` |
| ) |  |  | const

template<class T >

void TVector4Template< T >::Negate | ( | void |  | ) | `[inline]`

template<class T >

T TVector4Template< T >::Normalize | ( | TVector4Template< T > & | result | ) | const

This sets the passed in vector to the normalized version of this, and returns the magnitude for the vector.

template<class T >

boolean TVector4Template< T >::Normalize | ( | const T & | zeroTolerance = `0.0f` | ) | `[inline]`

template<class T >

boolean TVector4Template< T >::NormalizeOrReplaceWith | ( | const TVector4Template< T > & | replacement,
|  | const T & | zeroTolerance = `0.0f` |
| ) |  |  | `[inline]`

template<class T >

boolean TVector4Template< T >::operator!= | ( | const TVector4 & | rhs | ) | const`[inline]`

template<class T >

TVector4Template<T> TVector4Template< T >::operator% | ( | const TVector4Template< T > & | b | ) | const

template<class T >

T & TVector4Template< T >::operator() | ( | const uint32 | elemNum | ) | `[inline]`

template<class T >

const T & TVector4Template< T >::operator() | ( | const uint32 | elemNum | ) | const`[inline]`

template<class T >

T TVector4Template< T >::operator* | ( | const TVector4 & | b | ) | const`[inline]`

template<class T >

TVector4Template<T> TVector4Template< T >::operator* | ( | const T & | s | ) | const`[inline]`

template<class T >

TVector4Template< T > & TVector4Template< T >::operator*= | ( | const T & | scalar | ) | `[inline]`

template<class T >

TVector4Template<T> TVector4Template< T >::operator+ | ( | const TVector4Template< T > & | b | ) | const`[inline]`

template<class T >

TVector4Template< T > & TVector4Template< T >::operator+= | ( | const TVector4Template< T > & | v | ) | `[inline]`

template<class T >

TVector4Template<T> TVector4Template< T >::operator- | ( |  | ) | const`[inline]`

template<class T >

TVector4Template<T> TVector4Template< T >::operator- | ( | const TVector4Template< T > & | b | ) | const`[inline]`

template<class T >

TVector4Template< T > & TVector4Template< T >::operator-= | ( | const TVector4Template< T > & | v | ) | `[inline]`

template<class T >

TVector4Template<T> TVector4Template< T >::operator/ | ( | const T & | s | ) | const`[inline]`

template<class T >

TVector4Template< T > & TVector4Template< T >::operator/= | ( | const T & | scalar | ) | `[inline]`

template<class T >

boolean TVector4Template< T >::operator== | ( | const TVector4 & | rhs | ) | const`[inline]`

template<class T >

T & TVector4Template< T >::operator[] | ( | const uint32 | elemNum | ) | `[inline]`

template<class T >

const T & TVector4Template< T >::operator[] | ( | const uint32 | elemNum | ) | const`[inline]`

template<class T >

void TVector4Template< T >::SetFromXYZ | ( | const TVector3Template< T > & | v,
|  | const T & | w |
| ) |  |  |

template<class T >

boolean TVector4Template< T >::SetMagnitude | ( | const T & | newMagnitude | ) |

template<class T >

void TVector4Template< T >::SetToCenter | ( | const TVector4Template< T > & | v0,
|  | const TVector4Template< T > & | v1 |
| ) |  |  |

template<class T >

void TVector4Template< T >::SetValues | ( | const T & | xx,
|  | const T & | yy,
|  | const T & | zz,
|  | const T & | ww |
| ) |  |  | `[inline]`

template<class T >

void TVector4Template< T >::Swap | ( | TVector4Template< T > & | v | ) |

template<class T >

const T & TVector4Template< T >::W | ( | void |  | ) | const`[inline]`

template<class T >

T & TVector4Template< T >::W | ( | void |  | ) | `[inline]`

template<class T >

const T & TVector4Template< T >::X | ( | void |  | ) | const`[inline]`

template<class T >

T & TVector4Template< T >::X | ( | void |  | ) | `[inline]`

template<class T >

const T & TVector4Template< T >::Y | ( | void |  | ) | const`[inline]`

template<class T >

T & TVector4Template< T >::Y | ( | void |  | ) | `[inline]`

template<class T >

const T & TVector4Template< T >::Z | ( | void |  | ) | const`[inline]`

template<class T >

T & TVector4Template< T >::Z | ( | void |  | ) | `[inline]`

## Member Data Documentation

template<class T >

const TVector4Template<T> TVector4Template< T >::kNegativeW`[static]`

( 0.0, 0.0, 0.0, -1.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kNegativeX`[static]`

( -1.0, 0.0, 0.0, 0.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kNegativeY`[static]`

( 0.0, -1.0, 0.0, 0.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kNegativeZ`[static]`

( 0.0, 0.0, -1.0, 0.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kOnes`[static]`

( 1.0, 1.0, 1.0, 1.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kUnitW`[static]`

( 0.0, 0.0, 0.0, 1.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kUnitX`[static]`

( 1.0, 0.0, 0.0, 0.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kUnitY`[static]`

( 0.0, 1.0, 0.0, 0.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kUnitZ`[static]`

( 0.0, 0.0, 1.0, 0.0 );

template<class T >

const TVector4Template<T> TVector4Template< T >::kZero`[static]`

( 0.0, 0.0, 0.0, 0.0 );

template<class T >

T TVector4Template< T >::w

template<class T >

T TVector4Template< T >::x

template<class T >

T TVector4Template< T >::y

template<class T >

T TVector4Template< T >::z

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

- Vector4.h