#include <matrix4x4.h>
Assumes matrix is affine - including affine code now. This means that the bottow row of the matrix should be [0 0 0 1]
Public Member Functions | |
| Matrix4x4 () | |
| Constructor just creates identity matrix. | |
| ~Matrix4x4 () | |
| Empty destructor. | |
| Matrix4x4 (const Matrix4x4 &other) | |
| Copy constructor. | |
| Matrix4x4 & | operator= (const Matrix4x4 &other) |
| Equal, like copy. | |
| Matrix4x4 | operator+ (const Matrix4x4 &other) const |
| Adding time. | |
| Matrix4x4 & | operator+= (const Matrix4x4 &other) |
| Adding again. | |
| Matrix4x4 | operator- (const Matrix4x4 &other) const |
| Subtracting is fun too. | |
| Matrix4x4 & | operator-= (const Matrix4x4 &other) |
| More subtracting. | |
| Matrix4x4 | operator * (const float other) const |
| Multiplication of scalar is simple. | |
| Matrix4x4 & | operator *= (const float other) |
| More multiplication. | |
| Matrix4x4 | operator * (const Matrix4x4 &o) const |
| Multiplication operator. | |
| Matrix4x4 & | operator *= (const Matrix4x4 &o) |
| Multiplication operator. | |
| float & | operator() (unsigned int i, unsigned int j) |
| Indexing operator. | |
| float | operator() (unsigned int i, unsigned int j) const |
| Indexing operator. | |
| bool | operator== (Matrix4x4 &other) |
| Comparator. | |
| bool | operator!= (Matrix4x4 &other) |
| Comparator. | |
| bool | isAffine (void) |
| This checks if matrix is affine. | |
| void | scale (float xin, float yin, float zin) |
| Multiply the matrix by a scaling affine. | |
| void | trans (float xin, float yin, float zin) |
| Multiply the matrix by a translation affine. | |
| void | rotate (float xin, float yin, float zin) |
| Multiply the matrix by a rotation affine. | |
| void | scale (Vec4 in) |
| Multiply the matrix by a scaling affine. | |
| void | trans (Vec4 in) |
| Multiply the matrix by a translation affine. | |
| void | rotate (Vec4 in) |
| Multiply the matrix by a rotation affine. | |
| void | rotX (float in) |
| Multiply the matrix by a rotation affine about X. | |
| void | rotY (float in) |
| Multiply the matrix by a rotation affine about Y. | |
| void | rotZ (float in) |
| Multiply the matrix by a rotation affine about Z. | |
| void | makeScale (float xin, float yin, float zin) |
| Create a scaling affine. | |
| void | makeTrans (float xin, float yin, float zin) |
| Create a translation affine. | |
| void | makeRotate (float xin, float yin, float zin) |
| Create a rotation affine. | |
| void | makeScale (Vec4 in) |
| Create scaling matrix (from Vec4). | |
| void | makeRotate (Vec4 in) |
| Create a rotation affine (from Vec4). | |
| void | makeRotX (float in) |
| Create a rotation affine about X. | |
| void | makeRotY (float in) |
| Create a rotation affine about Y. | |
| void | makeRotZ (float in) |
| Create a rotation affine about Z. | |
| void | invert (void) |
| Inverts a matrix on itself. | |
| void | transpose (void) |
| Transpose the 4x4 matrix. | |
| void | Identity (void) |
| Sets the matrix to an identity matrix. | |
| void | Zero (void) |
| Sets the whole matrix to zero. | |
| void | Print (void) |
| Print matrix to cout. | |
| void | Clean (void) |
| Replace all near-zero values with zero. | |
Public Attributes | |
| float | m [16] |
| The matrix itself is publically available, so can be passed to OpenGL easily. | |
|
|
This checks if matrix is affine. In this case this means checking the bottom row for the assumptions that we make.
|
Here is the call graph for this function:

|
|
Multiplication operator. WARNING: Assumes affine matrix. |
|
|
Multiplication operator. WARNING: Assumes affine matrix. |
|
|
Comparator. Iterates through the matrix, checking for an exact match.
|
Here is the call graph for this function:

|
||||||||||||
|
Indexing operator. This takes indices into the matrix and returns a copy of the correct cell. This solves the problem of the arry being stored in a human-unfriendly column-major format.
|
|
||||||||||||
|
Indexing operator. This takes indices into the matrix and returns a reference to the correct cell. This solves the problem of the arry being stored in a human-unfriendly column-major format.
|
|
|
Comparator. Iterates through the matrix, checking for an exact match.
|
Here is the call graph for this function:

|
|
Transpose the 4x4 matrix. No assumptions made. |
1.3.9.1