[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 | Matrix3 () |
template<typename Other> | |
constexpr | Matrix3 (const Matrix3< Other > &matrix) |
constexpr | Matrix3 (const Vector3< Real > &column0, const Vector3< Real > &column1, const Vector3< Real > &column2) |
constexpr | Matrix3 (const Real col0_row0, const Real col0_row1, const Real col0_row2, const Real col1_row0, const Real col1_row1, const Real col1_row2, const Real col2_row0, const Real col2_row1, const Real col2_row2) |
constexpr Real | trace () const |
constexpr Real | determinant () const |
constexpr Matrix2< 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 Matrix3 | minor () const |
constexpr Real | cofactor_at (const uint8_t column, const uint8_t row) const |
constexpr Matrix3 | cofactor () const |
constexpr Matrix3 | transpose () const |
constexpr Matrix3 | adjugate () const |
constexpr Matrix3 | unchecked_inverse () const |
constexpr std::optional< Matrix3 > | inverse () const |
constexpr bool | approx_equal (const Matrix3 &other) const |
constexpr bool | approx_zero () const |
constexpr const Vector3< Real > & | at (const uint8_t column) const |
constexpr Vector3< 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 Vector3< Real > & | operator[] (const uint8_t column) const |
constexpr Vector3< Real > & | operator[] (const uint8_t column) |
constexpr bool | operator== (const Matrix3 &other) const |
constexpr bool | operator!= (const Matrix3 &other) const |
constexpr Matrix3 | operator+ (const Matrix3 &other) const |
constexpr Matrix3 & | operator+= (const Matrix3 &other) |
constexpr Matrix3 | operator- (const Matrix3 &other) const |
constexpr Matrix3 & | operator-= (const Matrix3 &other) |
constexpr Matrix3 | operator* (const Matrix3 &other) const |
constexpr Matrix3 & | operator*= (const Matrix3 &other) |
constexpr Vector3< Real > | operator* (const Vector3< Real > &vector) const |
constexpr Matrix3 | operator* (const Real value) const |
constexpr Matrix3 & | operator*= (const Real value) |
constexpr Matrix3 | operator/ (const Real value) const |
constexpr Matrix3 & | operator/= (const Real value) |
constexpr bool | operator< (const Matrix3 &other) const |
constexpr | operator bool () const |
Static Public Member Functions | |
static constexpr Matrix3 | all (const Real value) |
static constexpr Matrix3 | zero () |
static constexpr Matrix3 | one () |
static constexpr Matrix3 | identity () |
Public Attributes | |
Vector3< Real > | columns [3] |
3x3 matrix.
Real | Floating-point type. |
|
inlineconstexpr |
Initialize with identity matrix.
|
inlineexplicitconstexpr |
Case from other matrix type.
Other | Other matrix type. |
matrix | Matrix to cast from |
|
inlineconstexpr |
Initialize with columns.
column0 | First column. |
column1 | Second column. |
column2 | Third column. |
|
inlineconstexpr |
Initialize with elements.
col0_row0 | First column, first row |
col0_row1 | First column, second row |
col0_row2 | First column, third row |
col1_row0 | Second column, first row |
col1_row1 | Second column, second row |
col1_row2 | Second column, third row |
col2_row0 | Third column, first row |
col2_row1 | Third column, second row |
col2_row2 | Third column, third row |
|
inlinenodiscardconstexpr |
Adjugate matrix.
|
inlinestaticnodiscardconstexpr |
Matrix with all elements equal to value.
value | Value. |
|
inlinenodiscardconstexpr |
Element-wise approximately equal.
other | Other matrix. |
|
inlinenodiscardconstexpr |
If all elements are approximately zero.
|
inlineconstexpr |
Reference to column at index.
column | Column. |
|
inlinenodiscardconstexpr |
Constant reference to column at index.
column | Column. |
|
inlineconstexpr |
Reference to element at column and row.
column | Column. |
row | Row. |
|
inlinenodiscardconstexpr |
Constant reference to element at column and row.
column | Column. |
row | Row. |
|
inline |
Start iterator.
|
inlinenodiscard |
Start constant iterator.
|
inlinenodiscardconstexpr |
Cofactor matrix.
|
inlinenodiscardconstexpr |
Cofactor at column and row.
column | |
row |
|
inlinenodiscardconstexpr |
Matrix determinant.
|
inline |
End iterator.
|
inlinenodiscard |
End constant iterator.
|
inlinestaticnodiscardconstexpr |
Identity matrix.
|
inlinenodiscardconstexpr |
Inverse which returns null if there is no inverse.
|
inlinenodiscardconstexpr |
Minor matrix.
|
inlinenodiscardconstexpr |
Minor at column and row which is the determinant of the minor matrix at that column and row.
column | Column. |
row | Row. |
|
inlinenodiscardconstexpr |
Minor matrix at column and row which is the resulting 2x2 matrix with that column and row excluded.
column | Column. |
row | Row. |
|
inlinestaticnodiscardconstexpr |
Matrix with all elements one.
|
inlineexplicitconstexpr |
Evaluates to false if all components are zero, true otherwise.
|
inlineconstexpr |
Element-wise inequality.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Matrix multiplication.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise multiplication with value.
value | Value. |
|
inlinenodiscardconstexpr |
Matrix-vector multiplication.
vector | Vector. |
|
inlineconstexpr |
Matrix multiplication.
other | Other matrix. |
|
inlineconstexpr |
Element-wise multiplication with value.
value | 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. |
|
inlinenodiscardconstexpr |
Lexicographical comparison between elements.
other | Other matrix. |
|
inlinenodiscardconstexpr |
Element-wise equality.
other | Other matrix. |
|
inlineconstexpr |
Reference to column at index.
column | Column. |
|
inlineconstexpr |
Constant reference to column at index.
column | Column. |
|
inlinenodiscardconstexpr |
Sum of matrix diagonal.
|
inlinenodiscardconstexpr |
Transpose matrix.
|
inlinenodiscardconstexpr |
Inverse without first checking if the matrix is singular.
|
inlinestaticnodiscardconstexpr |
Matrix with all elements zero.
Vector3<Real> nnm::Matrix3< Real >::columns[3] |