Keos::CVector4< T > Class Template Reference

Standard 4-dimensional vector with customizable type. More...

#include <KeosVector4.h>

List of all members.

Public Member Functions

 CVector4 (T X=0, T Y=0, T Z=0, T W=1)
 Default constructor.
void Set (T X, T Y, T Z, T W)
 Set vector.
Length () const
 Returns the length (magnitude) of the vector (sqrt(x² + y²)).
LengthSq () const
 Returns the square of the length(magnitude) of the vector (x² + y²).
void Normalize ()
 Normalizes the vector.
CVector4< T > operator+ () const
CVector4< T > operator- () const
CVector4< T > operator+ (const CVector4< T > &v) const
CVector4< T > operator- (const CVector4< T > &v) const
const CVector4< T > & operator+= (const CVector4< T > &v)
const CVector4< T > & operator-= (const CVector4< T > &v)
CVector4< T > operator * (T t) const
CVector4< T > operator/ (T t) const
const CVector4< T > & operator *= (T t)
const CVector4< T > & operator/= (T t)
bool operator== (const CVector4< T > &v) const
bool operator!= (const CVector4< T > &v) const
 operator T * ()
 T* cast operator.

Public Attributes

x
y
z
w


Detailed Description

template<class T>
class Keos::CVector4< T >

Standard 4-dimensional vector with customizable type.

Definition at line 34 of file KeosVector4.h.


Constructor & Destructor Documentation

template<class T>
Keos::CVector4< T >::CVector4 ( X = 0,
Y = 0,
Z = 0,
W = 1 
) [inline]

Default constructor.

Definition at line 105 of file KeosVector4.h.


Member Function Documentation

template<class T>
void Keos::CVector4< T >::Set ( X,
Y,
Z,
W 
) [inline]

Set vector.

Definition at line 114 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
T Keos::CVector4< T >::Length (  )  const [inline]

Returns the length (magnitude) of the vector (sqrt(x² + y²)).

Definition at line 124 of file KeosVector4.h.

References Keos::CVector4< T >::LengthSq().

Referenced by Keos::CVector4< T >::Normalize().

template<class T>
T Keos::CVector4< T >::LengthSq (  )  const [inline]

Returns the square of the length(magnitude) of the vector (x² + y²).

Definition at line 131 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

Referenced by Keos::CVector4< T >::Length().

template<class T>
void Keos::CVector4< T >::Normalize (  )  [inline]

Normalizes the vector.

Definition at line 138 of file KeosVector4.h.

References Keos::CVector4< T >::Length(), Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
CVector4< T > Keos::CVector4< T >::operator+ (  )  const [inline]

Definition at line 153 of file KeosVector4.h.

template<class T>
CVector4< T > Keos::CVector4< T >::operator- (  )  const [inline]

Definition at line 160 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
CVector4< T > Keos::CVector4< T >::operator+ ( const CVector4< T > &  v  )  const [inline]

Definition at line 167 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
CVector4< T > Keos::CVector4< T >::operator- ( const CVector4< T > &  v  )  const [inline]

Definition at line 174 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
const CVector4< T > & Keos::CVector4< T >::operator+= ( const CVector4< T > &  v  )  [inline]

Definition at line 181 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
const CVector4< T > & Keos::CVector4< T >::operator-= ( const CVector4< T > &  v  )  [inline]

Definition at line 193 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
CVector4< T > Keos::CVector4< T >::operator * ( t  )  const [inline]

Definition at line 205 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
CVector4< T > Keos::CVector4< T >::operator/ ( t  )  const [inline]

Definition at line 212 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
const CVector4< T > & Keos::CVector4< T >::operator *= ( t  )  [inline]

Definition at line 219 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
const CVector4< T > & Keos::CVector4< T >::operator/= ( t  )  [inline]

Definition at line 231 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
bool Keos::CVector4< T >::operator== ( const CVector4< T > &  v  )  const [inline]

Definition at line 243 of file KeosVector4.h.

References Keos::CVector4< T >::w, Keos::CVector4< T >::x, Keos::CVector4< T >::y, and Keos::CVector4< T >::z.

template<class T>
bool Keos::CVector4< T >::operator!= ( const CVector4< T > &  v  )  const [inline]

Definition at line 253 of file KeosVector4.h.

template<class T>
Keos::CVector4< T >::operator T * (  )  [inline]

T* cast operator.

Returns:
Pointer on the vector components.

Definition at line 260 of file KeosVector4.h.

References Keos::CVector4< T >::x.


Member Data Documentation

template<class T>
T Keos::CVector4< T >::x

Definition at line 83 of file KeosVector4.h.

Referenced by Keos::CVector4< T >::LengthSq(), Keos::CVector4< T >::Normalize(), Keos::CVector4< T >::operator *(), Keos::CVector4< T >::operator *=(), Keos::CVector4< T >::operator T *(), Keos::CVector4< T >::operator+(), Keos::CVector4< T >::operator+=(), Keos::CVector4< T >::operator-(), Keos::CVector4< T >::operator-=(), Keos::CVector4< T >::operator/(), Keos::CVector4< T >::operator/=(), Keos::CVector4< T >::operator==(), Keos::operator>>(), Keos::CVector4< T >::Set(), Keos::CShader::SetParameter(), Keos::VectorCross(), and Keos::VectorDot().

template<class T>
T Keos::CVector4< T >::y

Definition at line 83 of file KeosVector4.h.

Referenced by Keos::CVector4< T >::LengthSq(), Keos::CVector4< T >::Normalize(), Keos::CVector4< T >::operator *(), Keos::CVector4< T >::operator *=(), Keos::CVector4< T >::operator+(), Keos::CVector4< T >::operator+=(), Keos::CVector4< T >::operator-(), Keos::CVector4< T >::operator-=(), Keos::CVector4< T >::operator/(), Keos::CVector4< T >::operator/=(), Keos::CVector4< T >::operator==(), Keos::operator>>(), Keos::CVector4< T >::Set(), Keos::CShader::SetParameter(), Keos::VectorCross(), and Keos::VectorDot().

template<class T>
T Keos::CVector4< T >::z

Definition at line 83 of file KeosVector4.h.

Referenced by Keos::CVector4< T >::LengthSq(), Keos::CVector4< T >::Normalize(), Keos::CVector4< T >::operator *(), Keos::CVector4< T >::operator *=(), Keos::CVector4< T >::operator+(), Keos::CVector4< T >::operator+=(), Keos::CVector4< T >::operator-(), Keos::CVector4< T >::operator-=(), Keos::CVector4< T >::operator/(), Keos::CVector4< T >::operator/=(), Keos::CVector4< T >::operator==(), Keos::operator>>(), Keos::CVector4< T >::Set(), Keos::CShader::SetParameter(), Keos::VectorCross(), and Keos::VectorDot().

template<class T>
T Keos::CVector4< T >::w

Definition at line 83 of file KeosVector4.h.

Referenced by Keos::CVector4< T >::LengthSq(), Keos::CVector4< T >::Normalize(), Keos::CVector4< T >::operator *(), Keos::CVector4< T >::operator *=(), Keos::CVector4< T >::operator+(), Keos::CVector4< T >::operator+=(), Keos::CVector4< T >::operator-(), Keos::CVector4< T >::operator-=(), Keos::CVector4< T >::operator/(), Keos::CVector4< T >::operator/=(), Keos::CVector4< T >::operator==(), Keos::operator>>(), Keos::CVector4< T >::Set(), Keos::CShader::SetParameter(), Keos::VectorCross(), and Keos::VectorDot().


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 14:29:30 2007 for Keos by  doxygen 1.5.1-p1