MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Namespaces | Functions
matrix_tools.h File Reference
#include <algorithm>
#include "math/defines.h"
#include "math/matrix.h"
#include "math/vector.h"
Include dependency graph for matrix_tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  math
 Vector, Matrix, basic operations, etc.
 

Functions

template<typename T >
math::matrix_determinant (Matrix< T, 1, 1 > const &mat)
 
template<typename T >
math::matrix_determinant (Matrix< T, 2, 2 > const &mat)
 
template<typename T >
math::matrix_determinant (Matrix< T, 3, 3 > const &m)
 
template<typename T >
math::matrix_determinant (Matrix< T, 4, 4 > const &m)
 
template<typename T , int N>
math::matrix_determinant (Matrix< T, N, N > const &mat)
 Calculates the determinant of the given matrix.
 
template<typename T , int N>
Matrix< T, N, N > math::matrix_from_diagonal (math::Vector< T, N > const &v)
 Returns a diagonal matrix from the given vector.
 
template<typename T , int N>
Vector< T, N > math::matrix_get_diagonal (Matrix< T, N, N > const &mat)
 Returns the diagonal elements of the matrix as a vector.
 
template<typename T >
Matrix< T, 4, 4 > math::matrix_gl_projection (T const &znear, T const &zfar, T const &top, T const &right)
 Creates a symmetric projection matrix as used in OpenGL.
 
template<typename T >
Matrix< T, 1, 1 > math::matrix_inverse (Matrix< T, 1, 1 > const &, T const &det)
 
template<typename T >
Matrix< T, 1, 1 > math::matrix_inverse (Matrix< T, 1, 1 > const &mat)
 
template<typename T >
Matrix< T, 2, 2 > math::matrix_inverse (Matrix< T, 2, 2 > const &mat)
 
template<typename T >
Matrix< T, 2, 2 > math::matrix_inverse (Matrix< T, 2, 2 > const &mat, T const &det)
 
template<typename T >
Matrix< T, 3, 3 > math::matrix_inverse (Matrix< T, 3, 3 > const &m)
 
template<typename T >
Matrix< T, 3, 3 > math::matrix_inverse (Matrix< T, 3, 3 > const &m, T const &det)
 
template<typename T >
Matrix< T, 4, 4 > math::matrix_inverse (Matrix< T, 4, 4 > const &m)
 
template<typename T , int N>
Matrix< T, N, N > math::matrix_inverse (Matrix< T, N, N > const &mat)
 Calculates the inverse of the given matrix.
 
template<typename T , int N>
Matrix< T, N, N > math::matrix_inverse (Matrix< T, N, N > const &mat, T const &det)
 Calculates the inverse of the given matrix given its determinant.
 
template<typename T >
Matrix< T, 4, 4 > math::matrix_inverse_gl_projection (T const &znear, T const &zfar, T const &top, T const &right)
 Creates a symmetric inverse projection matrix as used in OpenGL.
 
template<typename T >
Matrix< T, 4, 4 > math::matrix_inverse_viewtrans (Vector< T, 3 > const &campos, Vector< T, 3 > const &viewdir, Vector< T, 3 > const &upvec)
 Creates an inverse view transformation matrix.
 
template<typename T >
Matrix< T, 4, 4 > math::matrix_invert_trans (Matrix< T, 4, 4 > const &mat)
 Inverts a transformation matrix.
 
template<typename T >
bool math::matrix_is_diagonal (T *const mat, int rows, int cols, T const &epsilon=T(0))
 Checks whether the input matrix is a diagonal matrix.
 
template<typename T , int N>
bool math::matrix_is_identity (Matrix< T, N, N > const &mat, T const &epsilon=T(0))
 Returns true if and only if the given matrix is the identity matrix.
 
template<typename T >
void math::matrix_multiply (T const *mat_a, int rows_a, int cols_a, T const *mat_b, int cols_b, T *mat_res)
 Matrix multiplication of dynamically sized dense matrices.
 
template<typename T , int N>
Matrix< T, N, N > math::matrix_rotate_180 (Matrix< T, N, N > const &mat_a)
 Rotates the entries of the given matrix by 180 degrees.
 
template<typename T , int N>
void math::matrix_rotate_180_inplace (Matrix< T, N, N > *mat_a)
 Rotates the entries of the given matrix by 180 degrees in-place.
 
template<typename T >
Matrix< T, 3, 3 > math::matrix_rotation_from_axis_angle (Vector< T, 3 > const &axis, T const &angle)
 Computes the 3x3 rotation matrix from axis and angle notation.
 
template<typename T , int N>
Matrix< T, N, N > & math::matrix_set_diagonal (Matrix< T, N, N > &mat, T const *diag)
 Sets the diagonal elements of the given matrix.
 
template<typename T , int N>
Matrix< T, N, N > & math::matrix_set_identity (Matrix< T, N, N > *mat)
 Sets the given square matrix to the identity matrix.
 
template<typename T >
T * math::matrix_set_identity (T *mat, int n)
 Sets the given square matrix of dimension 'n' to the identity matrix.
 
template<typename T >
void math::matrix_swap_columns (T *const mat, int rows, int cols, int c1, int c2)
 Swaps the columns c1 and c2 of matrix mat with dimension rows, cols.
 
template<typename T >
void math::matrix_swap_rows (T *mat, int rows, int cols, int r1, int r2)
 Swaps the rows r1 and r2 of matrix mat with dimension rows, cols.
 
template<typename T , int N>
math::matrix_trace (math::Matrix< T, N, N > const &mat)
 Calculates the trace of the given matrix.
 
template<typename T >
void math::matrix_transpose (T *mat, int rows, int cols)
 
template<typename T >
void math::matrix_transpose (T const *mat, int rows, int cols)
 In-place transpose of a dynamically sized dense matrix.
 
template<typename T >
void math::matrix_transpose_multiply (T const *mat_a, int rows, int cols, T *mat_res)
 Matrix multiplication of the transposed with itself.
 
template<typename T >
Matrix< T, 4, 4 > math::matrix_viewtrans (Vector< T, 3 > const &campos, Vector< T, 3 > const &viewdir, Vector< T, 3 > const &upvec)
 Creates a view transformation matrix for camera parameters given as camera position, normalized viewing direction, and normalized up-vector.