|
|
| Matrix4 () |
| | Default constructor creates an identity matrix.
|
| |
|
| Matrix4 (const T &r1c1, const T &r1c2, const T &r1c3, const T &r1c4, const T &r2c1, const T &r2c2, const T &r2c3, const T &r2c4, const T &r3c1, const T &r3c2, const T &r3c3, const T &r3c4, const T &r4c1, const T &r4c2, const T &r4c3, const T &r4c4) |
| |
|
| Matrix4 (const Vec< 3, T > &xaxis, const Vec< 3, T > &yaxis, const Vec< 3, T > &zaxis, const Vec< 3, T > &position) |
| |
| | Matrix4 (const T *src) |
| |
| | Matrix4 (const Mat< 4, T > &src) |
| |
|
Quat< T > | toQuat () const |
| | Get a quaternion representation.
|
| |
|
Matrix4 & | fromQuat (Quat< T > &q) |
| | Set from quaternion.
|
| |
|
Matrix4 & | fromQuatTransposed (Quat< T > &q) |
| |
| Vec< 4, T > | transform (const Vec< 4, T > &vCol) const |
| | Computes product of matrix multiplied by column vector, r = m * vCol. More...
|
| |
|
Vec< 4, T > | transform (const Vec< 3, T > &vCol) const |
| | Computes product of matrix multiplied by column vector, r = m * vCol.
|
| |
|
const double * | elems () const |
| | Get read-only pointer to elements.
|
| |
|
double * | elems () |
| | Get read-write pointer to elements.
|
| |
|
double & | operator[] (int i) |
| | Set element at index with no bounds checking.
|
| |
|
const double & | operator[] (int i) const |
| | Get element at index with no bounds checking.
|
| |
|
double & | operator() (int i, int j) |
| | Set element at row i, column j.
|
| |
|
const double & | operator() (int i, int j) const |
| | Get element at row i, column j.
|
| |
|
Vec< N, double > | col (int i) const |
| | Return column i as vector.
|
| |
|
Vec< N, double > | row (int i) const |
| | Return row i as vector.
|
| |
|
Vec< N, double > | diagonal () const |
| | Return diagonal.
|
| |
|
Mat & | transpose () |
| | Transpose elements.
|
| |
|
Mat< M, double > | sub (int row=0, int col=0) const |
| | Get an MxM submatrix.
|
| |
|
Mat< N - 1, double > | submatrix (int row, int col) const |
| | Returns a submatrix by removing one row and column.
|
| |
|
Vec< N *N, double > & | vec () |
| | Return matrix punned as a vector.
|
| |
|
Mat & | operator*= (const Mat &v) |
| |
|
Mat & | operator*= (const double &v) |
| |
|
Mat & | operator+= (const Mat &v) |
| |
|
Mat & | operator+= (const double &v) |
| |
|
Mat & | operator-= (const Mat &v) |
| |
|
Mat & | operator-= (const double &v) |
| |
|
Mat & | operator/= (const double &v) |
| |
|
Mat | operator- () const |
| |
|
Mat | operator- (const Mat &v) const |
| |
|
Mat | operator- (const double &v) const |
| |
|
Mat | operator+ (const Mat &v) const |
| |
|
Mat | operator+ (const double &v) const |
| |
|
Mat | operator* (const Mat &v) const |
| |
|
Mat | operator* (const double &v) const |
| |
|
Mat | operator/ (const double &v) const |
| |
|
Mat & | set (const double &v) |
| | Set all elements to value.
|
| |
|
Mat & | set (const Mat< N, U > &v) |
| | Set elements from another matrix.
|
| |
|
Mat & | set (const U *arr) |
| | Set elements in column-major order from C array.
|
| |
| Mat & | set (const U *arr, int numElements, int matOffset, int matStride=1) |
| | Set elements in column-major order from C array. More...
|
| |
|
Mat & | set (const double &r1c1, const double &r1c2, const double &r2c1, const double &r2c2, int row=0, int col=0) |
| | Set 2-by-2 (sub)matrix from arguments.
|
| |
|
Mat & | set (const double &r1c1, const double &r1c2, const double &r1c3, const double &r2c1, const double &r2c2, const double &r2c3, const double &r3c1, const double &r3c2, const double &r3c3, int row=0, int col=0) |
| | Set 3-by-3 (sub)matrix from arguments.
|
| |
|
Mat & | set (const double &r1c1, const double &r1c2, const double &r1c3, const double &r1c4, const double &r2c1, const double &r2c2, const double &r2c3, const double &r2c4, const double &r3c1, const double &r3c2, const double &r3c3, const double &r3c4, const double &r4c1, const double &r4c2, const double &r4c3, const double &r4c4, int row=0, int col=0) |
| | Set 4-by-4 (sub)matrix from arguments.
|
| |
|
Mat & | setCol2 (const double &v1, const double &v2, int col=0, int row=0) |
| | Set a (sub)column.
|
| |
|
Mat & | setCol3 (const double &v1, const double &v2, const double &v3, int col=0, int row=0) |
| | Set a (sub)column.
|
| |
|
Mat & | setCol4 (const double &v1, const double &v2, const double &v3, const double &v4, int col=0, int row=0) |
| | Set a (sub)column.
|
| |
|
Mat & | setIdentity () |
| | Set elements on diagonal to one and all others to zero.
|
| |
|
double | cofactor (int row, int col) const |
| | Get cofactor.
|
| |
|
Mat< N, double > | cofactorMatrix () const |
| | Get cofactor matrix.
|
| |
|
double | trace () const |
| | Get trace (sum of diagonal elements)
|
| |
|
Mat< N, double > | inversed () const |
| |
| Mat & | rotate (double angle, int dim1, int dim2) |
| | Rotate transformation matrix on a local plane (A' = AR) More...
|
| |
|
Mat & | rotateGlobal (double angle, int dim1, int dim2) |
| | Rotate submatrix on a global plane (A' = RA)
|
| |
|
Mat & | rotateGlobal (double angle, int dim1, int dim2) |
| | Rotate transformation matrix on a global plane (A' = RA)
|
| |
|
Mat & | scale (const Vec< N - 1, V > &amount) |
| | Scale transformation matrix.
|
| |
|
Mat & | scale (Vals... vals) |
| | Scale transformation matrix.
|
| |
|
Mat & | scaleGlobal (const Vec< N - 1, V > &amount) |
| | Scale transformation matrix global coordinates.
|
| |
|
Mat & | translate (const Vec< N - 1, V > &amount) |
| | Translate transformation matrix.
|
| |
|
Mat & | translate (const V &amount) |
| | Translate transformation matrix by same amount in all directions.
|
| |
|
Mat & | translate (Vals... vals) |
| | Translate transformation matrix.
|
| |
|
void | print (std::ostream &stream) const |
| | Print to file (stream)
|
| |
|
|
static Matrix4 | rotate (float angle, float x, float y, float z) |
| |
|
static Matrix4 | rotate (float angle, const Vec< 3, T > &v) |
| |
|
static Matrix4 | shearXY (T x, T y) |
| | Get a shear transformation matrix on the xy plane.
|
| |
|
static Matrix4 | shearYZ (T y, T z) |
| | Get a shear transformation matrix on the yz plane.
|
| |
|
static Matrix4 | shearZX (T z, T x) |
| | Get a shear transformation matrix on the zx plane.
|
| |
| static Matrix4 | perspective (T l, T r, T b, T t, T n, T f) |
| | Get a perspective projection matrix. More...
|
| |
| static Matrix4 | perspective (T fovy, T aspect, T near, T far) |
| | Get a perspective projection matrix. More...
|
| |
| static Matrix4 | perspective (const Vec< 3, T > &nearBL, const Vec< 3, T > &nearBR, const Vec< 3, T > &nearTL, const Vec< 3, T > &eye, T near, T far) |
| | Calculate perspective projection from near plane and eye coordinates. More...
|
| |
|
static Matrix4 | perspectiveLeft (T fovy, T aspect, T near, T far, T eyeSep, T focal) |
| | Get a left-eye perspective projection matrix (for stereographics)
|
| |
|
static Matrix4 | perspectiveRight (T fovy, T aspect, T near, T far, T eyeSep, T focal) |
| | Get a right-eye perspective projection matrix (for stereographics)
|
| |
|
static Matrix4 | perspectiveOffAxis (T fovy, T aspect, T near, T far, T xShift, T focal) |
| | Get an off-axis perspective projection matrix (for stereographics)
|
| |
| static Matrix4 | perspectiveOffAxis (T fovy, T aspect, T near, T far, T xShift, T yShift, T focal) |
| | Get an off-axis perspective projection matrix (for stereographics) More...
|
| |
|
static Matrix4 | unPerspective (T l, T r, T b, T t, T n, T f) |
| |
| static Matrix4 | ortho (T l, T r, T b, T t, T n, T f) |
| | Get an orthographic projection matrix. More...
|
| |
|
static Matrix4 | unOrtho (T l, T r, T b, T t, T n, T f) |
| |
| static Matrix4 | ortho2D (T l, T r, T b, T t) |
| | Get a two-dimensional orthographic projection matrix. More...
|
| |
| static Matrix4 | lookAt (const Vec< 3, T > &ur, const Vec< 3, T > &uu, const Vec< 3, T > &uf, const Vec< 3, T > &eyePos) |
| | Get a viewing matrix based on an eye reference frame. More...
|
| |
| static Matrix4 | lookAt (const Vec< 3, T > &eyePos, const Vec< 3, T > &at, const Vec< 3, T > &up) |
| | Get a viewing matrix based on look-at parameters. More...
|
| |
|
static Matrix4 | lookAtLeft (const Vec< 3, T > &ux, const Vec< 3, T > &uy, const Vec< 3, T > &uz, const Vec< 3, T > &pos, double eyeSep) |
| | Get a left-eye viewing matrix.
|
| |
|
static Matrix4 | lookAtRight (const Vec< 3, T > &ux, const Vec< 3, T > &uy, const Vec< 3, T > &uz, const Vec< 3, T > &pos, double eyeSep) |
| | Get a right-eye viewing matrix.
|
| |
|
static Matrix4 | lookAtOffAxis (const Vec< 3, T > &ux, const Vec< 3, T > &uy, const Vec< 3, T > &uz, const Vec< 3, T > &pos, double eyeShift) |
| | Get an off-axis viewing matrix.
|
| |
|
static Matrix4 | inverse (const Mat< 4, T > &m) |
| | Get the inverse of a matrix.
|
| |
|
static Matrix4 | translate (T x, T y, T z) |
| |
|
template<typename V > |
| static Matrix4 | translate (const Vec< 3, V > &v) |
| |
|
static Matrix4 | scale (T x, T y, T z) |
| |
|
template<typename V > |
| static Matrix4 | scale (const Vec< 3, V > &v) |
| |
|
template<typename V > |
| static Matrix4 | scale (const V &v) |
| |
|
static Matrix4 | rotateXY (T theta) |
| |
|
static Matrix4 | rotateYZ (T theta) |
| |
|
static Matrix4 | rotateZX (T theta) |
| |
|
static Mat | identity () |
| | Get identity matrix.
|
| |
|
static Mat | rotation (double angle, int dim1, int dim2) |
| | Get a rotation transform matrix.
|
| |
|
static Mat | scaling (const Vec< N - 1, V > &v) |
| | Get a scaling transform matrix.
|
| |
|
static Mat | scaling (V v) |
| | Get a scaling transform matrix.
|
| |
|
static Mat | scaling (Vals... vals) |
| | Get a scaling transform matrix.
|
| |
|
static Mat | translation (const Vec< N - 1, V > &v) |
| | Get a translation transform matrix.
|
| |
|
static Mat | translation (Vals... vals) |
| | Get a translation transform matrix.
|
| |
|
static Mat & | pun (double *src) |
| | Returns C array type punned into a matrix.
|
| |
|
static const Mat & | pun (const double *src) |
| |
|
static int | size () |
| | Returns total number of elements.
|
| |
| static Mat & | multiply (Mat &r, const Mat &a, const Mat &b) |
| | Computes matrix product r = a * b. More...
|
| |
|
static Vec< N, U > & | multiply (Vec< N, U > &r, const Mat &m, const Vec< N, U > &vCol) |
| | Computes product of matrix multiplied by column vector, r = m * vCol.
|
| |
|
static Vec< N, U > & | multiply (Vec< N, U > &r, const Vec< N, U > &vRow, const Mat &m) |
| | Computes product of row vector multiplied by matrix, r = vRow * m.
|
| |
template<typename T = double>
class al::Matrix4< T >
4x4 Matrix (Homogenous Transform)
Definition at line 63 of file al_Matrix4.hpp.