[nnm] No Nonsense Math 0.5.0
A No-Nonsense, C++ 17, single-header-only Math library geared towards graphics programming.
|
#include <nnm.hpp>
Public Member Functions | |
constexpr | Matrix4 () |
template<typename Other> | |
constexpr | Matrix4 (const Matrix4< Other > &matrix) |
constexpr | Matrix4 (const Vector4< Real > &column0, const Vector4< Real > &column1, const Vector4< Real > &column2, const Vector4< Real > &column3) |
constexpr | Matrix4 (const Real col0_row0, const Real col0_row1, const Real col0_row2, const Real col0_row3, const Real col1_row0, const Real col1_row1, const Real col1_row2, const Real col1_row3, const Real col2_row0, const Real col2_row1, const Real col2_row2, const Real col2_row3, const Real col3_row0, const Real col3_row1, const Real col3_row2, const Real col3_row3) |
constexpr Real | trace () const |
constexpr Real | determinant () const |
constexpr Matrix3< Real > | minor_matrix_at (const uint8_t column, const uint8_t row) const |
constexpr Real | minor_at (const uint8_t column, const uint8_t row) const |
constexpr Matrix4 | minor () const |
constexpr Real | cofactor_at (const uint8_t column, const uint8_t row) const |
constexpr Matrix4 | cofactor () const |
constexpr Matrix4 | transpose () const |
constexpr Matrix4 | adjugate () const |
constexpr Matrix4 | unchecked_inverse () const |
constexpr std::optional< Matrix4 > | inverse () const |
constexpr bool | approx_equal (const Matrix4 &other) const |
constexpr bool | approx_zero () const |
constexpr const Vector4< Real > & | at (const uint8_t column) const |
constexpr Vector4< Real > & | at (const uint8_t column) |
constexpr const Real & | at (const uint8_t column, const uint8_t row) const |
constexpr Real & | at (const uint8_t column, const uint8_t row) |
const Real * | begin () const |
const Real * | end () const |
Real * | begin () |
Real * | end () |
constexpr const Vector4< Real > & | operator[] (const uint8_t index) const |
constexpr Vector4< Real > & | operator[] (const uint8_t index) |
constexpr bool | operator== (const Matrix4 &other) const |
constexpr bool | operator!= (const Matrix4 &other) const |
constexpr Matrix4 | operator+ (const Matrix4 &other) const |
constexpr Matrix4 & | operator+= (const Matrix4 &other) |
constexpr Matrix4 | operator- (const Matrix4 &other) const |
constexpr Matrix4 & | operator-= (const Matrix4 &other) |
constexpr Matrix4 | operator* (const Matrix4 &other) const |
constexpr Matrix4 & | operator*= (const Matrix4 &other) |
constexpr Vector4< Real > | operator* (const Vector4< Real > &vector) const |
constexpr Matrix4 | operator* (const Real value) const |
constexpr Matrix4 & | operator*= (const Real value) |
constexpr Matrix4 | operator/ (const Real value) const |
constexpr Matrix4 & | operator/= (const Real value) |
constexpr bool | operator< (const Matrix4 &other) const |
constexpr | operator bool () const |
Static Public Member Functions | |
static constexpr Matrix4 | all (const Real value) |
static constexpr Matrix4 | zero () |
static constexpr Matrix4 | one () |
static constexpr Matrix4 | identity () |
Public Attributes | |
Vector4< Real > | columns [4] |
4x4 matrix.
Real | Floating-point type. |
|
inlineconstexpr |
Initialize with identity matrix.
|
inlineexplicitconstexpr |
Casts from another matrix.
Other | Other type to cast from. |
matrix | Other matrix. |
|
inlineconstexpr |
Initialize with columns.
column0 | First column. |
column1 | Second column. |
column2 | Third column. |
column3 | Fourth column. |
|
inlineconstexpr |
Initialize with elements.
col0_row0 | First column, first row. |
col0_row1 | First column, second row. |
col0_row2 | First column, third row. |
col0_row3 | First column, fourth row. |
col1_row0 | Second column, first row. |
col1_row1 | Second column, second row. |
col1_row2 | Second column, third row. |
col1_row3 | Second column, fourth row. |
col2_row0 | Third column, first row. |
col2_row1 | Third column, second row. |
col2_row2 | Third column, third row. |
col2_row3 | Third column, fourth row. |
col3_row0 | Fourth column, first row. |
col3_row1 | Fourth column, second row. |
col3_row2 | Fourth column, third row. |
col3_row3 | Fourth column, fourth row. |
|
inlinenodiscardconstexpr |
Adjugate matrix.
|
inlinestaticnodiscardconstexpr |
Matrix with all element set to value.
value | Value. |
|
inlinenodiscardconstexpr |
Determines if approximately equal to another matrix.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Determines if all elements are approximately zero.
|
inlineconstexpr |
Reference to column at index.
column | Index of column. |
|
inlinenodiscardconstexpr |
Constant reference to column at index.
column | Index of column. |
|
inlineconstexpr |
Reference to element at index of column and row.
column | Index of column. |
row | Index of row. |
|
inlinenodiscardconstexpr |
Constant reference to element at index of column and row.
column | Index of column. |
row | Index of row. |
|
inline |
Start of iterator.
|
inlinenodiscard |
Start of constant iterator.
|
inlinenodiscardconstexpr |
Cofactor matrix which is a matrix where each element is the cofactor at that element.
|
inlinenodiscardconstexpr |
Cofactor at column and row.
column | Index of column. |
row | Index of row. |
|
inlinenodiscardconstexpr |
Determinant of matrix.
|
inline |
End of iterator
|
inlinenodiscard |
End of constant iterator.
|
inlinestaticnodiscardconstexpr |
Identity matrix.
|
inlinenodiscardconstexpr |
Inverse matrix.
|
inlinenodiscardconstexpr |
Minor matrix which is a matrix where each element is the minor at the element.
|
inlinenodiscardconstexpr |
Minor at column and row which is the determinant of the minor matrix at the column and row.
column | Index of column. |
row | Index of row. |
|
inlinenodiscardconstexpr |
Minor matrix at column and row which is the matrix where the specified column and row are removed.
column | Index of column. |
row | Index of row. |
|
inlinestaticnodiscardconstexpr |
Matrix with all elements set to one.
|
inlineexplicitconstexpr |
True if any elements are non-zero, false otherwise.
|
inlineconstexpr |
Element-wise inequality.
other | Other matrix. |
|
inlineconstexpr |
Matrix multiplication.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Matrix-scalar multiplication.
value | Scalar value. |
|
inlineconstexpr |
Matrix-vector multiplication.
vector | 4D vector. |
|
inlineconstexpr |
Matrix multiplication.
other | Other matrix. |
|
inlineconstexpr |
Matrix-scalar multiplication.
value | Scalar value. |
|
inlinenodiscardconstexpr |
Element-wise addition.
other | Other matrix. |
|
inlineconstexpr |
Element-wise addition.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise subtraction.
other | Other matrix. |
|
inlineconstexpr |
Element-wise subtraction.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise division by value.
value | Value. |
|
inlineconstexpr |
Element-wise division by value.
value | Value. |
|
inlineconstexpr |
Lexicographical comparison with another matrix.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise equality.
other | Other matrix. |
|
inlineconstexpr |
Reference to column at index.
index |
|
inlineconstexpr |
Constant reference to column at index.
index | Index of column. |
|
inlinenodiscardconstexpr |
Trace which is the sum of the matrix diagonal.
|
inlinenodiscardconstexpr |
Transpose matrix.
|
inlinenodiscardconstexpr |
Inverse matrix without first checking if a valid inverse if possible.
|
inlinestaticnodiscardconstexpr |
Matrix with all elements set to zero.
Vector4<Real> nnm::Matrix4< Real >::columns[4] |
Columns of matrix.