GLM 0.9.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Files

Functions
Matrix functions
GLM Core

## Functions
template<typename T , precision P, template< typename, precision > class matType>
GLM_FUNC_DECL T | determinant (matType< T, P > const &m)
template<typename T , precision P, template< typename, precision > class matType>
GLM_FUNC_DECL matType< T, P > | inverse (matType< T, P > const &m)
template<typename T , precision P, template< typename, precision > class matType>
GLM_FUNC_DECL matType< T, P > | matrixCompMult (matType< T, P > const &x, matType< T, P > const &y)
template<typename T , precision P, template< typename, precision > class vecTypeA, template< typename, precision > class vecTypeB>
GLM_FUNC_DECL void | outerProduct (vecTypeA< T, P > const &c, vecTypeB< T, P > const &r)

## Detailed Description

For each of the following built-in matrix functions, there is both a single-precision floating point version, where all arguments and return values are single precision, and a double-precision floating version, where all arguments and return values are double precision.

Only the single-precision floating point version is shown.

## Function Documentation

GLM_FUNC_DECL T glm::determinant | ( | matType< T, P > const & | m | ) |

Returns the transposed matrix of x.

Template Parameters

  matType | Floating-point matrix types.

See Also
  GLSL transpose man page
  GLSL 4.20.8 specification, section 8.6 Matrix Functions Return the determinant of a squared matrix.

Template Parameters

  valType | Floating-point scalar types.

See Also
  GLSL determinant man page
  GLSL 4.20.8 specification, section 8.6 Matrix Functions

GLM_FUNC_DECL matType<T, P> glm::inverse | ( | matType< T, P > const & | m | ) |

Return the inverse of a squared matrix.

Template Parameters

  valType | Floating-point scalar types.

See Also
  GLSL inverse man page
  GLSL 4.20.8 specification, section 8.6 Matrix Functions

GLM_FUNC_DECL matType<T, P> glm::matrixCompMult | ( | matType< T, P > const & | x,
|  | matType< T, P > const & | y
| ) |  |

Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j].

Template Parameters

  matType | Floating-point matrix types.

See Also
  GLSL matrixCompMult man page
  GLSL 4.20.8 specification, section 8.6 Matrix Functions

GLM_FUNC_DECL void glm::outerProduct | ( | vecTypeA< T, P > const & | c,
|  | vecTypeB< T, P > const & | r
| ) |  |

Treats the first parameter c as a column vector and the second parameter r as a row vector and does a linear algebraic matrix multiply c * r.

Template Parameters

  matType | Floating-point matrix types.

See Also
  GLSL outerProduct man page
  GLSL 4.20.8 specification, section 8.6 Matrix Functions

Todo:
  Clarify the declaration to specify that matType doesn't have to be provided when used.