TC::Math::Coord4D< T > Class Template Reference
[Mathematic]

Class for handling 3D values With implementation of all common coordinate or vector operators needed. More...

#include <TCMathCoord4D.h>

Collaboration diagram for TC::Math::Coord4D< T >:

Collaboration graph
[legend]

List of all members.

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

m_data [4]
 stores the four components of the coordinate


Detailed Description

template<class T>
class TC::Math::Coord4D< T >

Class for handling 3D values With implementation of all common coordinate or vector operators needed.

Definition at line 65 of file TCMathCoord4D.h.


Member Typedef Documentation

template<class T >
typedef T TC::Math::Coord4D< T >::DataType

Definition at line 200 of file TCMathCoord4D.h.


Constructor & Destructor Documentation

template<class T >
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.

template<class T >
TC::Math::Coord4D< T >::Coord4D ( vIn  )  [inline, explicit]

Init all components with one value.

Definition at line 80 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
TC::Math::Coord4D< T >::Coord4D ( xIn,
yIn,
zIn,
wIn 
) [inline]

Constructor for setting all four components with different values.

Parameters:
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.

template<class T >
TC::Math::Coord4D< T >::Coord4D ( const Coord4D< T > &  coord  )  [inline]

Copy constructor.

Parameters:
coord value to copy

Definition at line 109 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.


Member Function Documentation

template<class T >
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.

template<class T >
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.

template<class T >
Coord4D<T>& TC::Math::Coord4D< T >::operator= ( const Coord4D< T > &  a  )  [inline]

Definition at line 125 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
Coord4D<T>& TC::Math::Coord4D< T >::operator+= ( const Coord4D< T > &  b  )  [inline]

Definition at line 133 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
Coord4D<T>& TC::Math::Coord4D< T >::operator-= ( const Coord4D< T > &  b  )  [inline]

Definition at line 141 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
Coord4D<T>& TC::Math::Coord4D< T >::operator*= ( const T &  vIn  )  [inline]

Definition at line 149 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
Coord4D<T>& TC::Math::Coord4D< T >::operator/= ( const T &  vIn  )  [inline]

Definition at line 157 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
TC::Math::Coord4D< T >::operator T * (  )  [inline]

Returns:
The template argument pointer type of this coordinate

Definition at line 169 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
TC::Math::Coord4D< T >::operator const T * (  )  const [inline]

Returns:
The const template argument pointer type of this coordinate

Definition at line 171 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::m_data.

template<class T >
double TC::Math::Coord4D< T >::Length2 (  )  const [inline]

Returns:
The square length of the vector

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().

Here is the caller graph for this function:

template<class T >
double TC::Math::Coord4D< T >::Length (  )  const [inline]

Returns:
The length of the vector

Definition at line 182 of file TCMathCoord4D.h.

References TC::Math::Coord4D< T >::Length2().

Here is the call graph for this function:

template<class T >
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.

Here is the call graph for this function:


Member Data Documentation

template<class T >
T TC::Math::Coord4D< T >::m_data[4] [private]


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

Copyright (c) Thomas Goessler 2003 - 2008