|
Leonetienne/Eule
Homemade math library, mainly targetted towards computer graphics
|
A matrix 4x4 class representing a 3d transformation. More...
#include <Matrix4x4.h>
Public Member Functions | |
| Matrix4x4 () | |
| Matrix4x4 (const Matrix4x4 &other) | |
| Matrix4x4 (Matrix4x4 &&other) noexcept | |
| Matrix4x4 | operator* (const Matrix4x4 &other) const |
| void | operator*= (const Matrix4x4 &other) |
| Matrix4x4 | operator/ (const Matrix4x4 &other) const |
| void | operator/= (const Matrix4x4 &other) |
| Matrix4x4 | operator* (const double scalar) const |
| Cellwise scaling. More... | |
| void | operator*= (const double scalar) |
| Cellwise scaling. More... | |
| Matrix4x4 | operator/ (const double denominator) const |
| Cellwise division. More... | |
| void | operator/= (const double denominator) |
| Cellwise division. More... | |
| Matrix4x4 | operator+ (const Matrix4x4 &other) const |
| Cellwise addition. More... | |
| void | operator+= (const Matrix4x4 &other) |
| Cellwise addition. More... | |
| Matrix4x4 | operator- (const Matrix4x4 &other) const |
| Cellwise subtraction. More... | |
| void | operator-= (const Matrix4x4 &other) |
| Cellwise subtraction. More... | |
| std::array< double, 4 > & | operator[] (std::size_t y) |
| const std::array< double, 4 > & | operator[] (std::size_t y) const |
| void | operator= (const Matrix4x4 &other) |
| void | operator= (Matrix4x4 &&other) noexcept |
| bool | operator== (const Matrix4x4 &other) |
| bool | operator!= (const Matrix4x4 &other) |
| const Vector3d | GetTranslationComponent () const |
| Will return d,h,l as a Vector3d(x,y,z) More... | |
| void | SetTranslationComponent (const Vector3d &trans) |
| Will set d,h,l from a Vector3d(x,y,z) More... | |
| Matrix4x4 | DropTranslationComponents () const |
| Will return this Matrix4x4 with d,h,l being set to 0. More... | |
| Matrix4x4 | Transpose3x3 () const |
| Will return the 3x3 transpose of this matrix. More... | |
| Matrix4x4 | Transpose4x4 () const |
| Will return the 4x4 transpose of this matrix. More... | |
| Matrix4x4 | Multiply4x4 (const Matrix4x4 &o) const |
| Will return the Matrix4x4 of an actual 4x4 multiplication. operator* only does a 3x3. More... | |
| Matrix4x4 | GetCofactors (std::size_t p, std::size_t q, std::size_t n) const |
| Will return the cofactors of this matrix, by dimension n. More... | |
| double | Determinant (std::size_t n) const |
| Will return the determinant, by dimension n. More... | |
| Matrix4x4 | Adjoint (std::size_t n) const |
| Will return the adjoint of this matrix, by dimension n. More... | |
| Matrix4x4 | Inverse3x3 () const |
| Will return the 3x3-inverse of this matrix. More... | |
| Matrix4x4 | Inverse4x4 () const |
| Will return the full 4x4-inverse of this matrix. More... | |
| bool | IsInversible3x3 () const |
| Will check if the 3x3-component is inversible. More... | |
| bool | IsInversible4x4 () const |
| Will check if the entire matrix is inversible. More... | |
| bool | Similar (const Matrix4x4 &other, double epsilon=0.00001) const |
| Will compare if two matrices are similar to a certain epsilon value. More... | |
Public Attributes | |
| std::array< std::array< double, 4 >, 4 > | v |
| Array holding the matrices values. More... | |
| double & | a = v[0][0] |
| double & | b = v[0][1] |
| double & | c = v[0][2] |
| double & | d = v[0][3] |
| double & | e = v[1][0] |
| double & | f = v[1][1] |
| double & | g = v[1][2] |
| double & | h = v[1][3] |
| double & | i = v[2][0] |
| double & | j = v[2][1] |
| double & | k = v[2][2] |
| double & | l = v[2][3] |
| double & | m = v[3][0] |
| double & | n = v[3][1] |
| double & | o = v[3][2] |
| double & | p = v[3][3] |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Matrix4x4 &m) |
| std::wostream & | operator<< (std::wostream &os, const Matrix4x4 &m) |
A matrix 4x4 class representing a 3d transformation.
This matrix consists of a 3x3 matrix containing scaling and rotation information, and a vector (d,h,l) representing the translation.
Note: This class can also be used to compute regular 4x4 multiplications. Use Multiply4x4() for that.
Definition at line 36 of file Matrix4x4.h.
| Matrix4x4::Matrix4x4 | ( | ) |
| Matrix4x4::Matrix4x4 | ( | const Matrix4x4 & | other | ) |
Definition at line 22 of file Matrix4x4.cpp.
|
noexcept |
Definition at line 28 of file Matrix4x4.cpp.
| Matrix4x4 Matrix4x4::Adjoint | ( | std::size_t | n | ) | const |
Will return the adjoint of this matrix, by dimension n.
Definition at line 533 of file Matrix4x4.cpp.
| double Matrix4x4::Determinant | ( | std::size_t | n | ) | const |
| Matrix4x4 Matrix4x4::DropTranslationComponents | ( | ) | const |
| Matrix4x4 Matrix4x4::GetCofactors | ( | std::size_t | p, |
| std::size_t | q, | ||
| std::size_t | n | ||
| ) | const |
Will return the cofactors of this matrix, by dimension n.
Definition at line 478 of file Matrix4x4.cpp.
| const Vector3d Matrix4x4::GetTranslationComponent | ( | ) | const |
| Matrix4x4 Matrix4x4::Inverse3x3 | ( | ) | const |
Will return the 3x3-inverse of this matrix.
Meaning, the 3x3 component will be inverted, and the translation component will be negated
Definition at line 558 of file Matrix4x4.cpp.
| Matrix4x4 Matrix4x4::Inverse4x4 | ( | ) | const |
| bool Matrix4x4::IsInversible3x3 | ( | ) | const |
Will check if the 3x3-component is inversible.
Definition at line 598 of file Matrix4x4.cpp.
| bool Matrix4x4::IsInversible4x4 | ( | ) | const |
Will check if the entire matrix is inversible.
Definition at line 603 of file Matrix4x4.cpp.
Will return the Matrix4x4 of an actual 4x4 multiplication. operator* only does a 3x3.
Definition at line 451 of file Matrix4x4.cpp.
| bool Matrix4x4::operator!= | ( | const Matrix4x4 & | other | ) |
Definition at line 402 of file Matrix4x4.cpp.
| Matrix4x4 Matrix4x4::operator* | ( | const double | scalar | ) | const |
Definition at line 34 of file Matrix4x4.cpp.
| void Matrix4x4::operator*= | ( | const double | scalar | ) |
Cellwise scaling.
Definition at line 202 of file Matrix4x4.cpp.
| void Matrix4x4::operator*= | ( | const Matrix4x4 & | other | ) |
Definition at line 147 of file Matrix4x4.cpp.
| void Matrix4x4::operator+= | ( | const Matrix4x4 & | other | ) |
Cellwise addition.
Definition at line 261 of file Matrix4x4.cpp.
| void Matrix4x4::operator-= | ( | const Matrix4x4 & | other | ) |
Cellwise subtraction.
Definition at line 338 of file Matrix4x4.cpp.
| Matrix4x4 Matrix4x4::operator/ | ( | const double | denominator | ) | const |
Cellwise division.
Definition at line 208 of file Matrix4x4.cpp.
Definition at line 153 of file Matrix4x4.cpp.
| void Matrix4x4::operator/= | ( | const double | denominator | ) |
Cellwise division.
Definition at line 215 of file Matrix4x4.cpp.
| void Matrix4x4::operator/= | ( | const Matrix4x4 & | other | ) |
Definition at line 158 of file Matrix4x4.cpp.
| void Matrix4x4::operator= | ( | const Matrix4x4 & | other | ) |
Definition at line 385 of file Matrix4x4.cpp.
|
noexcept |
Definition at line 391 of file Matrix4x4.cpp.
| bool Matrix4x4::operator== | ( | const Matrix4x4 & | other | ) |
Definition at line 397 of file Matrix4x4.cpp.
| std::array< double, 4 > & Matrix4x4::operator[] | ( | std::size_t | y | ) |
Definition at line 375 of file Matrix4x4.cpp.
| const std::array< double, 4 > & Matrix4x4::operator[] | ( | std::size_t | y | ) | const |
Definition at line 380 of file Matrix4x4.cpp.
| void Matrix4x4::SetTranslationComponent | ( | const Vector3d & | trans | ) |
| bool Matrix4x4::Similar | ( | const Matrix4x4 & | other, |
| double | epsilon = 0.00001 |
||
| ) | const |
Will compare if two matrices are similar to a certain epsilon value.
Definition at line 608 of file Matrix4x4.cpp.
| Matrix4x4 Matrix4x4::Transpose3x3 | ( | ) | const |
| Matrix4x4 Matrix4x4::Transpose4x4 | ( | ) | const |
|
friend |
Definition at line 620 of file Matrix4x4.cpp.
|
friend |
Definition at line 635 of file Matrix4x4.cpp.
| double& Eule::Matrix4x4::a = v[0][0] |
Definition at line 128 of file Matrix4x4.h.
| double& Eule::Matrix4x4::b = v[0][1] |
Definition at line 129 of file Matrix4x4.h.
| double& Eule::Matrix4x4::c = v[0][2] |
Definition at line 130 of file Matrix4x4.h.
| double& Eule::Matrix4x4::d = v[0][3] |
Definition at line 131 of file Matrix4x4.h.
| double& Eule::Matrix4x4::e = v[1][0] |
Definition at line 132 of file Matrix4x4.h.
| double& Eule::Matrix4x4::f = v[1][1] |
Definition at line 133 of file Matrix4x4.h.
| double& Eule::Matrix4x4::g = v[1][2] |
Definition at line 134 of file Matrix4x4.h.
| double& Eule::Matrix4x4::h = v[1][3] |
Definition at line 135 of file Matrix4x4.h.
| double& Eule::Matrix4x4::i = v[2][0] |
Definition at line 136 of file Matrix4x4.h.
| double& Eule::Matrix4x4::j = v[2][1] |
Definition at line 137 of file Matrix4x4.h.
| double& Eule::Matrix4x4::k = v[2][2] |
Definition at line 138 of file Matrix4x4.h.
| double& Eule::Matrix4x4::l = v[2][3] |
Definition at line 139 of file Matrix4x4.h.
| double& Eule::Matrix4x4::m = v[3][0] |
Definition at line 140 of file Matrix4x4.h.
| double& Eule::Matrix4x4::n = v[3][1] |
Definition at line 141 of file Matrix4x4.h.
| double& Eule::Matrix4x4::o = v[3][2] |
Definition at line 142 of file Matrix4x4.h.
| double& Eule::Matrix4x4::p = v[3][3] |
Definition at line 143 of file Matrix4x4.h.
| std::array<std::array<double, 4>, 4> Eule::Matrix4x4::v |
Array holding the matrices values.
Definition at line 44 of file Matrix4x4.h.
1.8.17