|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents a row-major 3x3 matrix. Used for 2D affine transformations and 3D rotations. More...
#include <Matrix3x3.hpp>
Public Member Functions | |
| Matrix3x3 (float m11=1, float m12=0, float m13=0, float m21=0, float m22=1, float m23=0, float m31=0, float m32=0, float m33=1) | |
| Creates a matrix with the specified values. If no values are provided, it creates an identity matrix. | |
| Matrix3x3 (float m[9]) | |
| Creates a matrix from an array of 9 floats. | |
| float | Trace () const noexcept |
| Returns the trace of this matrix. | |
| float | Determinant () const noexcept |
| Returns the determinant of this matrix. | |
| float & | operator[] (unsigned index) |
| Returns a reference to the element at the specified index in the matrix, allowing for both reading and writing. | |
| Matrix3x3 & | Hadamard (const Matrix3x3 &m) |
| Hadamard multiplication (element-wise multiplication) of this matrix with another matrix. | |
| Matrix3x3 | operator+ (const Matrix3x3 &m) const noexcept |
| Adds this matrix to another matrix and returns the result. | |
| Matrix3x3 & | operator+= (const Matrix3x3 &m) noexcept |
| Adds another matrix to this matrix in-place. | |
| Matrix3x3 | operator- () const noexcept |
| Negates this matrix, returning a matrix with all elements negated. | |
| Matrix3x3 | operator- (const Matrix3x3 &m) const noexcept |
| Subtracts another matrix from this matrix and returns the result. | |
| Matrix3x3 & | operator-= (const Matrix3x3 &m) noexcept |
| Subtracts another matrix from this matrix in-place. | |
| Matrix3x3 | operator* (const Matrix3x3 &m) const noexcept |
| Multiplies this matrix with another matrix (matrix product) and returns the result. | |
| Matrix3x3 & | operator*= (const Matrix3x3 &m) noexcept |
| Multiplies this matrix with another matrix (matrix product) in-place. | |
| Matrix3x3 | operator* (float s) const noexcept |
| Multiplies this matrix by a scalar and returns the result. | |
| Matrix3x3 & | operator*= (float s) noexcept |
| Multiplies this matrix by a scalar in-place. | |
| Matrix3x3 | operator/ (float s) const |
| Divides this matrix by a scalar and returns the result. | |
| Matrix3x3 & | operator/= (float s) |
| Divides this matrix by a scalar in-place. | |
Static Public Member Functions | |
| static Matrix3x3 | CreateTranslation (const Vector2 &t) |
| Creates a 2D translation matrix. | |
| static Matrix3x3 | CreateScale (const Vector2 &s) |
| Creates a 2D scaling matrix. | |
| static Matrix3x3 | CreateRotation2D (float theta) |
| Creates a 2D rotation matrix. | |
| static Matrix3x3 | Create2DSkewing (const Vector2 &skewing) |
| Creates a 2D skewing matrix. | |
| static Matrix3x3 | CreateRotationX (float alpha) |
| Creates a rotation matrix around the X-axis. | |
| static Matrix3x3 | CreateRotationY (float beta) |
| Creates a rotation matrix around the Y-axis. | |
| static Matrix3x3 | CreateRotationZ (float gamma) |
| Creates a rotation matrix around the Z-axis. | |
| static Matrix3x3 | CreateFromQuaternion (const Quaternion &q) |
| Creates a rotation matrix from a quaternion. | |
| static Matrix3x3 | Hadamard (const Matrix3x3 &a, const Matrix3x3 &b) |
| Hadamard multiplication (element-wise multiplication) of two matrices. | |
Public Attributes | |
| float | M11 |
| float | M12 |
| float | M13 |
| float | M21 |
| float | M22 |
| float | M23 |
| float | M31 |
| float | M32 |
| float | M33 |
Represents a row-major 3x3 matrix. Used for 2D affine transformations and 3D rotations.
|
explicit |
Creates a matrix with the specified values. If no values are provided, it creates an identity matrix.
| m11 | The value for the first row, first column. |
| m12 | The value for the first row, second column. |
| m13 | The value for the first row, third column. |
| m21 | The value for the second row, first column. |
| m22 | The value for the second row, second column. |
| m23 | The value for the second row, third column. |
| m31 | The value for the third row, first column. |
| m32 | The value for the third row, second column. |
| m33 | The value for the third row, third column. |
|
explicit |
Creates a matrix from an array of 9 floats.
| m |
Creates a 2D skewing matrix.
| skewing | The skewing vector. |
|
static |
Creates a rotation matrix from a quaternion.
| q | The quaternion representing the rotation. |
Creates a 2D rotation matrix.
| theta | The rotation angle in radians. |
Creates a rotation matrix around the X-axis.
| alpha | The rotation angle in radians. |
Creates a rotation matrix around the Y-axis.
| beta | The rotation angle in radians. |
Creates a rotation matrix around the Z-axis.
| gamma | The rotation angle in radians. |
Creates a 2D scaling matrix.
| s | The scaling vector. |
Creates a 2D translation matrix.
| t | The translation vector. |
|
noexcept |
Returns the determinant of this matrix.
Hadamard multiplication (element-wise multiplication) of two matrices.
| a | The first matrix. |
| b | The second matrix. |
Hadamard multiplication (element-wise multiplication) of this matrix with another matrix.
| m | The matrix to multiply with. |
Multiplies this matrix with another matrix (matrix product) and returns the result.
| m | The matrix to multiply with. |
Multiplies this matrix by a scalar and returns the result.
| s | The scalar value to multiply with. |
Multiplies this matrix with another matrix (matrix product) in-place.
| m | The matrix to multiply with. |
Multiplies this matrix by a scalar in-place.
| s | The scalar value to multiply with. |
Adds this matrix to another matrix and returns the result.
| m | The matrix to add. |
Adds another matrix to this matrix in-place.
| m | The matrix to add. |
|
noexcept |
Negates this matrix, returning a matrix with all elements negated.
Subtracts another matrix from this matrix and returns the result.
| m | The matrix to subtract. |
Subtracts another matrix from this matrix in-place.
| m | The matrix to subtract. |
Divides this matrix by a scalar and returns the result.
| s | The scalar value to divide by. |
Divides this matrix by a scalar in-place.
| s | The scalar value to divide by. |
| float & Matrix3x3::operator[] | ( | unsigned | index | ) |
Returns a reference to the element at the specified index in the matrix, allowing for both reading and writing.
| index | Index. between 0 and 8 |
|
noexcept |
Returns the trace of this matrix.
| float Engine3DRadSpace.Math::Matrix3x3::M11 |
| float Engine3DRadSpace.Math::Matrix3x3::M12 |
| float Engine3DRadSpace.Math::Matrix3x3::M13 |
| float Engine3DRadSpace.Math::Matrix3x3::M21 |
| float Engine3DRadSpace.Math::Matrix3x3::M22 |
| float Engine3DRadSpace.Math::Matrix3x3::M23 |
| float Engine3DRadSpace.Math::Matrix3x3::M31 |
| float Engine3DRadSpace.Math::Matrix3x3::M32 |
| float Engine3DRadSpace.Math::Matrix3x3::M33 |