MeshLib Documentation
Loading...
Searching...
No Matches
MR::SymMatrix3< T > Struct Template Reference

#include <MRSymMatrix3.h>

Public Types

using ValueType = T
 

Public Member Functions

constexpr SymMatrix3 () noexcept=default
 
template<typename U >
constexpr SymMatrix3 (const SymMatrix3< U > &m)
 
constexpr T trace () const noexcept
 computes trace of the matrix
 
constexpr T normSq () const noexcept
 computes the squared norm of the matrix, which is equal to the sum of 9 squared elements
 
constexpr T det () const noexcept
 computes determinant of the matrix
 
constexpr SymMatrix3< T > inverse () const noexcept
 computes inverse matrix
 
constexpr SymMatrix3< T > inverse (T det) const noexcept
 computes inverse matrix given determinant of this
 
SymMatrix3operator+= (const SymMatrix3< T > &b)
 
SymMatrix3operator-= (const SymMatrix3< T > &b)
 
SymMatrix3operator*= (T b)
 
SymMatrix3operator/= (T b)
 

Static Public Member Functions

static constexpr SymMatrix3 identity () noexcept
 
static constexpr SymMatrix3 diagonal (T diagVal) noexcept
 

Public Attributes

xx = 0
 zero matrix by default
 
xy = 0
 
xz = 0
 
yy = 0
 
yz = 0
 
zz = 0
 

Related Symbols

(Note that these are not member symbols.)

template<typename T >
Vector3< T > operator* (const SymMatrix3< T > &a, const Vector3< T > &b)
 x = a * b
 
template<typename T >
SymMatrix3< T > outerSquare (const Vector3< T > &a)
 x = a * a^T
 
template<typename T >
SymMatrix3< T > outerSquare (T k, const Vector3< T > &a)
 x = k * a * a^T
 
template<typename T >
SymMatrix3< T > crossSquare (const Vector3< T > &a)
 

Detailed Description

template<typename T>
struct MR::SymMatrix3< T >

symmetric 3x3 matrix

Member Typedef Documentation

◆ ValueType

template<typename T >
using MR::SymMatrix3< T >::ValueType = T

Constructor & Destructor Documentation

◆ SymMatrix3() [1/2]

template<typename T >
MR::SymMatrix3< T >::SymMatrix3 ( )
constexprdefaultnoexcept

◆ SymMatrix3() [2/2]

template<typename T >
template<typename U >
MR::SymMatrix3< T >::SymMatrix3 ( const SymMatrix3< U > & m)
inlineexplicitconstexpr

Member Function Documentation

◆ det()

template<typename T >
T MR::SymMatrix3< T >::det ( ) const
constexprnoexcept

computes determinant of the matrix

◆ diagonal()

template<typename T >
static constexpr SymMatrix3 MR::SymMatrix3< T >::diagonal ( T diagVal)
inlinestaticconstexprnoexcept

◆ identity()

template<typename T >
static constexpr SymMatrix3 MR::SymMatrix3< T >::identity ( )
inlinestaticconstexprnoexcept

◆ inverse() [1/2]

template<typename T >
SymMatrix3< T > MR::SymMatrix3< T >::inverse ( ) const
inlineconstexprnoexcept

computes inverse matrix

◆ inverse() [2/2]

template<typename T >
SymMatrix3< T > MR::SymMatrix3< T >::inverse ( T det) const
constexprnoexcept

computes inverse matrix given determinant of this

◆ normSq()

template<typename T >
T MR::SymMatrix3< T >::normSq ( ) const
constexprnoexcept

computes the squared norm of the matrix, which is equal to the sum of 9 squared elements

◆ operator*=()

template<typename T >
SymMatrix3 & MR::SymMatrix3< T >::operator*= ( T b)
inline

◆ operator+=()

template<typename T >
SymMatrix3 & MR::SymMatrix3< T >::operator+= ( const SymMatrix3< T > & b)
inline

◆ operator-=()

template<typename T >
SymMatrix3 & MR::SymMatrix3< T >::operator-= ( const SymMatrix3< T > & b)
inline

◆ operator/=()

template<typename T >
SymMatrix3 & MR::SymMatrix3< T >::operator/= ( T b)
inline

◆ trace()

template<typename T >
T MR::SymMatrix3< T >::trace ( ) const
inlineconstexprnoexcept

computes trace of the matrix

Friends And Related Symbol Documentation

◆ crossSquare()

template<typename T >
SymMatrix3< T > crossSquare ( const Vector3< T > & a)
related

computes a matrix that gives double application of a cross product with given vector M x = [ a, [a, x] ] https://en.wikipedia.org/wiki/Cross_product#Alternative_ways_to_compute

◆ operator*()

template<typename T >
Vector3< T > operator* ( const SymMatrix3< T > & a,
const Vector3< T > & b )
related

x = a * b

◆ outerSquare() [1/2]

template<typename T >
SymMatrix3< T > outerSquare ( const Vector3< T > & a)
related

x = a * a^T

◆ outerSquare() [2/2]

template<typename T >
SymMatrix3< T > outerSquare ( T k,
const Vector3< T > & a )
related

x = k * a * a^T

Member Data Documentation

◆ xx

template<typename T >
T MR::SymMatrix3< T >::xx = 0

zero matrix by default

◆ xy

template<typename T >
T MR::SymMatrix3< T >::xy = 0

◆ xz

template<typename T >
T MR::SymMatrix3< T >::xz = 0

◆ yy

template<typename T >
T MR::SymMatrix3< T >::yy = 0

◆ yz

template<typename T >
T MR::SymMatrix3< T >::yz = 0

◆ zz

template<typename T >
T MR::SymMatrix3< T >::zz = 0

The documentation for this struct was generated from the following file: