#include <MRMatrix4.h>
Public Types | |
| using | ValueType = T |
| using | VectorType = Vector4<T> |
Public Member Functions | |
| constexpr | Matrix4 () noexcept |
| constexpr | Matrix4 (const Vector4< T > &x, const Vector4< T > &y, const Vector4< T > &z, const Vector4< T > &w) |
| initializes matrix from 4 row-vectors | |
| constexpr | Matrix4 (const Matrix3< T > &r, const Vector3< T > &t) |
| construct from rotation matrix and translation vector | |
| template<MR_SAME_TYPE_TEMPLATE_PARAM(T, TT) > | |
| constexpr | Matrix4 (const AffineXf3< TT > &xf) MR_REQUIRES_IF_SUPPORTED(std |
| template<typename U > | |
| constexpr | Matrix4 (const Matrix4< U > &m) |
| constexpr const T & | operator() (int row, int col) const noexcept |
| element access | |
| constexpr T & | operator() (int row, int col) noexcept |
| constexpr const Vector4< T > & | operator[] (int row) const noexcept |
| row access | |
| constexpr Vector4< T > & | operator[] (int row) noexcept |
| constexpr Vector4< T > | col (int i) const noexcept |
| column access | |
| constexpr T | trace () const noexcept |
| computes trace of the matrix | |
| constexpr T | normSq () const noexcept |
| compute sum of squared matrix elements | |
| constexpr auto | norm () const noexcept |
| Matrix3< T > | submatrix3 (int i, int j) const noexcept |
| computes submatrix of the matrix with excluded i-th row and j-th column | |
| T | det () const noexcept |
| computes determinant of the matrix | |
| constexpr Matrix4< T > inverse() const noexcept MR_REQUIRES_IF_SUPPORTED(!std constexpr Matrix4< T > | transposed () const noexcept |
| computes inverse matrix | |
| constexpr Matrix3< T > | getRotation () const noexcept |
| void | setRotation (const Matrix3< T > &rot) noexcept |
| constexpr Vector3< T > | getTranslation () const noexcept |
| void | setTranslation (const Vector3< T > &t) noexcept |
| constexpr T * | data () |
| constexpr const T * | data () const |
| template<MR_SAME_TYPE_TEMPLATE_PARAM(T, TT) > | |
| operator AffineXf3< TT > () const MR_REQUIRES_IF_SUPPORTED(std | |
Static Public Member Functions | |
| static constexpr Matrix4 | zero () noexcept |
| static constexpr Matrix4 | identity () noexcept |
| static constexpr Matrix4 | scale (T s) noexcept |
| returns a matrix that scales uniformly | |
Public Attributes | |
| Vector4< T > | x { 1, 0, 0, 0 } |
| rows, identity matrix by default | |
| Vector4< T > | y { 0, 1, 0, 0 } |
| Vector4< T > | z { 0, 0, 1, 0 } |
| Vector4< T > | w { 0, 0, 0, 1 } |
Friends | |
| Vector3< T > operator()(const Vector3< T > &b) const MR_REQUIRES_IF_SUPPORTED(!std friend constexpr bool | operator== (const Matrix4< T > &a, const Matrix4< T > &b) |
| constexpr bool | operator!= (const Matrix4< T > &a, const Matrix4< T > &b) |
| constexpr auto | operator+ (const Matrix4< T > &a, const Matrix4< T > &b) -> Matrix4< decltype(std::declval< T >()+std::declval< T >())> |
| constexpr auto | operator- (const Matrix4< T > &a, const Matrix4< T > &b) -> Matrix4< decltype(std::declval< T >() - std::declval< T >())> |
| constexpr auto | operator* (T a, const Matrix4< T > &b) -> Matrix4< decltype(std::declval< T >() *std::declval< T >())> |
| constexpr auto | operator* (const Matrix4< T > &b, T a) -> Matrix4< decltype(std::declval< T >() *std::declval< T >())> |
| constexpr auto | operator/ (Matrix4< T > b, T a) -> Matrix4< decltype(std::declval< T >()/std::declval< T >())> |
| constexpr Matrix4< T > & | operator+= (Matrix4< T > &a, const Matrix4< T > &b) |
| constexpr Matrix4< T > & | operator-= (Matrix4< T > &a, const Matrix4< T > &b) |
| constexpr Matrix4< T > & | operator*= (Matrix4< T > &a, T b) |
| constexpr Matrix4< T > & | operator/= (Matrix4< T > &a, T b) |
| constexpr auto | operator* (const Matrix4< T > &a, const Vector4< T > &b) -> Vector4< decltype(dot(std::declval< Vector4< T > >(), std::declval< Vector4< T > >()))> |
| x = a * b | |
| constexpr auto | operator* (const Matrix4< T > &a, const Matrix4< T > &b) -> Matrix4< decltype(dot(std::declval< Vector4< T > >(), std::declval< Vector4< T > >()))> |
| product of two matrices | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<typename T > | |
| auto | dot (const Matrix4< T > &a, const Matrix4< T > &b) -> decltype(dot(a.x, b.x)) |
| double-dot product: x = a : b | |
| template<typename T > | |
| Matrix4< T > | outer (const Vector4< T > &a, const Vector4< T > &b) |
| x = a * b^T | |
arbitrary 4x4 matrix
| using MR::Matrix4< T >::ValueType = T |
| using MR::Matrix4< T >::VectorType = Vector4<T> |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
initializes matrix from 4 row-vectors
|
inlineconstexpr |
construct from rotation matrix and translation vector
|
inlineconstexpr |
|
inlineexplicitconstexpr |
|
inlineconstexprnoexcept |
column access
|
inlineconstexpr |
|
inlineconstexpr |
|
noexcept |
computes determinant of the matrix
|
constexprnoexcept |
|
constexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
compute sum of squared matrix elements
|
inline |
|
inlineconstexprnoexcept |
element access
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
row access
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
returns a matrix that scales uniformly
|
noexcept |
|
noexcept |
|
noexcept |
computes submatrix of the matrix with excluded i-th row and j-th column
|
inlineconstexprnoexcept |
computes trace of the matrix
|
constexprnoexcept |
computes inverse matrix
computes transposed matrix
|
inlinestaticconstexprnoexcept |
|
related |
double-dot product: x = a : b
|
friend |
product of two matrices
|
friend |
x = a * b
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
converts 3d-vector b in 4d-vector (b,1), multiplies matrix on it, and assuming the result is in homogeneous coordinates returns it as 3d-vector
x = a * b^T
| Vector4<T> MR::Matrix4< T >::w { 0, 0, 0, 1 } |
| Vector4<T> MR::Matrix4< T >::x { 1, 0, 0, 0 } |
rows, identity matrix by default
| Vector4<T> MR::Matrix4< T >::y { 0, 1, 0, 0 } |
| Vector4<T> MR::Matrix4< T >::z { 0, 0, 1, 0 } |