3x3 generic matrix More...
#include <NRE_Matrix3x3.hpp>
Public Member Functions | |
constexpr | Matrix3x3 ()=default |
template<class A , class B , class C , class D , class E , class F , class G , class H , class I > | |
constexpr | Matrix3x3 (A a, B b, C c, D d, E e, F f, G g, H h, I i) |
template<class K > | |
constexpr | Matrix3x3 (K value) |
template<class K , class L , class N > | |
constexpr | Matrix3x3 (Vector3D< K > const &l1, Vector3D< L > const &l2, Vector3D< N > const &l3) |
constexpr | Matrix3x3 (Matrix3x3 const &m)=default |
constexpr | Matrix3x3 (Matrix3x3 &&m)=default |
template<class K > | |
constexpr | Matrix3x3 (Matrix3x3< K > const &m) |
template<class K > | |
constexpr | Matrix3x3 (Matrix4x4< K > const &m) |
~Matrix3x3 ()=default | |
constexpr Vector3D< T > const & | getL1 () const |
constexpr Vector3D< T > const & | getL2 () const |
constexpr Vector3D< T > const & | getL3 () const |
constexpr Vector3D< T > | getC1 () const |
constexpr Vector3D< T > | getC2 () const |
constexpr Vector3D< T > | getC3 () const |
constexpr long double | getDeterminant () const |
template<class K > | |
constexpr void | setL1 (Vector3D< K > const &l1) |
template<class K > | |
constexpr void | setL2 (Vector3D< K > const &l2) |
template<class K > | |
constexpr void | setL3 (Vector3D< K > const &l3) |
template<class K > | |
constexpr void | setC1 (Vector3D< K > const &c1) |
template<class K > | |
constexpr void | setC2 (Vector3D< K > const &c2) |
template<class K > | |
constexpr void | setC3 (Vector3D< K > const &c3) |
constexpr Matrix3x3 & | setIdentity () |
constexpr Matrix3x3 & | transpose () |
constexpr Matrix3x3 & | inverse () |
template<class K > | |
constexpr Matrix3x3 & | translate (Vector2D< K > const &u) |
template<class K > | |
constexpr Matrix3x3 & | scale (Vector2D< K > const &u) |
template<class K , typename = UseIfArithmetic<K>> | |
constexpr Matrix3x3 & | stretchX (K u) |
template<class K , typename = UseIfArithmetic<K>> | |
constexpr Matrix3x3 & | stretchY (K u) |
template<class K , typename = UseIfArithmetic<K>> | |
constexpr Matrix3x3 & | squeezeX (K u) |
template<class K , typename = UseIfArithmetic<K>> | |
constexpr Matrix3x3 & | squeezeY (K u) |
template<class K , typename = UseIfArithmetic<K>> | |
constexpr Matrix3x3 & | shearX (K u) |
template<class K , typename = UseIfArithmetic<K>> | |
constexpr Matrix3x3 & | shearY (K u) |
constexpr Matrix3x3 & | rotate (Angle angle) |
constexpr const T * | value () const |
constexpr Vector3D< T > & | operator[] (std::size_t index) |
constexpr Vector3D< T > const & | operator[] (std::size_t index) const |
constexpr Matrix3x3 & | operator= (Matrix3x3 const &m)=default |
constexpr Matrix3x3 & | operator= (Matrix3x3 &&m)=default |
template<class K > | |
constexpr Matrix3x3 & | operator= (Matrix3x3< K > const &m) |
template<class K > | |
constexpr Matrix3x3 & | operator= (Matrix3x3< K > &&m) |
template<class K > | |
constexpr Matrix3x3 & | operator+= (Matrix3x3< K > const &m) |
template<class K > | |
constexpr Matrix3x3 & | operator-= (Matrix3x3< K > const &m) |
template<class K > | |
constexpr Matrix3x3 & | operator*= (K k) |
template<class K > | |
constexpr Matrix3x3 & | operator*= (Matrix3x3< K > const &m) |
template<class K > | |
constexpr Matrix3x3 & | operator/= (K k) |
template<class K > | |
constexpr Matrix3x3 & | operator/= (Matrix3x3< K > const &m) |
template<class K > | |
constexpr Matrix3x3< std::common_type_t< T, K > > | operator+ (Matrix3x3< K > const &m) const |
template<class K > | |
constexpr Matrix3x3< std::common_type_t< T, K > > | operator- (Matrix3x3< K > const &m) const |
template<class K > | |
constexpr Matrix3x3< std::common_type_t< T, K > > | operator* (K k) const |
template<class K > | |
constexpr Matrix3x3< std::common_type_t< T, K > > | operator* (Matrix3x3< K > const &m) const |
template<class K > | |
constexpr Vector3D< K > | operator* (Vector3D< K > const &u) const |
template<class K > | |
constexpr Segment3D< K > | operator* (Segment3D< K > const &s) const |
constexpr BezierCurve3D | operator* (BezierCurve3D const &c) const |
template<class K > | |
constexpr Matrix3x3< std::common_type_t< T, K > > | operator/ (K k) const |
template<class K > | |
constexpr Matrix3x3< std::common_type_t< T, K > > | operator/ (Matrix3x3< K > const &m) const |
template<class K > | |
constexpr bool | operator== (Matrix3x3< K > const &m) const |
template<class K > | |
constexpr bool | operator!= (Matrix3x3< K > const &m) const |
Utility::String | toString () const |
Static Public Attributes | |
static constexpr Matrix3x3 | IDENTITY = Matrix3x3(1, 0, 0, 0, 1, 0, 0, 0, 1) |
3x3 generic matrix
|
default |
Default constructor
constexpr NRE::Math::Matrix3x3< T >::Matrix3x3 | ( | A | a, |
B | b, | ||
C | c, | ||
D | d, | ||
E | e, | ||
F | f, | ||
G | g, | ||
H | h, | ||
I | i | ||
) |
Construct a matrix with passed values
a | first matrix component |
b | second matrix component |
c | third matrix component |
d | fourth matrix component |
e | fifth matrix component |
f | sixth matrix component |
g | seventh matrix component |
h | eighth matrix component |
i | ninth matrix component |
Construct a matrix with a unique value for all component
value | new value for all component |
constexpr NRE::Math::Matrix3x3< T >::Matrix3x3 | ( | Vector3D< K > const & | l1, |
Vector3D< L > const & | l2, | ||
Vector3D< N > const & | l3 | ||
) |
Construct a matrix with their lines passed in parameters with vector
l1 | the new value for the first line |
l2 | the new value for the second line |
l3 | the new value for the third line |
|
default |
Copy m into this
m | the object to copy |
|
default |
Move m into this
m | the object to move |
constexpr NRE::Math::Matrix3x3< T >::Matrix3x3 | ( | Matrix3x3< K > const & | m | ) |
Convert a K-type matrix into a T-type matrix
m | the K-type matrix to convert |
constexpr NRE::Math::Matrix3x3< T >::Matrix3x3 | ( | Matrix4x4< K > const & | m | ) |
Convert a K-type 4x4 matrix into a T-type 3x3 matrix
m | the K-type 4x4 matrix to convert |
|
default |
Matrix3x3 Deconstructor
constexpr Vector3D<T> NRE::Math::Matrix3x3< T >::getC1 | ( | ) | const |
constexpr Vector3D<T> NRE::Math::Matrix3x3< T >::getC2 | ( | ) | const |
constexpr Vector3D<T> NRE::Math::Matrix3x3< T >::getC3 | ( | ) | const |
constexpr long double NRE::Math::Matrix3x3< T >::getDeterminant | ( | ) | const |
constexpr Vector3D<T> const& NRE::Math::Matrix3x3< T >::getL1 | ( | ) | const |
constexpr Vector3D<T> const& NRE::Math::Matrix3x3< T >::getL2 | ( | ) | const |
constexpr Vector3D<T> const& NRE::Math::Matrix3x3< T >::getL3 | ( | ) | const |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::inverse | ( | ) |
Inverse the matrix, if not possible the matrix become the identity one
constexpr bool NRE::Math::Matrix3x3< T >::operator!= | ( | Matrix3x3< K > const & | m | ) | const |
Difference test between this and m
m | the matrix to test with this |
constexpr Matrix3x3<std::common_type_t<T, K> > NRE::Math::Matrix3x3< T >::operator* | ( | K | k | ) | const |
Compute the matrix resulting in the multiplication of this by k
k | the multiplication factor |
constexpr Matrix3x3<std::common_type_t<T, K> > NRE::Math::Matrix3x3< T >::operator* | ( | Matrix3x3< K > const & | m | ) | const |
Compute the matrix resulting in the multiplication of this and m
m | the matrix to multiply with this |
constexpr Vector3D<K> NRE::Math::Matrix3x3< T >::operator* | ( | Vector3D< K > const & | u | ) | const |
Compute the vector resulting in the transformation of u by this
u | the vector to transform |
constexpr Segment3D<K> NRE::Math::Matrix3x3< T >::operator* | ( | Segment3D< K > const & | s | ) | const |
Compute the segment resulting in the transformation of s by this
s | the segment to transform |
constexpr BezierCurve3D NRE::Math::Matrix3x3< T >::operator* | ( | BezierCurve3D const & | c | ) | const |
Compute the bezier curve resulting in the transformation of c by this
c | the bezier curve to transform |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator*= | ( | K | k | ) |
Multiply this by k
k | the multiplication factor |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator*= | ( | Matrix3x3< K > const & | m | ) |
Multiply this with m
m | the matrix to multiply with this |
constexpr Matrix3x3<std::common_type_t<T, K> > NRE::Math::Matrix3x3< T >::operator+ | ( | Matrix3x3< K > const & | m | ) | const |
Compute the matrix resulting in the addition of this and m
m | the matrix to add with this |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator+= | ( | Matrix3x3< K > const & | m | ) |
Add m into this
m | the matrix to add into this |
constexpr Matrix3x3<std::common_type_t<T, K> > NRE::Math::Matrix3x3< T >::operator- | ( | Matrix3x3< K > const & | m | ) | const |
Compute the matrix resulting in the subtraction of this and m
m | the matrix to subtract with this |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator-= | ( | Matrix3x3< K > const & | m | ) |
Subtract m into this
m | the matrix to subtract into this |
constexpr Matrix3x3<std::common_type_t<T, K> > NRE::Math::Matrix3x3< T >::operator/ | ( | K | k | ) | const |
Compute the matrix resulting in the division of this by k
k | the division factor |
constexpr Matrix3x3<std::common_type_t<T, K> > NRE::Math::Matrix3x3< T >::operator/ | ( | Matrix3x3< K > const & | m | ) | const |
Compute the matrix resulting in the division of this and m
m | the matrix to divide with this |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator/= | ( | K | k | ) |
Divide this by k
k | the division factor |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator/= | ( | Matrix3x3< K > const & | m | ) |
Divide this with m
m | the matrix to divide with this |
|
default |
Copy m into this
m | the object to copy into this |
|
default |
Move m into this
m | the object to move into this |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator= | ( | Matrix3x3< K > const & | m | ) |
Copy m into this
m | the object to copy into this |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::operator= | ( | Matrix3x3< K > && | m | ) |
Move m into this
m | the object to move into this |
constexpr bool NRE::Math::Matrix3x3< T >::operator== | ( | Matrix3x3< K > const & | m | ) | const |
Equality test between this and m
m | the matrix to test with this |
constexpr Vector3D<T>& NRE::Math::Matrix3x3< T >::operator[] | ( | std::size_t | index | ) |
Return a reference on a matrix's line
index | the line's index |
constexpr Vector3D<T> const& NRE::Math::Matrix3x3< T >::operator[] | ( | std::size_t | index | ) | const |
Return a const reference on a matrix's line
index | the line's index |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::rotate | ( | Angle | angle | ) |
Add a rotation
angle | the rotation's angle |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::scale | ( | Vector2D< K > const & | u | ) |
Add a scale
u | the scaling vector |
constexpr void NRE::Math::Matrix3x3< T >::setC1 | ( | Vector3D< K > const & | c1 | ) |
First column setter
c1 | the new first column vector |
constexpr void NRE::Math::Matrix3x3< T >::setC2 | ( | Vector3D< K > const & | c2 | ) |
Second column setter
c2 | the new second column vector |
constexpr void NRE::Math::Matrix3x3< T >::setC3 | ( | Vector3D< K > const & | c3 | ) |
Third column setter
c3 | the new third column vector |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::setIdentity | ( | ) |
Set the matrix to the identity matrix
constexpr void NRE::Math::Matrix3x3< T >::setL1 | ( | Vector3D< K > const & | l1 | ) |
First line setter
l1 | the new first line vector |
constexpr void NRE::Math::Matrix3x3< T >::setL2 | ( | Vector3D< K > const & | l2 | ) |
Second line setter
l2 | the new second line vector |
constexpr void NRE::Math::Matrix3x3< T >::setL3 | ( | Vector3D< K > const & | l3 | ) |
Third line setter
l3 | the new third line vector |
|
inline |
Add a shear on the X axis
u | the shear factor |
|
inline |
Add a shear on the Y axis
u | the shear factor |
|
inline |
Add a squeeze on the X axis
u | the squeeze factor |
|
inline |
Add a squeeze on the Y axis
u | the squeeze factor |
|
inline |
Add a stretch on the X axis
u | the stretch factor |
|
inline |
Add a stretch on the Y axis
u | the stretch factor |
Utility::String NRE::Math::Matrix3x3< T >::toString | ( | ) | const |
Convert the matrix into a string
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::translate | ( | Vector2D< K > const & | u | ) |
Add a translation
u | the translation vector |
constexpr Matrix3x3& NRE::Math::Matrix3x3< T >::transpose | ( | ) |
Transpose the matrix
constexpr const T* NRE::Math::Matrix3x3< T >::value | ( | ) | const |
|
static |
Identity matrix