doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions | Variables
Matrix.h File Reference

Go to the source code of this file.

Classes

class  idMat2
 
class  idMat3
 
class  idMat4
 
class  idMat5
 
class  idMat6
 
class  idMatX
 

Macros

#define MATRIX_INVERSE_EPSILON   1e-14
 
#define MATRIX_EPSILON   1e-6
 
#define mat2_default   mat2_identity
 
#define mat3_default   mat3_identity
 
#define mat4_default   mat4_identity
 
#define mat5_default   mat5_identity
 
#define mat6_default   mat6_identity
 
#define MATX_MAX_TEMP   1024
 
#define MATX_QUAD(x)   ( ( ( ( x ) + 3 ) & ~3 ) * sizeof( float ) )
 
#define MATX_CLEAREND()   int s = numRows * numColumns; while( s < ( ( s + 3 ) & ~3 ) ) { mat[s++] = 0.0f; }
 
#define MATX_ALLOCA(n)   ( (float *) _alloca16( MATX_QUAD( n ) ) )
 
#define MATX_SIMD
 

Functions

ID_INLINE idVec2 operator* (const idVec2 &vec, const idMat2 &mat)
 
ID_INLINE idMat2 operator* (const float a, idMat2 const &mat)
 
ID_INLINE idVec2operator*= (idVec2 &vec, const idMat2 &mat)
 
ID_INLINE idVec3 operator* (const idVec3 &vec, const idMat3 &mat)
 
ID_INLINE idMat3 operator* (const float a, const idMat3 &mat)
 
ID_INLINE idVec3operator*= (idVec3 &vec, const idMat3 &mat)
 
ID_INLINE void TransposeMultiply (const idMat3 &transpose, const idMat3 &b, idMat3 &dst)
 
ID_INLINE idMat3 SkewSymmetric (idVec3 const &src)
 
ID_INLINE idMat4 operator* (const float a, const idMat4 &mat)
 
ID_INLINE idVec4 operator* (const idVec4 &vec, const idMat4 &mat)
 
ID_INLINE idVec3 operator* (const idVec3 &vec, const idMat4 &mat)
 
ID_INLINE idVec4operator*= (idVec4 &vec, const idMat4 &mat)
 
ID_INLINE idVec3operator*= (idVec3 &vec, const idMat4 &mat)
 
ID_INLINE idVec5 operator* (const idVec5 &vec, const idMat5 &mat)
 
ID_INLINE idMat5 operator* (const float a, idMat5 const &mat)
 
ID_INLINE idVec5operator*= (idVec5 &vec, const idMat5 &mat)
 
ID_INLINE idVec6 operator* (const idVec6 &vec, const idMat6 &mat)
 
ID_INLINE idMat6 operator* (const float a, idMat6 const &mat)
 
ID_INLINE idVec6operator*= (idVec6 &vec, const idMat6 &mat)
 
ID_INLINE idMatX operator* (const float a, idMatX const &m)
 
ID_INLINE idVecX operator* (const idVecX &vec, const idMatX &m)
 
ID_INLINE idVecXoperator*= (idVecX &vec, const idMatX &m)
 

Variables

idMat2 mat2_zero
 
idMat2 mat2_identity
 
idMat3 mat3_zero
 
idMat3 mat3_identity
 
idMat4 mat4_zero
 
idMat4 mat4_identity
 
idMat5 mat5_zero
 
idMat5 mat5_identity
 
idMat6 mat6_zero
 
idMat6 mat6_identity
 

Macro Definition Documentation

#define mat2_default   mat2_identity

Definition at line 111 of file Matrix.h.

#define mat3_default   mat3_identity

Definition at line 413 of file Matrix.h.

#define mat4_default   mat4_identity

Definition at line 831 of file Matrix.h.

#define mat5_default   mat5_identity

Definition at line 1206 of file Matrix.h.

#define mat6_default   mat6_identity

Definition at line 1505 of file Matrix.h.

#define MATRIX_EPSILON   1e-6

Definition at line 41 of file Matrix.h.

#define MATRIX_INVERSE_EPSILON   1e-14

Definition at line 40 of file Matrix.h.

