vmml::Matrix4< T > Class Template Reference

List of all members.

Public Member Functions

 Matrix4 (T v00, T v01, T v02, T v03, T v10, T v11, T v12, T v13, T v20, T v21, T v22, T v23, T v30, T v31, T v32, T v33)
 Matrix4 (const Vector4< T > &v0, const Vector4< T > &v1, const Vector4< T > &v2, const Vector4< T > &v3, bool columnVectors=false)
 Matrix4 (const Matrix4 &other)
template<typename U >
 Matrix4 (const Matrix4< U > &other)
 Matrix4 (const float *values)
 Matrix4 (const double *values)
const Matrix4operator= (const Matrix4 &other)
template<typename U >
const Matrix4operator= (const Matrix4< U > &other)
bool operator== (const Matrix4 &other) const
bool operator!= (const Matrix4 &other) const
void set (const Matrix4 &other)
void set (const float *other)
void set (const double *other)
void set (T v00, T v01, T v02, T v03, T v10, T v11, T v12, T v13, T v20, T v21, T v22, T v23, T v30, T v31, T v32, T v33)
bool set (const std::string &values, char delimiter= ' ')
bool set (const std::vector< std::string > &values)
const T & getElement (const size_t row, const size_t col) const
void setElement (const size_t row, const size_t col, const T &value) const
Vector4< T > getColumn (const size_t column) const
Vector4< T > getRow (const size_t row) const
void setColumn (const size_t column, const Vector3< T > &columnvec)
void setRow (const size_t row, const Vector3< T > &rowvec)
void setColumn (const size_t column, const Vector4< T > &columnvec)
void setRow (const size_t row, const Vector4< T > &rowvec)
template<typename U >
void set3x3SubMatrix (const Matrix3< U > &m3x3, size_t columnOffset=0, size_t rowOffset=0)
void get3x3SubMatrix (Matrix3< T > &result, size_t rowOffset=0, size_t colOffset=0) const
Matrix4 operator+ (const Matrix4 &other) const
Matrix4 operator- (const Matrix4 &other) const
Matrix4 operator* (const Matrix4 &other) const
Matrix4 operator* (T scalar) const
Matrix4 operator/ (T scalar) const
Vector3< T > operator* (const Vector3< T > &other) const
Vector4< T > operator* (const Vector4< T > &other) const
Matrix4operator+= (const Matrix4 &other)
Matrix4operator-= (const Matrix4 &other)
Matrix4operator*= (const Matrix4 &other)
Matrix4operator*= (T scalar)
Matrix4operator/= (T scalar)
Matrix4 negate () const
Matrix4 operator- () const
Matrix4 getTransposed () const
getDeterminant () const
det () const
Matrix4 getAdjugate () const
Matrix4 getAdjoint () const
Matrix4 getInverse (bool &isInvertible, T limit=0.0000000001) const
bool getInverse (Matrix4 &result, T limit=0.0000000001) const
void rotate (const T angle, const Vector3< T > &axis)
void rotateX (const T angle)
void rotateY (const T angle)
void rotateZ (const T angle)
void preRotateX (const T angle)
void preRotateY (const T angle)
void preRotateZ (const T angle)
void scale (const T scale[3])
void scale (const T x, const T y, const T z)
void scale (const Vector3< T > &scale_)
void scaleTranslation (const T scale_[3])
void scaleTranslation (const Vector3< T > &scale_)
void setTranslation (const T x, const T y, const T z)
void setTranslation (const T trans[3])
void setTranslation (const Vector3< T > &trans)
Vector3< T > getTranslation () const
void tensor (const Vector3< T > &u, const Vector3< T > &v)
void tensor (const Vector4< T > &u, const Vector4< T > &v)
getMinor (const size_t row0, const size_t row1, const size_t row2, const size_t col0, const size_t col1, const size_t col2) const
getMinor (const size_t removeRow, const size_t removeCol) const
bool getString (std::string &result, const std::string &delimiter=" ") const
template<>
void rotateX (const float angle)
template<>
void rotateY (const float angle)
template<>
void rotateZ (const float angle)
template<>
void preRotateX (const float angle)
template<>
void preRotateY (const float angle)
template<>
void preRotateZ (const float angle)

Public Attributes

union {
   struct {
      T   m00
      T   m10
      T   m20
      T   m30
      T   m01
      T   m11
      T   m21
      T   m31
      T   m02
      T   m12
      T   m22
      T   m32
      T   m03
      T   m13
      T   m23
      T   m33
   } 
   struct {
      T   rot00
      T   rot10
      T   rot20
      T   d30
      T   rot01
      T   rot11
      T   rot21
      T   d31
      T   rot02
      T   rot12
      T   rot22
      T   d32
      T   x
      T   y
      T   z
      T   d33
   } 
   T   ml [16]
   T   array [16]
   T   m [4][4]
}; 

Static Public Attributes

static const Matrix4 IDENTITY
static const Matrix4 ZERO

Friends

std::ostream & operator<< (std::ostream &os, const Matrix4 &m)

template<typename T>
class vmml::Matrix4< T >


Member Function Documentation

template<typename T >
void vmml::Matrix4< T >::rotate ( const T  angle,
const Vector3< T > &  axis 
) [inline]

create rotation matrix from parameters.

Parameters:
angle - angle in radians
rotation axis - must be normalized!

Member Data Documentation

template<typename T>
T vmml::Matrix4< T >::m[4][4]

The following representation is for internal purposes. The first array index specifies the __column__ number, the second the row: m[col][row].

Example: m[2][1] -> row #1, col #2

template<typename T>
T vmml::Matrix4< T >::m00

The matrix element in 'math' notation, e.g. similar to the way it is done in mathematical texts.

The first index denotes the row, the second the column. This means that m21 is the element at row #2, col #1.

template<typename T>
T vmml::Matrix4< T >::ml[16]

The linear / 1d-array representation of the matrix. Useful for usage with the OpenGL API. E.g.: glLoadMatrix( mymat.ml );


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

Generated by  doxygen 1.6.2