AI_TMatrix44 Class Reference
[Mathematics]

#include <AI_TMatrix44.h>

List of all members.


Detailed Description

Generic AI_Matrix44 class.

(C) 2002 RadonLabs GmbH

Public Member Functions

 AI_TMatrix44 ()
 constructor 1
 AI_TMatrix44 (const AI_TVector4 &v0, const AI_TVector4 &v1, const AI_TVector4 &v2, const AI_TVector4 &v3)
 constructor 2
 AI_TMatrix44 (const AI_TMatrix44 &m1)
 constructor 3
 AI_TMatrix44 (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)
 constructor 4
 AI_TMatrix44 (const AI_Quaternion &q)
 construct from AI_Quaternion
AI_Quaternion get_quaternion () const
 convert to AI_Quaternion
void set (const AI_TVector4 &v0, const AI_TVector4 &v1, const AI_TVector4 &v2, const AI_TVector4 &v3)
 set 1
void set (const AI_TMatrix44 &m1)
 set 2
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)
 set 3
void set (const AI_Quaternion &q)
 set from AI_Quaternion
void ident ()
 set to identity
void transpose ()
 transpose
float det ()
 determinant
void invert (void)
 full invert
void invert_simple (void)
 quick invert (if 3x3 rotation and translation)
void mult_simple (const AI_TMatrix44 &m1)
 quick multiplication, assumes that m[0][3]==m[1][3]==m[2][3]==0 and m[3][3]==1
AI_TVector3 transform_coord (const AI_TVector3 &v) const
 transform AI_Vector3, projecting back into w=1
AI_TVector3x_component () const
 return x component
AI_TVector3y_component () const
 return y component
AI_TVector3z_component () const
 return z component
AI_TVector3pos_component () const
 return translate component
void rotate_x (const float a)
 rotate around global x
void rotate_y (const float a)
 rotate around global y
void rotate_z (const float a)
 rotate around global z
void rotate (const AI_TVector3 &vec, float a)
 rotate about any axis
void translate (const AI_TVector3 &t)
 translate
void set_translation (const AI_TVector3 &t)
 set absolute translation
void scale (const AI_TVector3 &s)
 scale
void lookatLh (const AI_TVector3 &to, const AI_TVector3 &up)
 lookat in a left-handed coordinate system
void lookatRh (const AI_TVector3 &to, const AI_TVector3 &up)
 lookat in a right-handed coordinate system
void perspFovLh (float fovY, float aspect, float zn, float zf)
 create left-handed field-of-view perspective projection matrix
void perspFovRh (float fovY, float aspect, float zn, float zf)
 create right-handed field-of-view perspective projection matrix
void perspOffCenterLh (float minX, float maxX, float minY, float maxY, float zn, float zf)
 create off-center left-handed perspective projection matrix
void perspOffCenterRh (float minX, float maxX, float minY, float maxY, float zn, float zf)
 create off-center right-handed perspective projection matrix
void orthoLh (float w, float h, float zn, float zf)
 create left-handed orthogonal projection matrix
void orthoRh (float w, float h, float zn, float zf)
 create right-handed orthogonal projection matrix
void billboard (const AI_TVector3 &to, const AI_TVector3 &up)
 restricted lookat
void operator *= (const AI_TMatrix44 &m1)
 inplace matrix mulitply
void mult (const AI_TVector4 &src, AI_TVector4 &dst) const
 multiply source vector into target vector, eliminates tmp vector
void mult (const AI_TVector3 &src, AI_TVector3 &dst) const
 multiply source vector into target vector, eliminates tmp vector

Public Attributes

float m [4][4]


Constructor & Destructor Documentation

AI_TMatrix44::AI_TMatrix44 (  )  [inline]

constructor 1

AI_TMatrix44::AI_TMatrix44 ( const AI_TVector4 v0,
const AI_TVector4 v1,
const AI_TVector4 v2,
const AI_TVector4 v3 
) [inline]

constructor 2

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

constructor 3

AI_TMatrix44::AI_TMatrix44 ( 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 4

AI_TMatrix44::AI_TMatrix44 ( const AI_Quaternion q  )  [inline]

construct from AI_Quaternion


Member Function Documentation

AI_Quaternion AI_TMatrix44::get_quaternion (  )  const [inline]

convert to AI_Quaternion

convert orientation of 4x4 matrix into quaterion, 4x4 matrix must not be scaled!

void AI_TMatrix44::set ( const AI_TVector4 v0,
const AI_TVector4 v1,
const AI_TVector4 v2,
const AI_TVector4 v3 
) [inline]

set 1

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

set 2

void AI_TMatrix44::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]

set 3

void AI_TMatrix44::set ( const AI_Quaternion q  )  [inline]

set from AI_Quaternion

void AI_TMatrix44::ident ( void   )  [inline]

set to identity

void AI_TMatrix44::transpose (  )  [inline]

transpose

float AI_TMatrix44::det (  )  [inline]

determinant

void AI_TMatrix44::invert ( void   )  [inline]

full invert

void AI_TMatrix44::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 AI_TMatrix44::mult_simple ( const AI_TMatrix44 m1  )  [inline]

quick multiplication, assumes that m[0][3]==m[1][3]==m[2][3]==0 and m[3][3]==1

optimized multiplication, assumes that m[0][3]==m[1][3]==m[2][3]==0 AND m[3][3]==1

AI_TVector3 AI_TMatrix44::transform_coord ( const AI_TVector3 v  )  const [inline]

transform AI_Vector3, projecting back into w=1

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

AI_TVector3 & AI_TMatrix44::x_component ( void   )  const [inline]

return x component

AI_TVector3 & AI_TMatrix44::y_component ( void   )  const [inline]

return y component

AI_TVector3 & AI_TMatrix44::z_component ( void   )  const [inline]

return z component

AI_TVector3 & AI_TMatrix44::pos_component (  )  const [inline]

return translate component

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

rotate around global x

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

rotate around global y

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

rotate around global z

void AI_TMatrix44::rotate ( const AI_TVector3 vec,
float  a 
) [inline]

rotate about any axis

void AI_TMatrix44::translate ( const AI_TVector3 t  )  [inline]

translate

void AI_TMatrix44::set_translation ( const AI_TVector3 t  )  [inline]

set absolute translation

void AI_TMatrix44::scale ( const AI_TVector3 s  )  [inline]

scale

void AI_TMatrix44::lookatLh ( const AI_TVector3 to,
const AI_TVector3 up 
) [inline]

lookat in a left-handed coordinate system

void AI_TMatrix44::lookatRh ( const AI_TVector3 to,
const AI_TVector3 up 
) [inline]

lookat in a right-handed coordinate system

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

create left-handed field-of-view perspective projection matrix

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

create right-handed field-of-view perspective projection matrix

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

create off-center left-handed perspective projection matrix

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

create off-center right-handed perspective projection matrix

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

create left-handed orthogonal projection matrix

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

create right-handed orthogonal projection matrix

void AI_TMatrix44::billboard ( const AI_TVector3 to,
const AI_TVector3 up 
) [inline]

restricted lookat

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

inplace matrix mulitply

void AI_TMatrix44::mult ( const AI_TVector4 src,
AI_TVector4 dst 
) const [inline]

multiply source vector into target vector, eliminates tmp vector

void AI_TMatrix44::mult ( const AI_TVector3 src,
AI_TVector3 dst 
) const [inline]

multiply source vector into target vector, eliminates tmp vector


Member Data Documentation

float AI_TMatrix44::m[4][4]


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