Developer Documentation
ACG::Matrix3x3T< Scalar > Class Template Reference

#include <OpenFlipper/libs_required/ACG/Math/Matrix3x3T.hh>

Public Types

using value_type = Scalar
 
typedef OpenMesh::VectorT< Scalar, 3 > Vec3
 

Public Member Functions

constexpr Matrix3x3T (std::array< Scalar, 9 > row_major)
 
constexpr bool operator== (const Matrix3x3T &rhs) const
 
constexpr const Scalar & operator() (uint_fast8_t r, uint_fast8_t c) const
 
Scalar & operator() (uint_fast8_t r, uint_fast8_t c)
 
constexpr const Scalar & operator[] (uint_fast8_t i) const
 Linearized row major access. More...
 
Scalar & operator[] (uint_fast8_t i)
 Linearized row major access. More...
 
Vec3 getRow (uint_fast8_t r) const
 
void setRow (uint_fast8_t r, const Vec3 &v)
 
Vec3 getCol (uint_fast8_t c) const
 
void setCol (uint_fast8_t c, const Vec3 &v)
 
constexpr Matrix3x3T operator* (const Matrix3x3T &rhs) const
 
template<typename OtherScalar >
constexpr auto operator* (const VectorT< OtherScalar, 3 > &rhs) const -> OpenMesh::VectorT< decltype(std::declval< Scalar >() *rhs[0]), 3 >
 
constexpr Matrix3x3T operator* (Scalar c) const
 
constexpr Matrix3x3T operator+ (const Matrix3x3T &rhs) const
 
constexpr Matrix3x3T operator- (const Matrix3x3T &rhs) const
 
constexpr Matrix3x3T operator- () const
 
const Matrix3x3Toperator*= (const Matrix3x3T &rhs)
 
constexpr Scalar det () const
 
constexpr Scalar trace () const
 
void transpose ()
 
constexpr Matrix3x3T transposed () const
 
void invert ()
 
Matrix3x3T inverse () const
 
constexpr Scalar frobeniusSquared () const
 
constexpr double frobenius () const
 

Static Public Member Functions

static Matrix3x3T< Scalar > fromColumns (Vec3 c1, Vec3 c2, Vec3 c3)
 
static Matrix3x3T< Scalar > fromRows (Vec3 r1, Vec3 r2, Vec3 r3)
 
static constexpr Matrix3x3T< Scalar > identity ()
 
static constexpr Matrix3x3T< Scalar > zero ()
 
static constexpr uint_fast8_t indexof (uint_fast8_t r, uint_fast8_t c)
 Map row/column index to linearized index. More...
 

Private Attributes

std::array< Scalar, 9 > values_
 

Friends

template<typename OtherScalar >
constexpr friend auto operator* (VectorT< OtherScalar, 3 > v, const Matrix3x3T &rhs) -> OpenMesh::VectorT< decltype(std::declval< Scalar >() *v[0]), 3 >
 
constexpr friend Matrix3x3T operator* (Scalar c, const Matrix3x3T &rhs)
 
std::ostream & operator<< (std::ostream &os, const Matrix3x3T &m)
 

Detailed Description

template<typename Scalar>
class ACG::Matrix3x3T< Scalar >

Small, kinda fast 3x3 matrix class.

Definition at line 18 of file Matrix3x3T.hh.

Member Typedef Documentation

◆ value_type

template<typename Scalar >
using ACG::Matrix3x3T< Scalar >::value_type = Scalar

Definition at line 20 of file Matrix3x3T.hh.

◆ Vec3

template<typename Scalar >
typedef OpenMesh::VectorT<Scalar, 3> ACG::Matrix3x3T< Scalar >::Vec3

Definition at line 21 of file Matrix3x3T.hh.

Constructor & Destructor Documentation

◆ Matrix3x3T()

template<typename Scalar >
constexpr ACG::Matrix3x3T< Scalar >::Matrix3x3T ( std::array< Scalar, 9 >  row_major)
inlineconstexpr

Initialize matrix from array in row major format.

Definition at line 61 of file Matrix3x3T.hh.

Member Function Documentation

◆ det()

