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

#include <MRSymMatrix4.h>

Public Types

using ValueType = T
 

Public Member Functions

constexpr SymMatrix4 () noexcept=default
 
template<typename U >
constexpr SymMatrix4 (const SymMatrix4< 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 16 squared elements
 
SymMatrix4operator+= (const SymMatrix4< T > &b)
 
SymMatrix4operator-= (const SymMatrix4< T > &b)
 
SymMatrix4operator*= (T b)
 
SymMatrix4operator/= (T b)
 
bool operator== (const SymMatrix4< T > &) const =default
 

Static Public Member Functions

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

Public Attributes

xx = 0
 zero matrix by default
 
xy = 0
 
xz = 0
 
xw = 0
 
yy = 0
 
yz = 0
 
yw = 0
 
zz = 0
 
zw = 0
 
ww = 0
 

Related Symbols

(Note that these are not member symbols.)

template<typename T >
Vector4< T > operator* (const SymMatrix4< T > &a, const Vector4< T > &b)
 x = a * b
 
template<typename T >
SymMatrix4< T > outerSquare (const Vector4< T > &a)
 x = a * a^T
 
template<typename T >
SymMatrix4< T > outerSquare (T k, const Vector4< T > &a)
 x = k * a * a^T
 

Detailed Description

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

symmetric 4x4 matrix

Member Typedef Documentation

◆ ValueType

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

Constructor & Destructor Documentation

◆ SymMatrix4() [1/2]

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

◆ SymMatrix4() [2/2]

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

Member Function Documentation

◆ diagonal()

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

◆ identity()

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

◆ normSq()

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

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

◆ operator*=()

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

◆ operator+=()

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

◆ operator-=()

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

◆ operator/=()

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

◆ operator==()

template<typename T >
bool MR::SymMatrix4< T >::operator== ( const SymMatrix4< T > & ) const
default

◆ trace()

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

computes trace of the matrix

Friends And Related Symbol Documentation

◆ operator*()

template<typename T >
Vector4< T > operator* ( const SymMatrix4< T > & a,
const Vector4< T > & b )
related

x = a * b

◆ outerSquare() [1/2]

template<typename T >
SymMatrix4< T > outerSquare ( const Vector4< T > & a)
related

x = a * a^T

◆ outerSquare() [2/2]

template<typename T >
SymMatrix4< T > outerSquare ( T k,
const Vector4< T > & a )
related

x = k * a * a^T

Member Data Documentation

◆ ww

template<typename T >
T MR::SymMatrix4< T >::ww = 0

◆ xw

template<typename T >
T MR::SymMatrix4< T >::xw = 0

◆ xx

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

zero matrix by default

◆ xy

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

◆ xz

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

◆ yw

template<typename T >
T MR::SymMatrix4< T >::yw = 0

◆ yy

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

◆ yz

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

◆ zw

template<typename T >
T MR::SymMatrix4< T >::zw = 0

◆ zz

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

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