#define MATX_ALLOCA (   n)    ( (float *) _alloca16( MATX_QUAD( n ) ) )

Definition at line 1783 of file Matrix.h.

#define MATX_CLEAREND ( )    int s = numRows * numColumns; while( s < ( ( s + 3 ) & ~3 ) ) { mat[s++] = 0.0f; }

Definition at line 1782 of file Matrix.h.

#define MATX_MAX_TEMP   1024

Definition at line 1780 of file Matrix.h.

#define MATX_QUAD (   x)    ( ( ( ( x ) + 3 ) & ~3 ) * sizeof( float ) )

Definition at line 1781 of file Matrix.h.

#define MATX_SIMD

Definition at line 1784 of file Matrix.h.

Function Documentation

ID_INLINE idVec2 operator* ( const idVec2 vec,
const idMat2 mat 
)

Definition at line 209 of file Matrix.h.

ID_INLINE idMat2 operator* ( const float  a,
idMat2 const mat 
)

Definition at line 213 of file Matrix.h.

ID_INLINE idVec3 operator* ( const idVec3 vec,
const idMat3 mat 
)

Definition at line 544 of file Matrix.h.

ID_INLINE idMat3 operator* ( const float  a,
const idMat3 mat 
)

Definition at line 548 of file Matrix.h.

ID_INLINE idMat4 operator* ( const float  a,
const idMat4 mat 
)

Definition at line 991 of file Matrix.h.

ID_INLINE idVec4 operator* ( const idVec4 vec,
const idMat4 mat 
)

Definition at line 995 of file Matrix.h.

ID_INLINE idVec3 operator* ( const idVec3 vec,
const idMat4 mat 
)

Definition at line 999 of file Matrix.h.

ID_INLINE idVec5 operator* ( const idVec5 vec,
const idMat5 mat 
)

Definition at line 1325 of file Matrix.h.

ID_INLINE idMat5 operator* ( const float  a,
idMat5 const mat 
)

Definition at line 1329 of file Matrix.h.

ID_INLINE idVec6 operator* ( const idVec6 vec,
const idMat6 mat 
)

Definition at line 1642 of file Matrix.h.

ID_INLINE idMat6 operator* ( const float  a,
idMat6 const mat 
)

Definition at line 1646 of file Matrix.h.

ID_INLINE idMatX operator* ( const float  a,
idMatX const m 
)

Definition at line 2198 of file Matrix.h.

ID_INLINE idVecX operator* ( const idVecX vec,
const idMatX m 
)

Definition at line 2202 of file Matrix.h.

ID_INLINE idVec2& operator*= ( idVec2 vec,
const idMat2 mat 
)

Definition at line 217 of file Matrix.h.

ID_INLINE idVec3& operator*= ( idVec3 vec,
const idMat3 mat 
)

Definition at line 552 of file Matrix.h.

ID_INLINE idVec4& operator*= ( idVec4 vec,
const idMat4 mat 
)

Definition at line 1003 of file Matrix.h.

ID_INLINE idVec3& operator*= ( idVec3 vec,
const idMat4 mat 
)

Definition at line 1008 of file Matrix.h.

ID_INLINE idVec5& operator*= ( idVec5 vec,
const idMat5 mat 
)

Definition at line 1333 of file Matrix.h.

ID_INLINE idVec6& operator*= ( idVec6 vec,
const idMat6 mat 
)

Definition at line 1650 of file Matrix.h.

ID_INLINE idVecX& operator*= ( idVecX vec,
const idMatX m 
)

Definition at line 2206 of file Matrix.h.

ID_INLINE idMat3 SkewSymmetric ( idVec3 const src)

Definition at line 741 of file Matrix.h.

ID_INLINE void TransposeMultiply ( const idMat3 transpose,
const idMat3 b,
idMat3 dst 
)

Definition at line 729 of file Matrix.h.

Variable Documentation

idMat2 mat2_identity
idMat2 mat2_zero
idMat3 mat3_identity
idMat3 mat3_zero
idMat4 mat4_identity
idMat4 mat4_zero
idMat5 mat5_identity
idMat5 mat5_zero
idMat6 mat6_identity
idMat6 mat6_zero