Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

gslib::glsl_math::InverseCalc< Mat > Struct Template Reference

#include <glsl_math.h>

List of all members.

Static Public Member Functions

Mat calc (const Mat &m)

template<typename Mat>
struct gslib::glsl_math::InverseCalc< Mat >


Member Function Documentation

template<typename Mat>
Mat gslib::glsl_math::InverseCalc< Mat >::calc const Mat &  m  )  [inline, static]
 

Definition at line 659 of file glsl_math.h.

References gslib::glsl_math::cofactor(), and gslib::glsl_math::det().

00659                                             {
00660                 Mat result;
00661                 float invDetM = 1.0f / det( m );
00662                 for ( Mat::size_type i = 0; i < Mat::columnSize(); ++i ) {
00663                     for ( Mat::size_type j = 0; j < Mat::rowSize(); ++j ) {
00664                         result[ i ][ j ] = ( ( 0 == ( ( i + j ) & 1 ) ) ? invDetM : -invDetM ) * cofactor( m, j, i );
00665                     }
00666                 }
00667                 return result;
00668             }

Here is the call graph for this function:


The documentation for this struct was generated from the following file:
Generated on Fri Dec 24 00:52:30 2004 for glsl_math by doxygen 1.3.6