#include <MRMatrix3.h>
Classes | |
struct | QR |
returns 3 Euler angles, assuming this is a rotation matrix composed as follows: R=R(z)*R(y)*R(x) More... | |
Public Types | |
using | ValueType = T |
using | VectorType = Vector3<T> |
Public Member Functions | |
constexpr | Matrix3 () noexcept=default |
constexpr | Matrix3 (const Vector3< T > &x, const Vector3< T > &y, const Vector3< T > &z) |
initializes matrix from its 3 rows | |
template<typename U > | |
constexpr | Matrix3 (const Matrix3< U > &m) |
constexpr const Vector3< T > & | operator[] (int row) const noexcept |
row access | |
constexpr Vector3< T > & | operator[] (int row) noexcept |
constexpr Vector3< 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 |
constexpr T | det () const noexcept |
computes determinant of the matrix | |
constexpr Matrix3< T > inverse() const noexcept MR_REQUIRES_IF_SUPPORTED(!std constexpr Matrix3< T > | transposed () const noexcept |
computes inverse matrix | |
QR qr() const noexcept MR_REQUIRES_IF_SUPPORTED(!std Matrix3 & | operator+= (const Matrix3< T > &b) |
decompose this matrix on the product Q*R, where Q is orthogonal and R is upper triangular | |
Matrix3 & | operator-= (const Matrix3< T > &b) |
Matrix3 & | operator*= (T b) |
Matrix3 & | operator/= (T b) |
Static Public Member Functions | |
static constexpr Matrix3 | zero () noexcept |
static constexpr Matrix3 | identity () noexcept |
static constexpr Matrix3 | scale (T s) noexcept |
returns a matrix that scales uniformly | |
static constexpr Matrix3 | scale (T sx, T sy, T sz) noexcept |
returns a matrix that has its own scale along each axis | |
static constexpr Matrix3 | scale (const Vector3< T > &s) noexcept |
static constexpr Matrix3 | fromColumns (const Vector3< T > &x, const Vector3< T > &y, const Vector3< T > &z) noexcept |
Public Attributes | |
Vector3< T > | x { 1, 0, 0 } |
rows, identity matrix by default | |
Vector3< T > | y { 0, 1, 0 } |
Vector3< T > | z { 0, 0, 1 } |
Static Public Attributes | |
static constexpr Matrix3 static rotation(const Vector3< T > &axis, T angle) noexcept MR_REQUIRES_IF_SUPPORTED(std constexpr Matrix3 static rotation(const Vector3< T > &from, const Vector3< T > &to) noexcept MR_REQUIRES_IF_SUPPORTED(std constexpr Matrix3 static rotationFromEuler(const Vector3< T > &eulerAngles) noexcept MR_REQUIRES_IF_SUPPORTED(std constexpr Matrix3 static approximateLinearRotationMatrixFromEuler(const Vector3< T > &eulerAngles) noexcept MR_REQUIRES_IF_SUPPORTED(std constexpr Matrix | fromRows )(const Vector3< T > &x, const Vector3< T > &y, const Vector3< T > &z) noexcept |
creates matrix representing rotation around given axis on given angle | |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T > | |
Vector3< T > | operator* (const Matrix3< T > &a, const Vector3< T > &b) |
x = a * b | |
template<typename T > | |
T | dot (const Matrix3< T > &a, const Matrix3< T > &b) |
double-dot product: x = a : b | |
template<typename T > | |
Matrix3< T > | operator* (const Matrix3< T > &a, const Matrix3< T > &b) |
product of two matrices | |
template<typename T > | |
Matrix3< T > | outer (const Vector3< T > &a, const Vector3< T > &b) |
x = a * b^T | |
arbitrary 3x3 matrix
using MR::Matrix3< T >::ValueType = T |
using MR::Matrix3< T >::VectorType = Vector3<T> |
|
constexprdefaultnoexcept |
|
inlineconstexpr |
initializes matrix from its 3 rows
|
inlineexplicitconstexpr |
|
inlineconstexprnoexcept |
column access
|
constexprnoexcept |
computes determinant of the matrix
|
inlinestaticconstexprnoexcept |
constructs a matrix from its 3 columns; use this method to get the matrix that transforms basis vectors ( plusX, plusY, plusZ ) into vectors ( x, y, z ) respectively
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
compute sum of squared matrix elements
|
inline |
|
inlinenoexcept |
decompose this matrix on the product Q*R, where Q is orthogonal and R is upper triangular
|
inline |
|
inline |
|
inlineconstexprnoexcept |
row access
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
returns a matrix that scales uniformly
|
inlinestaticconstexprnoexcept |
returns a matrix that has its own scale along each axis
|
inlineconstexprnoexcept |
computes trace of the matrix
|
constexprnoexcept |
computes inverse matrix
computes transposed matrix
|
inlinestaticconstexprnoexcept |
double-dot product: x = a : b
|
related |
product of two matrices
|
related |
x = a * b
x = a * b^T
|
inlinestaticconstexprnoexcept |
creates matrix representing rotation around given axis on given angle
creates matrix representing rotation that after application to (from) makes (to) vector creates matrix representing rotation from 3 Euler angles: R=R(z)*R(y)*R(x) see more https://en.wikipedia.org/wiki/Euler_angles#Conventions_by_intrinsic_rotations returns linear by angles approximation of the rotation matrix, which is close to true rotation matrix for small angles constructs a matrix from its 3 rows
Vector3<T> MR::Matrix3< T >::x { 1, 0, 0 } |
rows, identity matrix by default
Vector3<T> MR::Matrix3< T >::y { 0, 1, 0 } |
Vector3<T> MR::Matrix3< T >::z { 0, 0, 1 } |