#include <iostream>
#include <algorithm>
#include <gmtl/Matrix.h>
#include <gmtl/Math.h>
#include <gmtl/Vec.h>
#include <gmtl/VecOps.h>
#include <gmtl/Util/Assert.h>
Go to the source code of this file.
Namespaces | |
namespace | gmtl |
Meta programming classes. | |
Functions | |
Matrix Operations | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::identity (Matrix< DATA_TYPE, ROWS, COLS > &result) |
Make identity matrix out the matrix. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::zero (Matrix< DATA_TYPE, ROWS, COLS > &result) |
zero out the matrix. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned INTERNAL, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::mult (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, INTERNAL > &lhs, const Matrix< DATA_TYPE, INTERNAL, COLS > &rhs) |
matrix multiply. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned INTERNAL, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > | gmtl::operator* (const Matrix< DATA_TYPE, ROWS, INTERNAL > &lhs, const Matrix< DATA_TYPE, INTERNAL, COLS > &rhs) |
matrix * matrix. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::sub (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &lhs, const Matrix< DATA_TYPE, ROWS, COLS > &rhs) |
matrix subtraction (algebraic operation for matrix). | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::add (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &lhs, const Matrix< DATA_TYPE, ROWS, COLS > &rhs) |
matrix addition (algebraic operation for matrix). | |
template<typename DATA_TYPE , unsigned SIZE> | |
Matrix< DATA_TYPE, SIZE, SIZE > & | gmtl::postMult (Matrix< DATA_TYPE, SIZE, SIZE > &result, const Matrix< DATA_TYPE, SIZE, SIZE > &operand) |
matrix postmultiply. | |
template<typename DATA_TYPE , unsigned SIZE> | |
Matrix< DATA_TYPE, SIZE, SIZE > & | gmtl::preMult (Matrix< DATA_TYPE, SIZE, SIZE > &result, const Matrix< DATA_TYPE, SIZE, SIZE > &operand) |
matrix preMultiply. | |
template<typename DATA_TYPE , unsigned SIZE> | |
Matrix< DATA_TYPE, SIZE, SIZE > & | gmtl::operator*= (Matrix< DATA_TYPE, SIZE, SIZE > &result, const Matrix< DATA_TYPE, SIZE, SIZE > &operand) |
matrix postmult (operator*=). | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::mult (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &mat, const DATA_TYPE &scalar) |
matrix scalar mult. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::mult (Matrix< DATA_TYPE, ROWS, COLS > &result, DATA_TYPE scalar) |
matrix scalar mult. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::operator*= (Matrix< DATA_TYPE, ROWS, COLS > &result, const DATA_TYPE &scalar) |
matrix scalar mult (operator*=). | |
template<typename DATA_TYPE , unsigned SIZE> | |
Matrix< DATA_TYPE, SIZE, SIZE > & | gmtl::transpose (Matrix< DATA_TYPE, SIZE, SIZE > &result) |
matrix transpose in place. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::transpose (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, COLS, ROWS > &source) |
matrix transpose from one type to another (i.e. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::invertTrans (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &src) |
translational matrix inversion. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::invertOrthogonal (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &src) |
orthogonal matrix inversion. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::invertAffine (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &source) |
affine matrix inversion. | |
template<typename DATA_TYPE , unsigned SIZE> | |
Matrix< DATA_TYPE, SIZE, SIZE > & | gmtl::invertFull_GJ (Matrix< DATA_TYPE, SIZE, SIZE > &result, const Matrix< DATA_TYPE, SIZE, SIZE > &src) |
Full matrix inversion using Gauss-Jordan elimination. | |
template<typename DATA_TYPE , unsigned SIZE> | |
Matrix< DATA_TYPE, SIZE, SIZE > & | gmtl::invertFull_orig (Matrix< DATA_TYPE, SIZE, SIZE > &result, const Matrix< DATA_TYPE, SIZE, SIZE > &src) |
full matrix inversion. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::invertFull (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &src) |
Invert method. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::invert (Matrix< DATA_TYPE, ROWS, COLS > &result, const Matrix< DATA_TYPE, ROWS, COLS > &src) |
smart matrix inversion. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
Matrix< DATA_TYPE, ROWS, COLS > & | gmtl::invert (Matrix< DATA_TYPE, ROWS, COLS > &result) |
smart matrix inversion (in place) Does matrix inversion by intelligently selecting what type of inversion to use depending on the types of operations your Matrix has been through. | |
Matrix Comparitors | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
bool | gmtl::operator== (const Matrix< DATA_TYPE, ROWS, COLS > &lhs, const Matrix< DATA_TYPE, ROWS, COLS > &rhs) |
Tests 2 matrices for equality. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
bool | gmtl::operator!= (const Matrix< DATA_TYPE, ROWS, COLS > &lhs, const Matrix< DATA_TYPE, ROWS, COLS > &rhs) |
Tests 2 matrices for inequality. | |
template<typename DATA_TYPE , unsigned ROWS, unsigned COLS> | |
bool | gmtl::isEqual (const Matrix< DATA_TYPE, ROWS, COLS > &lhs, const Matrix< DATA_TYPE, ROWS, COLS > &rhs, const DATA_TYPE eps=0) |
Tests 2 matrices for equality within a tolerance. |