|
| AZ_TYPE_INFO (Matrix4x4, "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}") |
|
| Matrix4x4 ()=default |
| Default constructor does not initialize the matrix.
|
|
| Matrix4x4 (const Matrix4x4 &rhs)=default |
|
| Matrix4x4 (Simd::Vec4::FloatArgType row0, Simd::Vec4::FloatArgType row1, Simd::Vec4::FloatArgType row2, Simd::Vec4::FloatArgType row3) |
|
void | StoreToRowMajorFloat16 (float *values) const |
|
void | StoreToColumnMajorFloat16 (float *values) const |
|
float | operator() (int32_t row, int32_t col) const |
| Indexed access using operator().
|
|
Matrix4x4 | operator- () const |
| Operator for negating all matrix's elements.
|
|
Vector3 | operator* (const Vector3 &rhs) const |
|
Vector4 | operator* (const Vector4 &rhs) const |
| Post-multiplies the matrix by a vector.
|
|
Vector3 | TransposedMultiply3x3 (const Vector3 &v) const |
|
Vector3 | Multiply3x3 (const Vector3 &v) const |
| Post-multiplies the matrix by a vector, using only the upper 3x3 submatrix.
|
|
Vector3 | RetrieveScale () const |
| Gets the scale part of the transformation, i.e. the length of the scale components.
|
|
Vector3 | RetrieveScaleSq () const |
| Gets the squared scale part of the transformation (the squared length of the basis vectors).
|
|
Vector3 | ExtractScale () |
| Gets the scale part of the transformation as in RetrieveScale, and also removes this scaling from the matrix.
|
|
void | MultiplyByScale (const Vector3 &scale) |
| Quick multiplication by a scale matrix, equivalent to m*=Matrix4x4::CreateScale(scale).
|
|
Matrix4x4 | GetReciprocalScaled () const |
| Returns a matrix with the reciprocal scale, keeping the same rotation and translation.
|
|
bool | IsClose (const Matrix4x4 &rhs, float tolerance=Constants::Tolerance) const |
|
bool | operator== (const Matrix4x4 &rhs) const |
|
bool | operator!= (const Matrix4x4 &rhs) const |
|
void | SetRotationPartFromQuaternion (const Quaternion &q) |
| sets the upper 3x3 rotation part of the matrix from a quaternion.
|
|
Vector4 | GetDiagonal () const |
|
bool | IsFinite () const |
|
const Simd::Vec4::FloatType * | GetSimdValues () const |
|
Simd::Vec4::FloatType * | GetSimdValues () |
|
|
float | GetElement (int32_t row, int32_t col) const |
|
void | SetElement (int32_t row, int32_t col, float value) |
|
|
Vector4 | GetRow (int32_t row) const |
|
Vector3 | GetRowAsVector3 (int32_t row) const |
|
void | GetRows (Vector4 *row0, Vector4 *row1, Vector4 *row2, Vector4 *row3) const |
|
void | SetRow (int32_t row, float x, float y, float z, float w) |
|
void | SetRow (int32_t row, const Vector3 &v) |
|
void | SetRow (int32_t row, const Vector3 &v, float w) |
|
void | SetRow (int32_t row, const Vector4 &v) |
|
void | SetRows (const Vector4 &row0, const Vector4 &row1, const Vector4 &row2, const Vector4 &row3) |
|
|
Vector4 | GetColumn (int32_t col) const |
|
Vector3 | GetColumnAsVector3 (int32_t col) const |
|
void | GetColumns (Vector4 *col0, Vector4 *col1, Vector4 *col2, Vector4 *col3) const |
|
void | SetColumn (int32_t col, float x, float y, float z, float w) |
|
void | SetColumn (int32_t col, const Vector3 &v) |
|
void | SetColumn (int32_t col, const Vector3 &v, float w) |
|
void | SetColumn (int32_t col, const Vector4 &v) |
|
void | SetColumns (const Vector4 &col0, const Vector4 &col1, const Vector4 &col2, const Vector4 &col3) |
|
|
Vector4 | GetBasisX () const |
|
Vector3 | GetBasisXAsVector3 () const |
|
void | SetBasisX (float x, float y, float z, float w) |
|
void | SetBasisX (const Vector4 &v) |
|
Vector4 | GetBasisY () const |
|
Vector3 | GetBasisYAsVector3 () const |
|
void | SetBasisY (float x, float y, float z, float w) |
|
void | SetBasisY (const Vector4 &v) |
|
Vector4 | GetBasisZ () const |
|
Vector3 | GetBasisZAsVector3 () const |
|
void | SetBasisZ (float x, float y, float z, float w) |
|
void | SetBasisZ (const Vector4 &v) |
|
void | GetBasisAndTranslation (Vector4 *basisX, Vector4 *basisY, Vector4 *basisZ, Vector4 *pos) const |
|
void | SetBasisAndTranslation (const Vector4 &basisX, const Vector4 &basisY, const Vector4 &basisZ, const Vector4 &pos) |
|
|
Vector3 | GetTranslation () const |
|
void | SetTranslation (float x, float y, float z) |
|
void | SetTranslation (const Vector3 &v) |
|
|
Matrix4x4 | operator+ (const Matrix4x4 &rhs) const |
|
Matrix4x4 & | operator+= (const Matrix4x4 &rhs) |
|
|
Matrix4x4 | operator- (const Matrix4x4 &rhs) const |
|
Matrix4x4 & | operator-= (const Matrix4x4 &rhs) |
|
|
Matrix4x4 | operator* (const Matrix4x4 &rhs) const |
|
Matrix4x4 & | operator*= (const Matrix4x4 &rhs) |
|
|
Matrix4x4 | operator* (float multiplier) const |
|
Matrix4x4 & | operator*= (float multiplier) |
|
|
Matrix4x4 | operator/ (float divisor) const |
|
Matrix4x4 & | operator/= (float divisor) |
|
|
Matrix4x4 | GetTranspose () const |
|
void | Transpose () |
|
|
Matrix4x4 | GetInverseFull () const |
|
void | InvertFull () |
|
|
Matrix4x4 | GetInverseTransform () const |
|
void | InvertTransform () |
|
|
Matrix4x4 | GetInverseFast () const |
|
void | InvertFast () |
|
|
static void | Reflect (ReflectContext *context) |
|
static Matrix4x4 | CreateIdentity () |
|
static Matrix4x4 | CreateZero () |
|
static Matrix4x4 | CreateFromValue (float value) |
| Constructs a matrix with all components set to the specified value.
|
|
static Matrix4x4 | CreateFromRowMajorFloat16 (const float *values) |
| Constructs from an array of 16 floats stored in row-major order.
|
|
static Matrix4x4 | CreateFromRows (const Vector4 &row0, const Vector4 &row1, const Vector4 &row2, const Vector4 &row3) |
|
static Matrix4x4 | CreateFromColumnMajorFloat16 (const float *values) |
| Constructs from an array of 16 floats stored in column-major order.
|
|
static Matrix4x4 | CreateFromColumns (const Vector4 &col0, const Vector4 &col1, const Vector4 &col2, const Vector4 &col3) |
|
static Matrix4x4 | CreateFromQuaternion (const Quaternion &q) |
| Sets the matrix from a quaternion, translation is set to zero.
|
|
static Matrix4x4 | CreateFromQuaternionAndTranslation (const Quaternion &q, const Vector3 &p) |
| Sets the matrix from a quaternion and a translation.
|
|
static Matrix4x4 | CreateFromMatrix3x4 (const Matrix3x4 &matrix3x4) |
| Creates a Matrix4x4 from a Matrix3x4, setting the bottom row to (0, 0, 0, 1).
|
|
static Matrix4x4 | CreateFromTransform (const Transform &transform) |
| Creates a Matrix3x4 from a Transform, setting the bottom row to (0, 0, 0, 1).
|
|
static Matrix4x4 | CreateScale (const Vector3 &scale) |
| Sets the matrix to be a scale matrix.
|
|
static Matrix4x4 | CreateDiagonal (const Vector4 &diagonal) |
| Sets the matrix to be a diagonal matrix.
|
|
static Matrix4x4 | CreateTranslation (const Vector3 &translation) |
| Sets the matrix to be a translation matrix.
|
|
static Matrix4x4 | CreateProjection (float fovY, float aspectRatio, float nearDist, float farDist) |
| Creates a projection matrix using the vertical field of view and the aspect ratio.
|
|
static Matrix4x4 | CreateProjectionFov (float fovX, float fovY, float nearDist, float farDist) |
|
static Matrix4x4 | CreateProjectionOffset (float left, float right, float bottom, float top, float nearDist, float farDist) |
| Creates an off-center projection matrix.
|
|
static Matrix4x4 | CreateInterpolated (const Matrix4x4 &m1, const Matrix4x4 &m2, float t) |
| Interpolates between two matrices; linearly for scale/translation, spherically for rotation.
|
|
|
static Matrix4x4 | CreateRotationX (float angle) |
|
static Matrix4x4 | CreateRotationY (float angle) |
|
static Matrix4x4 | CreateRotationZ (float angle) |
|
The general matrix class. Stores all 4 rows and 4 columns, so can be used for all types of transformations. If you don't need perspective, consider using Transform. if you don't need translation, consider using Matrix3x3.
When multiplying with a Vector3, it assumes the w-component of the Vector3 is 1.0. Use the Multiply3x3 functions to multiply by the upper 3x3 submatrix only, e.g. for transforming normals.