matrix44 Class Reference

#include <matrix44.h>

List of all members.


Detailed Description

Generic matrix44 class.

Public Member Functions

 matrix44 ()
 matrix44 (const matrix44 &m1)
 matrix44 (const vector4 &v0, const vector4 &v1, const vector4 &v2, const vector4 &v3)
 matrix44 (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
void set (const vector4 &v0, const vector4 &v1, const vector4 &v2, const vector4 &v3)
void set (const matrix44 &m1)
void set (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
void operator *= (const matrix44 &m1)
void ident ()
void transpose ()
float det ()
void invert (void)
void invert_simple (void)
void mult_simple (const matrix44 &m1)
vector3 transform_coord (const vector3 &v) const
vector3x_component () const
vector3y_component () const
vector3z_component () const
vector3pos_component () const
void rotate_x (const float a)
void rotate_y (const float a)
void rotate_z (const float a)
void rotate (const vector3 &vec, float a)
void translate (const vector3 &t)
void set_translation (const vector3 &t)
void scale (const vector3 &s)
void lookatLh (const vector3 &to, const vector3 &up)
void lookatRh (const vector3 &to, const vector3 &up)
void perspFovLh (float fovY, float aspect, float zn, float zf)
void perspFovRh (float fovY, float aspect, float zn, float zf)
void perspOffCenterLh (float minX, float maxX, float minY, float maxY, float zn, float zf)
void perspOffCenterRh (float minX, float maxX, float minY, float maxY, float zn, float zf)
void orthoLh (float w, float h, float zn, float zf)
void orthoRh (float w, float h, float zn, float zf)
void billboard (const vector3 &to, const vector3 &up)
void mult (const vector4 &src, vector4 &dst) const
void mult (const vector3 &src, vector3 &dst) const
vector3 mult_divw (const vector3 &v) const
void weightedmadd (const vector3 &src, vector3 &dst, float weight) const

Public Attributes

float m [4][4]

Constructor & Destructor Documentation

matrix44::matrix44 (  )  [inline]

Constructor.

matrix44::matrix44 ( const matrix44 m1  )  [inline]

Constructor.

matrix44::matrix44 ( const vector4 v0,
const vector4 v1,
const vector4 v2,
const vector4 v3 
) [inline]

Constructor.

matrix44::matrix44 ( float  m11,
float  m12,
float  m13,
float  m14,
float  m21,
float  m22,
float  m23,
float  m24,
float  m31,
float  m32,
float  m33,
float  m34,
float  m41,
float  m42,
float  m43,
float  m44 
) [inline]

Constructor.


Member Function Documentation

void matrix44::set ( const vector4 v0,
const vector4 v1,
const vector4 v2,
const vector4 v3 
) [inline]

Sets new values.

void matrix44::set ( const matrix44 m1  )  [inline]

Sets new values.

void matrix44::set ( float  m11,
float  m12,
float  m13,
float  m14,
float  m21,
float  m22,
float  m23,
float  m24,
float  m31,
float  m32,
float  m33,
float  m34,
float  m41,
float  m42,
float  m43,
float  m44 
) [inline]

Sets new values.

void matrix44::operator *= ( const matrix44 m1  )  [inline]

Inplace matrix mulitply.

void matrix44::ident (  )  [inline]

Sets to identity.

void matrix44::transpose (  )  [inline]

Transposes.

float matrix44::det (  )  [inline]

Returns determinant.

void matrix44::invert ( void   )  [inline]

Full invert.

void matrix44::invert_simple ( void   )  [inline]

Quick invert (if 3x3 rotation and translation).

Inverts a 4x4 matrix consisting of a 3x3 rotation matrix and a translation (eg. everything that has [0,0,0,1] as the rightmost column) MUCH cheaper then a real 4x4 inversion

void matrix44::mult_simple ( const matrix44 m1  )  [inline]

Optimized multiplication, assumes that M14==M24==M34==0 AND M44==1.

vector3 matrix44::transform_coord ( const vector3 v  )  const [inline]

Transforms a vector by the matrix, projecting the result back into w=1.

vector3 & matrix44::x_component (  )  const [inline]

Returns X component.

Returns:
the first row of the matrix. (M11, M12 and M13)

vector3 & matrix44::y_component (  )  const [inline]

Returns Y component.

Returns:
the second row of the matrix. (M21, M22 and M23)

vector3 & matrix44::z_component (  )  const [inline]

Returns Z component.

Returns:
the third row of the matrix. (M31, M32 and M33)

vector3 & matrix44::pos_component (  )  const [inline]

Returns translate component.

Returns:
the 4th row of the matrix. (M41, M42 and M43)

void matrix44::rotate_x ( const float  a  )  [inline]

Rotates around global X.

void matrix44::rotate_y ( const float  a  )  [inline]

Rotates around global Y.

void matrix44::rotate_z ( const float  a  )  [inline]

Rotates around global Z.

void matrix44::rotate ( const vector3 vec,
float  a 
) [inline]

Rotates around any axis.

void matrix44::translate ( const vector3 t  )  [inline]

Translates.

void matrix44::set_translation ( const vector3 t  )  [inline]

Sets absolute translation.

void matrix44::scale ( const vector3 s  )  [inline]

Scales.

void matrix44::lookatLh ( const vector3 at,
const vector3 up 
) [inline]

Lookat in a left-handed coordinate system.

void matrix44::lookatRh ( const vector3 at,
const vector3 up 
) [inline]

Lookat in a right-handed coordinate system.

void matrix44::perspFovLh ( float  fovY,
float  aspect,
float  zn,
float  zf 
) [inline]

Creates left-handed field-of-view perspective projection matrix.

void matrix44::perspFovRh ( float  fovY,
float  aspect,
float  zn,
float  zf 
) [inline]

Creates right-handed field-of-view perspective projection matrix.

void matrix44::perspOffCenterLh ( float  minX,
float  maxX,
float  minY,
float  maxY,
float  zn,
float  zf 
) [inline]

Creates off-center left-handed perspective projection matrix.

void matrix44::perspOffCenterRh ( float  minX,
float  maxX,
float  minY,
float  maxY,
float  zn,
float  zf 
) [inline]

Creates off-center right-handed perspective projection matrix.

void matrix44::orthoLh ( float  w,
float  h,
float  zn,
float  zf 
) [inline]

Creates left-handed orthogonal projection matrix.

void matrix44::orthoRh ( float  w,
float  h,
float  zn,
float  zf 
) [inline]

Creates right-handed orthogonal projection matrix.

void matrix44::billboard ( const vector3 to,
const vector3 up 
) [inline]

Restricted lookat.

void matrix44::mult ( const vector4 src,
vector4 dst 
) const [inline]

Multiply source vector into target vector, eliminates tmp vector.

void matrix44::mult ( const vector3 src,
vector3 dst 
) const [inline]

Multiply source vector into target vector, eliminates tmp vector.

vector3 matrix44::mult_divw ( const vector3 v  )  const [inline]

Multiply and divide by w.

void matrix44::weightedmadd ( const vector3 src,
vector3 dst,
float  weight 
) const [inline]

Fast multiply-add with weighting.

Perform a multiply-add with weighting (this is quite specialized for CPU-skinning)


Member Data Documentation

float matrix44::m[4][4]


The documentation for this class was generated from the following file:
Generated on Sat Oct 20 14:47:33 2007 for Dark Oberon by  doxygen 1.5.3