Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/linmath/lmatrix4_src.I File Reference

Go to the source code of this file.

Defines

#define VECTOR4_MATRIX4_PRODUCT(v_res, v, mat)
#define MATRIX4_PRODUCT(res, a, b)
#define SWAP__(x, y)   { FLOATTYPE temp = (x); (x) = (y); (y) = temp;}

Functions

INLINE_LINMATH const FLOATNAME (LMatrix4)&FLOATNAME(LMatrix4)
 Sorts matrices lexicographically, componentwise.

INLINE_LINMATH FLOATNAME (LMatrix3) FLOATNAME(LMatrix4)
 Retrieves the upper 3x3 submatrix.

INLINE_LINMATH FLOATNAME (LVecBase4) FLOATNAME(LMatrix4)
 Retrieves the indicated row of the matrix as a 4-component vector.

INLINE_LINMATH FLOATNAME (LVecBase3) FLOATNAME(LMatrix4)
 Retrieves the row column of the matrix as a 3-component vector, ignoring the last column.


Detailed Description

Definition in file lmatrix4_src.I.


Define Documentation

#define MATRIX4_PRODUCT res,
a,
 ) 
 

Value:

res._m.m._00 = a._m.m._00*b._m.m._00 + a._m.m._01*b._m.m._10 + a._m.m._02*b._m.m._20 + a._m.m._03*b._m.m._30;   \
res._m.m._01 = a._m.m._00*b._m.m._01 + a._m.m._01*b._m.m._11 + a._m.m._02*b._m.m._21 + a._m.m._03*b._m.m._31;   \
res._m.m._02 = a._m.m._00*b._m.m._02 + a._m.m._01*b._m.m._12 + a._m.m._02*b._m.m._22 + a._m.m._03*b._m.m._32;   \
res._m.m._03 = a._m.m._00*b._m.m._03 + a._m.m._01*b._m.m._13 + a._m.m._02*b._m.m._23 + a._m.m._03*b._m.m._33;   \
                                                                   \
res._m.m._10 = a._m.m._10*b._m.m._00 + a._m.m._11*b._m.m._10 + a._m.m._12*b._m.m._20 + a._m.m._13*b._m.m._30;   \
res._m.m._11 = a._m.m._10*b._m.m._01 + a._m.m._11*b._m.m._11 + a._m.m._12*b._m.m._21 + a._m.m._13*b._m.m._31;   \
res._m.m._12 = a._m.m._10*b._m.m._02 + a._m.m._11*b._m.m._12 + a._m.m._12*b._m.m._22 + a._m.m._13*b._m.m._32;   \
res._m.m._13 = a._m.m._10*b._m.m._03 + a._m.m._11*b._m.m._13 + a._m.m._12*b._m.m._23 + a._m.m._13*b._m.m._33;   \
                                                                   \
res._m.m._20 = a._m.m._20*b._m.m._00 + a._m.m._21*b._m.m._10 + a._m.m._22*b._m.m._20 + a._m.m._23*b._m.m._30;   \
res._m.m._21 = a._m.m._20*b._m.m._01 + a._m.m._21*b._m.m._11 + a._m.m._22*b._m.m._21 + a._m.m._23*b._m.m._31;   \
res._m.m._22 = a._m.m._20*b._m.m._02 + a._m.m._21*b._m.m._12 + a._m.m._22*b._m.m._22 + a._m.m._23*b._m.m._32;   \
res._m.m._23 = a._m.m._20*b._m.m._03 + a._m.m._21*b._m.m._13 + a._m.m._22*b._m.m._23 + a._m.m._23*b._m.m._33;   \
                                                                   \
res._m.m._30 = a._m.m._30*b._m.m._00 + a._m.m._31*b._m.m._10 + a._m.m._32*b._m.m._20 + a._m.m._33*b._m.m._30;   \
res._m.m._31 = a._m.m._30*b._m.m._01 + a._m.m._31*b._m.m._11 + a._m.m._32*b._m.m._21 + a._m.m._33*b._m.m._31;   \
res._m.m._32 = a._m.m._30*b._m.m._02 + a._m.m._31*b._m.m._12 + a._m.m._32*b._m.m._22 + a._m.m._33*b._m.m._32;   \
res._m.m._33 = a._m.m._30*b._m.m._03 + a._m.m._31*b._m.m._13 + a._m.m._32*b._m.m._23 + a._m.m._33*b._m.m._33;

Definition at line 782 of file lmatrix4_src.I.

#define SWAP__ x,
y   )     { FLOATTYPE temp = (x); (x) = (y); (y) = temp;}
 

#define VECTOR4_MATRIX4_PRODUCT v_res,
v,
mat   ) 
 

Value:

v_res._v.v._0 = v._v.v._0*mat._m.m._00 + v._v.v._1*mat._m.m._10 + v._v.v._2*mat._m.m._20 + v._v.v._3*mat._m.m._30;   \
v_res._v.v._1 = v._v.v._0*mat._m.m._01 + v._v.v._1*mat._m.m._11 + v._v.v._2*mat._m.m._21 + v._v.v._3*mat._m.m._31;   \
v_res._v.v._2 = v._v.v._0*mat._m.m._02 + v._v.v._1*mat._m.m._12 + v._v.v._2*mat._m.m._22 + v._v.v._3*mat._m.m._32;   \
v_res._v.v._3 = v._v.v._0*mat._m.m._03 + v._v.v._1*mat._m.m._13 + v._v.v._2*mat._m.m._23 + v._v.v._3*mat._m.m._33;

Definition at line 675 of file lmatrix4_src.I.


Function Documentation

INLINE_LINMATH FLOATNAME LVecBase3   ) 
 

Retrieves the row column of the matrix as a 3-component vector, ignoring the last column.

This assumes the matrix is an affine transform.

Definition at line 421 of file lmatrix4_src.I.

References FLOATTYPE, INLINE_LINMATH, int(), and nassertr.

INLINE_LINMATH FLOATNAME LVecBase4   ) 
 

Retrieves the indicated row of the matrix as a 4-component vector.

This is a fully general operation.

Definition at line 377 of file lmatrix4_src.I.

References FLOATNAME, INLINE_LINMATH, and int().

INLINE_LINMATH FLOATNAME LMatrix3   )  const
 

Retrieves the upper 3x3 submatrix.

Definition at line 289 of file lmatrix4_src.I.

References FLOATNAME, INLINE_LINMATH, and int().

INLINE_LINMATH const FLOATNAME LMatrix4   ) 
 

Sorts matrices lexicographically, componentwise.

This function definition must appear first, since some inline functions below take advantage of it.

Definition at line 36 of file lmatrix4_src.I.

References FLOATNAME, and INLINE_LINMATH.


Generated on Fri May 2 00:45:51 2003 for Panda by doxygen1.3