|
Vector4 | getColumn (size_t index) const |
| Gets the column of a matrix.
|
|
optional< Vector3 > | getRotationAngle () const |
| Calculates Euler rotation angles of the matrix.
|
|
Vector4 | getRow (size_t index) const |
| Gets the row of a matrix.
|
|
Vector3 | getScale () const |
| Get scale as a vector.
|
|
Vector3 | getTranslation () const |
| Get translation.
|
|
float | getTranslationX () const |
| Get translation on X axis.
|
|
float | getTranslationY () const |
| Get translation on Y axis.
|
|
float | getTranslationZ () const |
| Get translation on Z axis.
|
|
Vector3 | getXAxis () const |
| Get X axis.
|
|
Vector3 | getYAxis () const |
| Get Y axis.
|
|
Vector3 | getZAxis () const |
| Get Z axis.
|
|
| Matrix4x4 () |
| Default constructor, initializes the matrix to identity matrix.
|
|
| Matrix4x4 (const Vector3 &x, const Vector3 &y, const Vector3 &z, const Vector3 &translation) |
| Constructs the matrix from four column vectors.
|
|
| Matrix4x4 (const Vector4 &x, const Vector4 &y, const Vector4 &z, const Vector4 &translation) |
| Constructs the matrix from four column vectors.
|
|
| Matrix4x4 (float x0, float x1, float x2, float x3, float x4, float x5, float x6, float x7, float x8, float x9, float x10, float x11, float x12, float x13, float x14, float x15) |
| Constructs the matrix from elements in column-major order.
|
|
Vector3 | operator* (const Vector3 &vector) const |
| Multiply a 3-component vector with this matrix.
|
|
Vector4 | operator* (const Vector4 &vector) const |
| Multiply a 4-component vector with this matrix.
|
|
Matrix4x4 & | operator*= (const Matrix4x4 &m) |
| Modifies this matrix by multiplying it with another matrix.
|
|
Matrix4x4 & | operator+= (const Matrix4x4 &v) |
| Modifies this matrix by adding another matrix.
|
|
Matrix4x4 & | operator-= (const Matrix4x4 &v) |
| Modifies this matrix by subtracting another matrix from this matrix.
|
|
float & | operator[] (size_t index) |
| Access to individual elements of the matrix.
|
|
const float & | operator[] (size_t index) const |
| Access to individual elements of the matrix.
|
|
void | scale (const Vector3 &scale) |
| Scales this matrix.
|
|
void | scaleUniform (float scale) |
| Scales this matrix.
|
|
void | setColumn (size_t index, const Vector4 &column) |
| Sets the column of a matrix.
|
|
void | setRow (size_t index, const Vector4 &row) |
| Sets the row of a matrix.
|
|
void | setTranslation (Vector3 translation) |
| Set translation.
|
|
void | setTranslationX (float translationX) |
| Set translation on X axis.
|
|
void | setTranslationY (float translationY) |
| Set translation on Y axis.
|
|
void | setTranslationZ (float translationZ) |
| Set translation on Z axis.
|
|
void | setXAxis (Vector3 v) |
| Set X axis.
|
|
void | setYAxis (Vector3 v) |
| Set Y axis.
|
|
void | setZAxis (Vector3 v) |
| Set Z axis.
|
|
void | translate (const Vector3 &translate) |
| Translates this matrix.
|
|
Matrix4x4 | transposed () const |
| Applies a transpose to a matrix.
|
|
|
static Matrix4x4 | createFilled (float value) |
| Creates a matrix with all elements set to value .
|
|
static Matrix4x4 | createFromHomogenousMatrix (const Matrix3x3 &matrix) |
| Creates a matrix from an existing homogeneous matrix.
|
|
static Matrix4x4 | createFromHomogenousMatrix (const Matrix3x3 &matrix, float zTranslation) |
| Creates a matrix from an existing homogeneous matrix and Z translation.
|
|
static Matrix4x4 | createIdentity () |
| Creates identity matrix.
|
|
static optional< Matrix4x4 > | createLookAtMatrix (Vector3 position, Vector3 lookAtPoint, Vector3 upVector) |
| Creates a lookup transformation matrix, so that it is in a given position looking at the given point.
|
|
static Matrix4x4 | createOrthogonalProjection (float left, float right, float bottom, float top, float near, float far) |
| Creates projection matrix for orthogonal projection.
|
|
static Matrix4x4 | createPerspectiveProjection (float near, float far, FieldOfViewType fovType, float fovInDegrees, float aspectRatio) |
| Creates a perspective projection matrix for a symmetrical viewing volume.
|
|
static Matrix4x4 | createPerspectiveProjection (float near, float far, Vector4 fovInDegrees) |
| Creates a perspective projection matrix for a viewing volume.
|
|
static Matrix4x4 | createRotation (float angleInRadians, Vector3 rotationAxis) |
| Creates a rotation matrix over an arbitrary axis.
|
|
static Matrix4x4 | createRotationInDegrees (float angleInDegrees, Vector3 rotationAxis) |
| Creates a rotation matrix over an arbitrary axis.
|
|
static Matrix4x4 | createScale (Vector3 scale) |
| Creates a scaling matrix.
|
|
static Matrix4x4 | createSRT (Vector3 scale, Vector3 rotationInRadians, Vector3 translation) |
| Create an SRT matrix.
|
|
static Matrix4x4 | createSubProjection (const Matrix4x4 &projection, float relativeOffsetX, float relativeOffsetY, float relativeSizeX, float relativeSizeY) |
| Calculate sub-quad projection of an existing projection matrix.
|
|
static Matrix4x4 | createTranslation (float x, float y, float z) |
| Creates translation matrix.
|
|
static Matrix4x4 | createTranslation (Vector3 translation) |
| Creates translation matrix.
|
|
static Matrix4x4 | createXRotationInDegrees (float angleInDegrees) |
| Creates a X rotation matrix.
|
|
static Matrix4x4 | createXRotationInRadians (float angleInRadians) |
| Creates a X rotation matrix.
|
|
static Matrix4x4 | createYRotationInDegrees (float angleInDegrees) |
| Creates a Y rotation matrix.
|
|
static Matrix4x4 | createYRotationInRadians (float angleInRadians) |
| Creates a Y rotation matrix.
|
|
static Matrix4x4 | createZRotationInDegrees (float angleInDegrees) |
| Creates a Z rotation matrix.
|
|
static Matrix4x4 | createZRotationInRadians (float angleInRadians) |
| Creates a Z rotation matrix.
|
|
Matrix with 4x4 elements.
Calculate sub-quad projection of an existing projection matrix.
This is a specific solution for an axis-aligned case.
Old projection matrix = [P00 0 P02 P03] [ 0 P11 P12 P13] [ 0 0 P22 P23] [ 0 0 -1 0]
Traslated and scaled: (x, y) |--> (Ox, Oy) + (Sx * x, Sy * y) [Sx P00, 0, Ox P22 + Sx P02, Ox P23] [ 0, Sy P11, Oy P22 + Sy P12, Oy P23] [ 0, 0, P22, P23] [ 0, 0, -1, 0]
- Parameters
-
projection | Projection matrix. |
relativeOffsetX | X offset of sub-quad as portion of the size of the projection area. |
relativeOffsetY | Y offset of sub-quad as portion of the size of the projection area. |
relativeSizeX | Projection area X size in regard to sub-quad area size. |
relativeSizeY | Projection area Y size in regard to sub-quad area size. |
- Returns
- Modified projection matrix.