Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

math::Mat< T, W, H > Class Template Reference

generic matrix class, built upon Vec's. the values are ordered the same way opengl do it. eg: Mat<float, 4, 4> matrix -> first 4 values are the 4 values of the first COLUMN-Vec and so on and so forth. More...

#include <matrix.hpp>

Collaboration diagram for math::Mat< T, W, H >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T ValType
typedef const T ConstValType
typedef T * ValTypePtr
typedef const T * ConstValTypePtr
typedef Mat< ValType, W, H > MatType
typedef const Mat< ValType,
W, H > 
ConstMatType
typedef Traits< Mat< T, W,
H > > 
Trait
typedef Traits< T > ValTrait

Public Member Functions

 Mat ()
 Mat (const ValType &scalar)
 Mat (const ValTypePtr valptr)
 Mat (const MatType &mat)
ValTypePtr begin ()
ConstValTypePtr begin () const
ValTypePtr end ()
ConstValTypePtr end () const
ValTypeoperator() (const int i, const int j)
const ValTypeoperator() (const int i, const int j) const
ValTypeoperator[] (const int i)
const ValTypeoperator[] (const int i) const
MatTypeoperator= (ConstValType &scalar)
MatTypeoperator= (ConstValTypePtr valptr)
MatTypeoperator= (ConstMatType &mat)
MatType operator+ (ConstMatType &mat) const
MatType operator- (ConstMatType &mat) const
MatTypeoperator+= (ConstMatType &mat)
MatTypeoperator-= (ConstMatType &mat)
template<int WW> Mat< T, WW, H > operator * (const Mat< T, WW, W > &mat) const
Vec< T, W > operator * (const Vec< T, W > &vec) const
MatTypeoperator *= (const Mat< T, H, W > &mat)
MatType operator * (ConstValType &scalar) const
MatType operator/ (ConstValType &scalar) const
MatTypeoperator *= (ConstValType &scalar)
MatTypeoperator/= (ConstValType &scalar)

Static Public Member Functions

unsigned int width ()
unsigned int height ()
unsigned int size ()
unsigned int bytesize ()

Public Attributes

Vec< T, H > val [W]

Detailed Description

template<typename T, int W, int H>
class math::Mat< T, W, H >

generic matrix class, built upon Vec's. the values are ordered the same way opengl do it. eg: Mat<float, 4, 4> matrix -> first 4 values are the 4 values of the first COLUMN-Vec and so on and so forth.

Definition at line 108 of file matrix.hpp.


Member Typedef Documentation

template<typename T, int W, int H>
typedef const Mat<ValType, W, H> math::Mat< T, W, H >::ConstMatType
 

Definition at line 118 of file matrix.hpp.

template<typename T, int W, int H>
typedef const T math::Mat< T, W, H >::ConstValType
 

Definition at line 113 of file matrix.hpp.

template<typename T, int W, int H>
typedef const T* math::Mat< T, W, H >::ConstValTypePtr
 

Definition at line 115 of file matrix.hpp.

Referenced by math::Mat< T, W, H >::begin(), and math::Mat< T, W, H >::end().

template<typename T, int W, int H>
typedef Mat<ValType, W, H> math::Mat< T, W, H >::MatType
 

Definition at line 117 of file matrix.hpp.

template<typename T, int W, int H>
typedef Traits<Mat<T, W, H> > math::Mat< T, W, H >::Trait
 

Definition at line 120 of file matrix.hpp.

template<typename T, int W, int H>
typedef Traits<T> math::Mat< T, W, H >::ValTrait
 

Definition at line 121 of file matrix.hpp.

template<typename T, int W, int H>
typedef T math::Mat< T, W, H >::ValType
 

Definition at line 112 of file matrix.hpp.

Referenced by math::Mat< T, W, H >::operator()(), and math::Mat< T, W, H >::operator[]().

template<typename T, int W, int H>
typedef T* math::Mat< T, W, H >::ValTypePtr
 

Definition at line 114 of file matrix.hpp.

Referenced by math::Mat< T, W, H >::begin(), and math::Mat< T, W, H >::end().


Constructor & Destructor Documentation

template<typename T, int W, int H>
math::Mat< T, W, H >::Mat  )  [inline]
 

Definition at line 127 of file matrix.hpp.

template<typename T, int W, int H>
math::Mat< T, W, H >::Mat const ValType scalar  )  [inline]
 

Definition at line 128 of file matrix.hpp.

References math::Mat< T, W, H >::operator=().

Here is the call graph for this function:

template<typename T, int W, int H>
math::Mat< T, W, H >::Mat const ValTypePtr  valptr  )  [inline]
 

Definition at line 129 of file matrix.hpp.

References math::Mat< T, W, H >::operator=().

Here is the call graph for this function:

template<typename T, int W, int H>
math::Mat< T, W, H >::Mat const MatType mat  )  [inline]
 

Definition at line 130 of file matrix.hpp.

References math::Mat< T, W, H >::operator=().

Here is the call graph for this function:


Member Function Documentation

template<typename T, int W, int H>
ConstValTypePtr math::Mat< T, W, H >::begin  )  const [inline]
 