template<typename Scalar >
constexpr Scalar ACG::Matrix3x3T< Scalar >::det ( ) const
inlineconstexpr

Definition at line 196 of file Matrix3x3T.hh.

◆ frobenius()

template<typename Scalar >
constexpr double ACG::Matrix3x3T< Scalar >::frobenius ( ) const
inlineconstexpr

Definition at line 253 of file Matrix3x3T.hh.

◆ frobeniusSquared()

template<typename Scalar >
constexpr Scalar ACG::Matrix3x3T< Scalar >::frobeniusSquared ( ) const
inlineconstexpr

Definition at line 248 of file Matrix3x3T.hh.

◆ fromColumns()

template<typename Scalar >
static Matrix3x3T< Scalar > ACG::Matrix3x3T< Scalar >::fromColumns ( Vec3  c1,
Vec3  c2,
Vec3  c3 
)
inlinestatic

Definition at line 23 of file Matrix3x3T.hh.

◆ fromRows()

template<typename Scalar >
static Matrix3x3T< Scalar > ACG::Matrix3x3T< Scalar >::fromRows ( Vec3  r1,
Vec3  r2,
Vec3  r3 
)
inlinestatic

Definition at line 31 of file Matrix3x3T.hh.

◆ getCol()

template<typename Scalar >
Vec3 ACG::Matrix3x3T< Scalar >::getCol ( uint_fast8_t  c) const
inline

Definition at line 104 of file Matrix3x3T.hh.

◆ getRow()

template<typename Scalar >
Vec3 ACG::Matrix3x3T< Scalar >::getRow ( uint_fast8_t  r) const
inline

Definition at line 96 of file Matrix3x3T.hh.

◆ identity()

template<typename Scalar >
static constexpr Matrix3x3T< Scalar > ACG::Matrix3x3T< Scalar >::identity ( )
inlinestaticconstexpr

Definition at line 39 of file Matrix3x3T.hh.

◆ indexof()

template<typename Scalar >
static constexpr uint_fast8_t ACG::Matrix3x3T< Scalar >::indexof ( uint_fast8_t  r,
uint_fast8_t  c 
)
inlinestaticconstexpr

Map row/column index to linearized index.

Definition at line 74 of file Matrix3x3T.hh.

◆ inverse()

template<typename Scalar >
Matrix3x3T ACG::Matrix3x3T< Scalar >::inverse ( ) const
inline

Definition at line 233 of file Matrix3x3T.hh.

◆ invert()

template<typename Scalar >
void ACG::Matrix3x3T< Scalar >::invert ( )
inline

Definition at line 229 of file Matrix3x3T.hh.

◆ operator()() [1/2]

template<typename Scalar >
Scalar & ACG::Matrix3x3T< Scalar >::operator() ( uint_fast8_t  r,
uint_fast8_t  c 
)
inline

Definition at line 82 of file Matrix3x3T.hh.

◆ operator()() [2/2]

template<typename Scalar >
constexpr const Scalar & ACG::Matrix3x3T< Scalar >::operator() ( uint_fast8_t  r,
uint_fast8_t  c 
) const
inlineconstexpr

Definition at line 78 of file Matrix3x3T.hh.

◆ operator*() [1/3]

template<typename Scalar >
constexpr Matrix3x3T ACG::Matrix3x3T< Scalar >::operator* ( const Matrix3x3T< Scalar > &  rhs) const
inlineconstexpr

Definition at line 113 of file Matrix3x3T.hh.

◆ operator*() [2/3]

template<typename Scalar >
template<typename OtherScalar >
constexpr auto ACG::Matrix3x3T< Scalar >::operator* ( const VectorT< OtherScalar, 3 > &  rhs) const -> OpenMesh::VectorT<decltype(std::declval<Scalar>() * rhs[0]), 3>
inlineconstexpr

Definition at line 130 of file Matrix3x3T.hh.

◆ operator*() [3/3]

template<typename Scalar >
constexpr Matrix3x3T ACG::Matrix3x3T< Scalar >::operator* ( Scalar  c) const
inlineconstexpr

Definition at line 151 of file Matrix3x3T.hh.

◆ operator*=()

template<typename Scalar >
const Matrix3x3T & ACG::Matrix3x3T< Scalar >::operator*= ( const Matrix3x3T< Scalar > &  rhs)
inline

