Matrix3< T > Class Template Reference

#include <vmath.h>

List of all members.

Public Member Functions

 Matrix3 ()
 Matrix3 (const T *dt)
void indetity ()
bool operator== (const Matrix3< T > &rhs) const
bool operator!= (const Matrix3< T > &rhs) const
T & at (int x, int y)
const T & at (int x, int y) const
Matrix3< T > & operator= (const Matrix3< T > &rhs)
Matrix3< T > & operator= (const T *rhs)
Matrix3< T > operator+ (const Matrix3< T > &rhs) const
Matrix3< T > operator- (const Matrix3< T > &rhs) const
Matrix3< T > operator+ (T rhs) const
Matrix3< T > operator- (T rhs) const
Matrix3< T > operator * (T rhs) const
Matrix3< T > operator/ (T rhs) const
Vector3< T > operator * (const Vector3< T > &rhs) const
Matrix3< T > operator * (Matrix3< T > rhs) const
Matrix3< T > transpose ()
Matrix3< T > lerp (T fact, const Matrix3< T > &rhs) const
 operator T * ()
 operator const T * () const

Static Public Member Functions

static Matrix3< T > createRotationAroundAxis (T a, T b, T c)
template<class It>
static Matrix3< T > fromOde (const It *mat)

Public Attributes

data [9]
 Data stored in column major order.

Friends

std::ostream & operator<< (std::ostream &lhs, const Matrix3< T > &rhs)


Detailed Description

template<class T>
class Matrix3< T >

Class for matrix 3x3.
Note:
Data stored in this matrix are in column major order.


Constructor & Destructor Documentation

template<class T>
Matrix3< T >::Matrix3 (  )  [inline]

Creates identity matrix

template<class T>
Matrix3< T >::Matrix3 ( const T *  dt  )  [inline]

Copy matrix values from array (these data must be in column major order!)


Member Function Documentation

template<class T>
void Matrix3< T >::indetity (  )  [inline]

Resets matrix to be indetity matrix

template<class T>
static Matrix3<T> Matrix3< T >::createRotationAroundAxis ( a,
b,
c 
) [inline, static]

Creates rotation matrix by rotation around axis.

Parameters:
a Angle (in radians) of rotation around axis X.
b Angle (in radians) of rotation around axis Y.
c Angle (in radians) of rotation around axis Z.

template<class T>
template<class It>
static Matrix3<T> Matrix3< T >::fromOde ( const It *  mat  )  [inline, static]

Creates roation matrix from ODE Matrix.

template<class T>
bool Matrix3< T >::operator== ( const Matrix3< T > &  rhs  )  const [inline]

Equality test operator

Parameters:
rhs Right hand side argument of binary operator.
Note:
Test of equality is based of threshold EPSILON value. To be two values equal, must satisfy this condition all elements of matrix | lws[i] - rhs[i] | < EPSILON, same for y-coordinate, z-coordinate, and w-coordinate.

template<class T>
bool Matrix3< T >::operator!= ( const Matrix3< T > &  rhs  )  const [inline]

Inequality test operator

Parameters:
rhs Right hand side argument of binary operator.
Returns:
not (lhs == rhs) :-P

template<class T>
T& Matrix3< T >::at ( int  x,
int  y 
) [inline]

Get reference to element at postion (x,y).

Parameters:
x Number of column (0..2)
y Number of row (0..2)

template<class T>
const T& Matrix3< T >::at ( int  x,
int  y 
) const [inline]

Get constant reference to element at postion (x,y).

Parameters:
x Number of column (0..2)
y Number of row (0..2)

template<class T>
Matrix3<T>& Matrix3< T >::operator= ( const Matrix3< T > &  rhs  )  [inline]

Copy operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T>& Matrix3< T >::operator= ( const T *  rhs  )  [inline]

Copy operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::operator+ ( const Matrix3< T > &  rhs  )  const [inline]

Addition operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::operator- ( const Matrix3< T > &  rhs  )  const [inline]

Substraction operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::operator+ ( rhs  )  const [inline]

Addition operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::operator- ( rhs  )  const [inline]

Substraction operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::operator * ( rhs  )  const [inline]

Multiplication operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::operator/ ( rhs  )  const [inline]

Division operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Vector3<T> Matrix3< T >::operator * ( const Vector3< T > &  rhs  )  const [inline]

Multiplication operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::operator * ( Matrix3< T >  rhs  )  const [inline]

Multiplication operator

Parameters:
rhs Right hand side argument of binary operator.

template<class T>
Matrix3<T> Matrix3< T >::transpose (  )  [inline]

Transpose matrix.

template<class T>
Matrix3<T> Matrix3< T >::lerp ( fact,
const Matrix3< T > &  rhs 
) const [inline]

Linear interpolation of two vectors

Parameters:
fact Factor of interpolation. For translation from positon of this matrix (lhs) to matrix rhs, values of factor goes from 0.0 to 1.0.
rhs Second Matrix for interpolation
Note:
Hovewer values of fact parameter are reasonable only in interval [0.0 , 1.0], you can pass also values outside of this interval and you can get result (extrapolation?)

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

Conversion to pointer operator

Returns:
Pointer to internaly stored (in managment of class Matrix3<T>) used for passing Matrix3<T> values to gl*[fd]v functions.

template<class T>
Matrix3< T >::operator const T * (  )  const [inline]

Conversion to pointer operator

Returns:
Constant Pointer to internaly stored (in managment of class Matrix3<T>) used for passing Matrix3<T> values to gl*[fd]v functions.


Friends And Related Function Documentation

template<class T>
std::ostream& operator<< ( std::ostream &  lhs,
const Matrix3< T > &  rhs 
) [friend]

Output to stream operator

Parameters:
lhs Left hand side argument of operator (commonly ostream instance).
rhs Right hand side argument of operator.
Returns:
Left hand side argument - the ostream object passed to operator.


The documentation for this class was generated from the following file:
Generated on Wed Jan 17 14:53:45 2007 for iTunesIslands by  doxygen 1.5.1-p1