|
Ion
|
The Matrix class defines a square N-dimensional matrix. More...
#include "matrix.h"
Public Types | |
| enum | { kDimension = Dimension } |
| The dimension of the matrix (number of elements in a row or column). More... | |
| typedef T | ValueType |
Public Member Functions | |
| Matrix () | |
| The default constructor zero-initializes all elements. More... | |
| Matrix (T m00, T m01, T m10, T m11) | |
| Dimension-specific constructors that are passed individual element values. More... | |
| Matrix (T m00, T m01, T m02, T m10, T m11, T m12, T m20, T m21, T m22) | |
| Matrix (T m00, T m01, T m02, T m03, T m10, T m11, T m12, T m13, T m20, T m21, T m22, T m23, T m30, T m31, T m32, T m33) | |
| Matrix (const T array[Dimension *Dimension]) | |
| Constructor that reads elements from a linear array of the correct size. More... | |
| template<typename U > | |
| Matrix (const Matrix< Dimension, U > &other) | |
| Copy constructor from an instance of the same Dimension and any value type that is compatible (via static_cast) with this instance's type. More... | |
| T & | operator() (int row, int col) |
| Mutable element accessors. More... | |
| T * | operator[] (int row) |
| const T & | operator() (int row, int col) const |
| Read-only element accessors. More... | |
| const T * | operator[] (int row) const |
| T * | Data () |
| Return a pointer to the data for interfacing with libraries. More... | |
| const T * | Data () const |
| void | operator*= (T s) |
| Self-modifying multiplication operators. More... | |
| void | operator*= (const Matrix &m) |
| Matrix | operator- () const |
| Unary operators. More... | |
Static Public Member Functions | |
| static Matrix | Zero () |
| Returns a Matrix containing all zeroes. More... | |
| static Matrix | Identity () |
| Returns an identity Matrix. More... | |
Friends | |
| Matrix | operator* (const Matrix &m, T s) |
| Binary scale operators. More... | |
| Matrix | operator* (T s, const Matrix &m) |
| Matrix | operator+ (const Matrix &lhs, const Matrix &rhs) |
| Binary matrix addition. More... | |
| Matrix | operator- (const Matrix &lhs, const Matrix &rhs) |
| Binary matrix subtraction. More... | |
| Matrix | operator* (const Matrix &m0, const Matrix &m1) |
| Binary multiplication operator. More... | |
| bool | operator== (const Matrix &m0, const Matrix &m1) |
| Exact equality and inequality comparisons. More... | |
| bool | operator!= (const Matrix &m0, const Matrix &m1) |
The Matrix class defines a square N-dimensional matrix.
Elements are stored in row-major order.
| typedef T ion::math::Matrix< Dimension, T >::ValueType |
| anonymous enum |
|
inline |
| ion::math::Matrix< Dimension, T >::Matrix | ( | T | m00, |
| T | m01, | ||
| T | m10, | ||
| T | m11 | ||
| ) |
Dimension-specific constructors that are passed individual element values.
Implementation.
Definition at line 190 of file matrix.h.
References ION_STATIC_ASSERT.
| ion::math::Matrix< Dimension, T >::Matrix | ( | T | m00, |
| T | m01, | ||
| T | m02, | ||
| T | m10, | ||
| T | m11, | ||
| T | m12, | ||
| T | m20, | ||
| T | m21, | ||
| T | m22 | ||
| ) |
Definition at line 199 of file matrix.h.
References ION_STATIC_ASSERT.
| ion::math::Matrix< Dimension, T >::Matrix | ( | T | m00, |
| T | m01, | ||
| T | m02, | ||
| T | m03, | ||
| T | m10, | ||
| T | m11, | ||
| T | m12, | ||
| T | m13, | ||
| T | m20, | ||
| T | m21, | ||
| T | m22, | ||
| T | m23, | ||
| T | m30, | ||
| T | m31, | ||
| T | m32, | ||
| T | m33 | ||
| ) |
Definition at line 215 of file matrix.h.
References ION_STATIC_ASSERT.
|
explicit |
|
explicit |
|
inline |
|
inline |
|
static |
Returns an identity Matrix.
Definition at line 276 of file matrix.h.
Referenced by ion::math::OrthographicMatrixFromFrustum(), ion::math::PerspectiveMatrixFromFrustum(), and ion::math::PerspectiveMatrixFromView().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Returns a Matrix containing all zeroes.
Definition at line 266 of file matrix.h.
Referenced by ion::math::InverseWithDeterminant().