Definition at line 140 of file matrix.hpp.

References math::Chunk< T, S >::begin(), math::Mat< T, W, H >::ConstValTypePtr, and math::Mat< T, W, H >::val.

Here is the call graph for this function:

template<typename T, int W, int H>
ValTypePtr math::Mat< T, W, H >::begin  )  [inline]
 

Definition at line 139 of file matrix.hpp.

References math::Chunk< T, S >::begin(), math::Mat< T, W, H >::val, and math::Mat< T, W, H >::ValTypePtr.

Here is the call graph for this function:

template<typename T, int W, int H>
unsigned int math::Mat< T, W, H >::bytesize  )  [inline, static]
 

Definition at line 135 of file matrix.hpp.

template<typename T, int W, int H>
ConstValTypePtr math::Mat< T, W, H >::end  )  const [inline]
 

Definition at line 142 of file matrix.hpp.

References math::Mat< T, W, H >::ConstValTypePtr, and math::Mat< T, W, H >::val.

template<typename T, int W, int H>
ValTypePtr math::Mat< T, W, H >::end  )  [inline]
 

Definition at line 141 of file matrix.hpp.

References math::Mat< T, W, H >::val, and math::Mat< T, W, H >::ValTypePtr.

template<typename T, int W, int H>
unsigned int math::Mat< T, W, H >::height  )  [inline, static]
 

Definition at line 133 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > math::Mat< T, W, H >::operator * ConstValType scalar  )  const [inline]
 

Definition at line 261 of file matrix.hpp.

template<typename T, int W, int H>
Vec< T, W > math::Mat< T, W, H >::operator * const Vec< T, W > &  vec  )  const [inline]
 

Definition at line 321 of file matrix.hpp.

template<typename T, int W, int H>
template<int WW>
Mat< T, WW, H > math::Mat< T, W, H >::operator * const Mat< T, WW, W > &  mat  )  const [inline]
 

Definition at line 298 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator *= ConstValType scalar  )  [inline]
 

Definition at line 270 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator *= const Mat< T, H, W > &  mat  )  [inline]
 

Definition at line 341 of file matrix.hpp.

template<typename T, int W, int H>
const ValType& math::Mat< T, W, H >::operator() const int  i,
const int  j
const [inline]
 

Definition at line 145 of file matrix.hpp.

References math::Mat< T, W, H >::val, and math::Mat< T, W, H >::ValType.

template<typename T, int W, int H>
ValType& math::Mat< T, W, H >::operator() const int  i,
const int  j
[inline]
 

Definition at line 144 of file matrix.hpp.

References math::Mat< T, W, H >::val, and math::Mat< T, W, H >::ValType.

template<typename T, int W, int H>
Mat< T, W, H > math::Mat< T, W, H >::operator+ ConstMatType mat  )  const [inline]
 

Definition at line 226 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator+= ConstMatType mat  )  [inline]
 

Definition at line 236 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > math::Mat< T, W, H >::operator- ConstMatType mat  )  const [inline]
 

Definition at line 244 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator-= ConstMatType mat  )  [inline]
 

Definition at line 253 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > math::Mat< T, W, H >::operator/ ConstValType scalar  )  const [inline]
 

Definition at line 278 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator/= ConstValType scalar  )  [inline]
 

Definition at line 287 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator= ConstMatType mat  )  [inline]
 

Definition at line 217 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator= ConstValTypePtr  valptr  )  [inline]
 

Definition at line 211 of file matrix.hpp.

template<typename T, int W, int H>
Mat< T, W, H > & math::Mat< T, W, H >::operator= ConstValType scalar  )  [inline]
 

Definition at line 205 of file matrix.hpp.

Referenced by math::Mat< T, W, H >::Mat().

template<typename T, int W, int H>
const ValType& math::Mat< T, W, H >::operator[] const int  i  )  const [inline]
 

Definition at line 148 of file matrix.hpp.

References math::Mat< T, W, H >::val, and math::Mat< T, W, H >::ValType.

template<typename T, int W, int H>
ValType& math::Mat< T, W, H >::operator[] const int  i  )  [inline]
 

Definition at line 147 of file matrix.hpp.

References math::Mat< T, W, H >::val, and math::Mat< T, W, H >::ValType.

template<typename T, int W, int H>
unsigned int math::Mat< T, W, H >::size  )  [inline, static]
 

Definition at line 134 of file matrix.hpp.

template<typename T, int W, int H>
unsigned int math::Mat< T, W, H >::width  )  [inline, static]
 

Definition at line 132 of file matrix.hpp.


Member Data Documentation

template<typename T, int W, int H>
Vec<T, H> math::Mat< T, W, H >::val[W]
 

Definition at line 176 of file matrix.hpp.

Referenced by math::Mat< T, W, H >::begin(), math::Mat< T, W, H >::end(), math::Mat< T, W, H >::operator()(), and math::Mat< T, W, H >::operator[]().


The documentation for this class was generated from the following file:
Generated on Tue Sep 2 11:33:29 2003 for math by doxygen 1.3.2