Definition at line 191 of file Matrix3x3T.hh.

◆ operator+()

template<typename Scalar >
constexpr Matrix3x3T ACG::Matrix3x3T< Scalar >::operator+ ( const Matrix3x3T< Scalar > &  rhs) const
inlineconstexpr

Definition at line 167 of file Matrix3x3T.hh.

◆ operator-() [1/2]

template<typename Scalar >
constexpr Matrix3x3T ACG::Matrix3x3T< Scalar >::operator- ( ) const
inlineconstexpr

Definition at line 183 of file Matrix3x3T.hh.

◆ operator-() [2/2]

template<typename Scalar >
constexpr Matrix3x3T ACG::Matrix3x3T< Scalar >::operator- ( const Matrix3x3T< Scalar > &  rhs) const
inlineconstexpr

Definition at line 175 of file Matrix3x3T.hh.

◆ operator==()

template<typename Scalar >
constexpr bool ACG::Matrix3x3T< Scalar >::operator== ( const Matrix3x3T< Scalar > &  rhs) const
inlineconstexpr

Definition at line 64 of file Matrix3x3T.hh.

◆ operator[]() [1/2]

template<typename Scalar >
Scalar & ACG::Matrix3x3T< Scalar >::operator[] ( uint_fast8_t  i)
inline

Linearized row major access.

Definition at line 92 of file Matrix3x3T.hh.

◆ operator[]() [2/2]

template<typename Scalar >
constexpr const Scalar & ACG::Matrix3x3T< Scalar >::operator[] ( uint_fast8_t  i) const
inlineconstexpr

Linearized row major access.

Definition at line 87 of file Matrix3x3T.hh.

◆ setCol()

template<typename Scalar >
void ACG::Matrix3x3T< Scalar >::setCol ( uint_fast8_t  c,
const Vec3 v 
)
inline

Definition at line 107 of file Matrix3x3T.hh.

◆ setRow()

template<typename Scalar >
void ACG::Matrix3x3T< Scalar >::setRow ( uint_fast8_t  r,
const Vec3 v 
)
inline

Definition at line 99 of file Matrix3x3T.hh.

◆ trace()

template<typename Scalar >
constexpr Scalar ACG::Matrix3x3T< Scalar >::trace ( ) const
inlineconstexpr

Definition at line 211 of file Matrix3x3T.hh.

◆ transpose()

template<typename Scalar >
void ACG::Matrix3x3T< Scalar >::transpose ( )
inline

Definition at line 215 of file Matrix3x3T.hh.

◆ transposed()

template<typename Scalar >
constexpr Matrix3x3T ACG::Matrix3x3T< Scalar >::transposed ( ) const
inlineconstexpr

Definition at line 221 of file Matrix3x3T.hh.

◆ zero()

template<typename Scalar >
static constexpr Matrix3x3T< Scalar > ACG::Matrix3x3T< Scalar >::zero ( )
inlinestaticconstexpr

Definition at line 47 of file Matrix3x3T.hh.

Friends And Related Function Documentation

◆ operator* [1/2]

template<typename Scalar >
constexpr friend Matrix3x3T operator* ( Scalar  c,
const Matrix3x3T< Scalar > &  rhs 
)
friend

Definition at line 159 of file Matrix3x3T.hh.

◆ operator* [2/2]

template<typename Scalar >
template<typename OtherScalar >
constexpr friend auto operator* ( VectorT< OtherScalar, 3 >  v,
const Matrix3x3T< Scalar > &  rhs 
) -> OpenMesh::VectorT<decltype(std::declval<Scalar>() * v[0]), 3>
friend

Definition at line 141 of file Matrix3x3T.hh.

◆ operator<<

template<typename Scalar >
std::ostream & operator<< ( std::ostream &  os,
const Matrix3x3T< Scalar > &  m 
)
friend

Definition at line 259 of file Matrix3x3T.hh.

Member Data Documentation

◆ values_

template<typename Scalar >
std::array<Scalar, 9> ACG::Matrix3x3T< Scalar >::values_
private

Definition at line 267 of file Matrix3x3T.hh.


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