|
| constexpr Vector4 | getColumn (size_t index) const |
| | Gets the column of a matrix.
|
| |
| optional< Vector3 > | getRotationAngle () const |
| | Calculates Euler rotation angles of the matrix.
|
| |
| constexpr Vector4 | getRow (size_t index) const |
| | Gets the row of a matrix.
|
| |
| Vector3 | getScale () const |
| | Get scale as a vector.
|
| |
| constexpr Vector3 | getTranslation () const |
| | Get translation.
|
| |
| constexpr float | getTranslationX () const |
| | Get translation on X axis.
|
| |
| constexpr float | getTranslationY () const |
| | Get translation on Y axis.
|
| |
| constexpr float | getTranslationZ () const |
| | Get translation on Z axis.
|
| |
| constexpr Vector3 | getXAxis () const |
| | Get X axis.
|
| |
| constexpr Vector3 | getYAxis () const |
| | Get Y axis.
|
| |
| constexpr Vector3 | getZAxis () const |
| | Get Z axis.
|
| |
| constexpr | Matrix4x4 () |
| | Default constructor.
|
| |
| constexpr | Matrix4x4 (float value) |
| | Constructor.
|
| |
| constexpr | 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.
|
| |
| constexpr | Matrix4x4 (Vector3 x, Vector3 y, Vector3 z, Vector3 translation) |
| | Constructs the matrix from four column vectors.
|
| |
| constexpr | Matrix4x4 (Vector4 x, Vector4 y, Vector4 z, Vector4 translation) |
| | Constructs the matrix from four column vectors.
|
| |
| constexpr Vector3 | operator* (Vector3 rhs) const |
| | Multiply a 3-component vector with a 4x4 matrix.
|
| |
| constexpr Vector4 | operator* (Vector4 rhs) const |
| | Multiply a 4-component vector with a 4x4 matrix.
|
| |
| constexpr Matrix4x4 & | operator*= (const Matrix4x4 &m) |
| | Modifies this matrix by multiplying it with another matrix.
|
| |
| constexpr Matrix4x4 & | operator+= (const Matrix4x4 &v) |
| | Modifies this matrix by adding another matrix.
|
| |
| constexpr Matrix4x4 & | operator-= (const Matrix4x4 &v) |
| | Modifies this matrix by subtracting another matrix from this matrix.
|
| |
| constexpr float & | operator[] (size_t index) |
| | Access to individual elements of the matrix.
|
| |
| constexpr const float & | operator[] (size_t index) const |
| | Access to individual elements of the matrix.
|
| |
| constexpr void | scale (Vector3 scale) |
| | Scales this matrix.
|
| |
| constexpr void | scaleUniform (float scale) |
| | Scales this matrix.
|
| |
| constexpr void | setColumn (size_t index, Vector4 column) |
| | Sets the column of a matrix.
|
| |
| constexpr void | setRow (size_t index, Vector4 row) |
| | Sets the row of a matrix.
|
| |
| constexpr void | setTranslation (Vector3 translation) |
| | Set translation.
|
| |
| constexpr void | setTranslationX (float translationX) |
| | Set translation on X axis.
|
| |
| constexpr void | setTranslationY (float translationY) |
| | Set translation on Y axis.
|
| |
| constexpr void | setTranslationZ (float translationZ) |
| | Set translation on Z axis.
|
| |
| constexpr void | setXAxis (Vector3 v) |
| | Set X axis.
|
| |
| constexpr void | setYAxis (Vector3 v) |
| | Set Y axis.
|
| |
| constexpr void | setZAxis (Vector3 v) |
| | Set Z axis.
|
| |
| constexpr void | translate (Vector3 translate) |
| | Translates this matrix.
|
| |
| constexpr Matrix4x4 | transposed () const |
| | Applies a transpose to a matrix.
|
| |
|
| static constexpr Matrix4x4 | createFilled (float value) |
| | Creates a matrix with all elements set to value.
|
| |
| static constexpr Matrix4x4 | createFromHomogenousMatrix (const Matrix3x3 &matrix) |
| | Creates a matrix from an existing homogeneous matrix.
|
| |
| static constexpr Matrix4x4 | createFromHomogenousMatrix (const Matrix3x3 &matrix, float zTranslation) |
| | Creates a matrix from an existing homogeneous matrix and Z translation.
|
| |
| static constexpr 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 constexpr Matrix4x4 | createOrthogonalProjection (float left, float right, float bottom, float top, float nearPlane, float farPlane) |
| | Creates a projection matrix for orthogonal projection.
|
| |
| static constexpr Matrix4x4 | createOrthogonalProjection (float left, float right, float bottom, float top, float nearPlane, float farPlane, float clipNear, float clipFar) |
| | Creates a projection matrix for orthogonal projection.
|
| |
| static Matrix4x4 | createPerspectiveProjection (float nearPlane, float farPlane, FieldOfViewType fovType, float fovInDegrees, float aspectRatio) |
| | Creates a perspective projection matrix for a symmetrical viewing volume.
|
| |
| static Matrix4x4 | createPerspectiveProjection (float nearPlane, float farPlane, 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 constexpr 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 constexpr Matrix4x4 | createTranslation (float x, float y, float z) |
| | Creates translation matrix.
|
| |
| static constexpr 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]
Translated 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.