Matrix3
A 3x3 matrix class for mathematical operations.
Stores the matrix in column-major order using three Vector3 columns. Commonly used for representing linear transformations.
Functions
Matrix3() constexpr
cpp
vglx::Matrix3::Matrix3(const Vector3 &a, const Vector3 &b, const Vector3 &c)
Parameter | Description |
---|---|
a | First column vector. |
b | Second column vector. |
c | Third column vector. |
Constructs a Matrix3 object from three column vectors.
Matrix3() constexpr
cpp
vglx::Matrix3::Matrix3(float n00, float n01, float n02, float n10, float n11, float n12, float n20, float n21, float n22)
Parameter | Description |
---|---|
n00 | First row, first element. |
n01 | First row, second element. |
n02 | First row, third element. |
n10 | Second row, first element. |
n11 | Second row, second element. |
n12 | Second row, third element. |
n20 | Third row, first element. |
n21 | Third row, second element. |
n22 | Third row, third element. |
Constructs a Matrix3 object from individual components (row-major).
Matrix3() constexpr
cpp
vglx::Matrix3::Matrix3(float value)
Parameter | Description |
---|---|
value | Value to place on the diagonal. |
Constructs a diagonal Matrix3 with the given scalar value.
operator()() auto &
cpp
auto & vglx::Matrix3::operator()(int i, int j)
Parameter | Description |
---|---|
i | Row index (0 to 2). |
j | Column index (0 to 2). |
Access matrix element by (row, column).
operator()() const auto &
cpp
const auto & vglx::Matrix3::operator()(int i, int j) const
Parameter | Description |
---|---|
i | Row index (0 to 2). |
j | Column index (0 to 2). |
Access matrix element by (row, column) (const).
operator[]() auto &
cpp
auto & vglx::Matrix3::operator[](int j)
Parameter | Description |
---|---|
j | Column index (0 to 2). |
Access matrix column vector by index.
operator[]() const auto &
cpp
const auto & vglx::Matrix3::operator[](int j) const
Parameter | Description |
---|---|
j | Column index (0 to 2). |
Access matrix column vector by index (const).
Matrix3::Identity() auto
cpp
static constexpr auto vglx::Matrix3::Identity()
Returns the identity matrix.
Determinant() VGLX_EXPORT constexpr auto
cpp
VGLX_EXPORT constexpr auto Determinant(const Matrix3 &m)
Parameter | Description |
---|---|
m | Input matrix. |
Computes the determinant of a Matrix3 object.