struct
TMatrix4
template<typename T>Class representing a 4x4 matrix, in row major format.
Public
Constructors
TMatrix4<T>
TMatrix4<T>
TMatrix4<T>
Methods
GetColumn
Returns the specified column of the matrix, ignoring the last row.
Transpose
Returns a transpose of the matrix (switched columns and rows).
SetColumn
Assigns the vector to a column of the matrix.
Determinant
Calculates the determinant of the matrix.
Determinant3x3
Calculates the determinant of the 3x3 sub-matrix.
SetTrs
Creates a matrix from translation, rotation and scale.
SetInverseTrs
Creates a matrix from inverse translation, rotation and scale.
Decomposition
Decompose a Matrix4 to translation, rotation and scale.
GetTranslation
Extracts the translation (position) part of the matrix.
IsAffine
Check whether or not the matrix is affine matrix.
ConcatenateAffine
Concatenate two affine matrices.
MultiplyAffine
Transform a 3D point by this matrix.
MultiplyAffine
Transform a 4D vector by this matrix.
MultiplyDirection
Transform a 3D direction by this matrix.
MakeView
Creates a view matrix and applies optional reflection.
MakeProjectionOrtho
Creates an ortographic projection matrix that scales the part of the view bounded by , , and into [-1, 1] range.
If is non-zero the matrix will also transform the depth into [-1, 1] range, otherwise it will leave it as-is.
staticTranslation
Creates a 4x4 transformation matrix that performs translation.
staticScaling
Creates a 4x4 transformation matrix that performs scaling.
staticScaling
Creates a 4x4 transformation matrix that performs uniform scaling.
staticRotation
Creates a 4x4 transformation matrix that performs rotation.
staticProjectionPerspective
Creates a 4x4 perspective projection matrix.
- horzFOV
- Horizontal field of view.
- aspect
- Aspect ratio. Determines the vertical field of view.
- near
- Distance to the near plane.
- far
- Distance to the far plane.
- positiveZ
- If true the matrix will project geometry as if its looking along the positive Z axis. Otherwise it projects along the negative Z axis (default).
staticProjectionOrthographic
staticView
Creates a view matrix.
staticTRS
Creates a matrix from translation, rotation and scale.
staticInverseTrs
Creates a matrix from inverse translation, rotation and scale.