API Documentation
Loading...
Searching...
No Matches
Matrix< t_type, t_row_dims, t_col_dims > Class Template Reference

#include <Matrix.hpp>

Inheritance diagram for Matrix< t_type, t_row_dims, t_col_dims >:
[legend]
Collaboration diagram for Matrix< t_type, t_row_dims, t_col_dims >:
[legend]

Public Member Functions

constexpr Matrix ()
 
constexpr Matrix (const t_type diagonal)
 
constexpr Matrix (const t_type n00, const t_type n10, const t_type n01, const t_type n11)
 
constexpr Matrix (const t_type n00, const t_type n10, const t_type n20, const t_type n01, const t_type n11, const t_type n21, const t_type n02, const t_type n12, const t_type n22)
 
constexpr Matrix (const t_type n00, const t_type n10, const t_type n20, const t_type n30, const t_type n01, const t_type n11, const t_type n21, const t_type n31, const t_type n02, const t_type n12, const t_type n22, const t_type n32, const t_type n03, const t_type n13, const t_type n23, const t_type n33)
 
template<class t_angle_type >
constexpr Matrix (const Vector< t_row_dims - 1, t_type > &offset, const Vector< 3, Angle< t_angle_type > > &orientation, const Vector< t_row_dims - 1, t_type > &scale)
 
constexpr Matrix (const Vector< t_row_dims *t_col_dims, t_type > &vector)
 
constexpr Matrix (const Vector< t_row_dims, Vector< t_col_dims, t_type > > &vector)
 
constexpr Matrix (const Matrix &mat)=default
 
template<class t_new_type >
constexpr Matrix< t_new_type > as () const
 
template<uint01 t_i0, uint01 t_i1, uint01 t_j0, uint01 t_j1>
constexpr Matrix< t_type, t_i1 - t_i0+1, t_j1 - t_j0+1 > subMatrix () const
 
template<uint01 t_j0, uint01 t_j1, uint01 t_i_size>
constexpr Matrix< t_type, t_i_size, t_j1 - t_j0+1 > subMatrix (const Vector< t_i_size, uint01 > &r) const
 
template<class t_new_type , uint01 t_new_row_dims, uint01 t_new_col_dims>
constexpr Matrix< t_new_type, t_new_row_dims, t_new_col_dims > as () const
 
constexpr t_type determinant () const
 
constexpr Vector< 3, t_type > decomposeScale () const
 
constexpr Vector< 3, t_type > decomposeOffset () const
 
template<class t_angle_type >
constexpr Vector< 3, Angle< t_angle_type > > decomposeRotation () const
 
constexpr Vector< 4, t_type > decomposeRotationQuaternion () const
 
template<class t_angle_type >
constexpr void decompose (Vector< 3, t_type > &scaling, Vector< 3, Angle< t_angle_type > > &rotation, Vector< 3, t_type > &position) const
 
constexpr Matrix offset (const Vector< 2, t_type > &translation) const
 
constexpr Matrix offset (const Vector< 3, t_type > &translation) const
 
constexpr Matrix scale (t_type scale) const
 
constexpr Matrix scale (const Vector< 2, t_type > &scale) const
 
constexpr Matrix scale (const Vector< 3, t_type > &scale) const
 
void correctZeroScale (t_type new_value=1e-6, t_type epsilon=1e-9)
 
constexpr Matrix scale (const Vector< 3, t_type > &direction, t_type scale) const
 
template<class t_angle_type >
constexpr Matrix rotate (const Vector< 3, Angle< t_angle_type > > &orientation) const
 
template<class t_angle_type >
constexpr Matrix< t_type > rotate (const Angle< t_angle_type > &phi, const Vector< 3, t_type > &axis) const
 
constexpr Matrix shear (t_type dx, t_type dy) const
 
constexpr Matrix< t_type, t_col_dims, t_row_dims > transpose () const
 
template<uint01 t_cols = t_col_dims, uint01 t_rows = t_row_dims>
Matrix< t_type, t_cols, t_rows > invert () const
 
t_type * begin ()
 
const t_type * begin () const
 
Matrix operator* (const Matrix &right) const
 
Matrixoperator= (const Matrix &right)
 
Matrixoperator*= (const Matrix &right)
 
- Public Member Functions inherited from Vector< 4, Vector< 4, t_type > >
constexpr Vector () noexcept
 
constexpr Vector (const Vector< t_dims, t_vec_type > &vector) noexcept
 
constexpr Vector (const t_type &scaler) noexcept
 
constexpr Vector (const t_type &x, typename std::enable_if< tdims==2, const t_type & >::type y)
 
constexpr Vector (const t_type &x, const t_type &y, const typename std::enable_if< tdims==3, const t_type & >::type z)
 
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, typename std::enable_if< tdims==4, const t_type & >::type w)
 
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, const t_type &w, typename std::enable_if< tdims==5, const t_type & >::type v)
 
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, const t_type &w, const t_type &v, typename std::enable_if< tdims==6, const t_type & >::type u)
 
constexpr Vector (const t_type &x, const t_type &y, const t_type &z, const t_type &w, const t_type &v, const t_type &u, const t_type &t, const t_type &s, typename std::enable_if< tdims==9, const t_type & >::type r)
 
constexpr Vector (const t_type(&vector)[t_dims])
 
constexpr Vector (const Vector< tdims - 1, t_type > &vector, typename std::enable_if< tdims >=2, const t_type & >::type suffix)
 
constexpr Vector (const Vector< getMax(tdims - 2, 0), t_type > &vector, const t_type &suffix_a, typename std::enable_if< tdims >=3, const t_type & >::type suffix_b)
 
constexpr Vector (const t_type &prefix, typename std::enable_if< tdims >=2, const Vector< t_dims - 1, t_type > & >::type vector)
 
constexpr Vector (const t_type &prefix_a, const t_type &prefix_b, typename std::enable_if< tdims >=3, const Vector< tdims - 1, t_type > & >::type vector)
 
constexpr Vector< t_dims, t_new_type > as () const
 
constexpr Vector< t_new_dim, t_new_type > as () const
 
constexpr Vector< t_new_dim, t_new_type > as (t_new_type extra_fill_value) const
 
constexpr t_type dimensionalValue () const
 
constexpr uint01 dimensionalIndex () const
 
constexpr operator t_type & ()
 
constexpr operator const t_type & () const
 
constexpr t_type magnitudeSquared () const
 
constexpr t_magnitude_type magnitude () const
 
constexpr Vector< t_dims, t_norm_type > normalized (Vector< t_dims, t_norm_type > value_if_nan=Constant< Vector< t_dims, t_norm_type > >::NaN) const
 
constexpr t_type product () const
 
constexpr t_type sum () const
 
constexpr t_type & operator[] (uint01 dimension_index)
 
constexpr const t_type & operator[] (const uint01 dimension_index) const
 
constexpr Vector< t_dims, t_type > operator- () const
 
constexpr Vector< t_dims, t_type > & operator= (const t_type &scaler)
 

Static Public Member Functions

static constexpr Matrix< t_type > OffsetMatrix (const Vector< 3, t_type > &translation)
 
static constexpr Matrix< t_type > ScalerMatrix (t_type scale)
 
static constexpr Matrix< t_type > ScalerMatrix (const Vector< 2, t_type > &scale)
 
static constexpr Matrix< t_type > ScalerMatrix (const Vector< 3, t_type > &scale)
 
template<class t_angle_type >
static constexpr Matrix< t_type > RotationMatrix (const Vector< 3, Angle< t_angle_type > > &orientation)
 
template<class t_angle_type >
static constexpr Matrix< t_type > RotationMatrix (const Angle< t_angle_type > &phi, const Vector< 3, t_type > &axis)
 
- Static Public Member Functions inherited from Vector< 4, Vector< 4, t_type > >
static constexpr uint01 NumberOfDimensions ()
 
static constexpr t_type Type ()
 

Additional Inherited Members

- Protected Attributes inherited from Vector< 4, Vector< 4, t_type > >
t_type m_values [t_dims]
 

Constructor & Destructor Documentation

◆ Matrix() [1/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( )
inlineconstexpr

◆ Matrix() [2/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( const t_type diagonal)
inlineexplicitconstexpr

◆ Matrix() [3/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( const t_type n00,
const t_type n10,
const t_type n01,
const t_type n11 )
inlineconstexpr

◆ Matrix() [4/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( const t_type n00,
const t_type n10,
const t_type n20,
const t_type n01,
const t_type n11,
const t_type n21,
const t_type n02,
const t_type n12,
const t_type n22 )
inlineconstexpr

◆ Matrix() [5/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( const t_type n00,
const t_type n10,
const t_type n20,
const t_type n30,
const t_type n01,
const t_type n11,
const t_type n21,
const t_type n31,
const t_type n02,
const t_type n12,
const t_type n22,
const t_type n32,
const t_type n03,
const t_type n13,
const t_type n23,
const t_type n33 )
inlineconstexpr

◆ Matrix() [6/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_angle_type >
Matrix ( const Vector< t_row_dims - 1, t_type > & offset,
const Vector< 3, Angle< t_angle_type > > & orientation,
const Vector< t_row_dims - 1, t_type > & scale )
inlineconstexpr

◆ Matrix() [7/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( const Vector< t_row_dims *t_col_dims, t_type > & vector)
inlineconstexpr

◆ Matrix() [8/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( const Vector< t_row_dims, Vector< t_col_dims, t_type > > & vector)
inlineconstexpr

◆ Matrix() [9/9]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix ( const Matrix< t_type, t_row_dims, t_col_dims > & mat)
constexprdefault

Member Function Documentation

◆ as() [1/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_new_type >
Matrix< t_new_type > as ( ) const
inlinenodiscardconstexpr

◆ as() [2/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_new_type , uint01 t_new_row_dims, uint01 t_new_col_dims>
Matrix< t_new_type, t_new_row_dims, t_new_col_dims > as ( ) const
inlinenodiscardconstexpr

◆ begin() [1/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
t_type * begin ( )
inlinenodiscard

◆ begin() [2/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
const t_type * begin ( ) const
inlinenodiscard

◆ correctZeroScale()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
void correctZeroScale ( t_type new_value = 1e-6,
t_type epsilon = 1e-9 )
inline

◆ decompose()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_angle_type >
void decompose ( Vector< 3, t_type > & scaling,
Vector< 3, Angle< t_angle_type > > & rotation,
Vector< 3, t_type > & position ) const
inlineconstexpr

◆ decomposeOffset()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Vector< 3, t_type > decomposeOffset ( ) const
inlinenodiscardconstexpr

◆ decomposeRotation()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_angle_type >
Vector< 3, Angle< t_angle_type > > decomposeRotation ( ) const
inlinenodiscardconstexpr

◆ decomposeRotationQuaternion()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Vector< 4, t_type > decomposeRotationQuaternion ( ) const
inlinenodiscardconstexpr

◆ decomposeScale()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Vector< 3, t_type > decomposeScale ( ) const
inlinenodiscardconstexpr

◆ determinant()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
t_type determinant ( ) const
inlinenodiscardconstexpr

◆ invert()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<uint01 t_cols = t_col_dims, uint01 t_rows = t_row_dims>
Matrix< t_type, t_cols, t_rows > invert ( ) const
inlinenodiscard

◆ offset() [1/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix offset ( const Vector< 2, t_type > & translation) const
inlinenodiscardconstexpr

◆ offset() [2/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix offset ( const Vector< 3, t_type > & translation) const
inlinenodiscardconstexpr

◆ OffsetMatrix()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
static constexpr Matrix< t_type > OffsetMatrix ( const Vector< 3, t_type > & translation)
inlinestaticnodiscardconstexpr

◆ operator*()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix operator* ( const Matrix< t_type, t_row_dims, t_col_dims > & right) const
inlinenodiscard

◆ operator*=()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix & operator*= ( const Matrix< t_type, t_row_dims, t_col_dims > & right)
inline

◆ operator=()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix & operator= ( const Matrix< t_type, t_row_dims, t_col_dims > & right)
inline

◆ rotate() [1/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_angle_type >
Matrix< t_type > rotate ( const Angle< t_angle_type > & phi,
const Vector< 3, t_type > & axis ) const
inlinenodiscardconstexpr

◆ rotate() [2/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_angle_type >
Matrix rotate ( const Vector< 3, Angle< t_angle_type > > & orientation) const
inlinenodiscardconstexpr

◆ RotationMatrix() [1/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_angle_type >
static constexpr Matrix< t_type > RotationMatrix ( const Angle< t_angle_type > & phi,
const Vector< 3, t_type > & axis )
inlinestaticconstexpr

◆ RotationMatrix() [2/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<class t_angle_type >
static constexpr Matrix< t_type > RotationMatrix ( const Vector< 3, Angle< t_angle_type > > & orientation)
inlinestaticconstexpr

◆ scale() [1/4]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix scale ( const Vector< 2, t_type > & scale) const
inlinenodiscardconstexpr

◆ scale() [2/4]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix scale ( const Vector< 3, t_type > & direction,
t_type scale ) const
inlinenodiscardconstexpr

◆ scale() [3/4]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix scale ( const Vector< 3, t_type > & scale) const
inlinenodiscardconstexpr

◆ scale() [4/4]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix scale ( t_type scale) const
inlinenodiscardconstexpr

◆ ScalerMatrix() [1/3]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
static constexpr Matrix< t_type > ScalerMatrix ( const Vector< 2, t_type > & scale)
inlinestaticnodiscardconstexpr

◆ ScalerMatrix() [2/3]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
static constexpr Matrix< t_type > ScalerMatrix ( const Vector< 3, t_type > & scale)
inlinestaticnodiscardconstexpr

◆ ScalerMatrix() [3/3]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
static constexpr Matrix< t_type > ScalerMatrix ( t_type scale)
inlinestaticnodiscardconstexpr

◆ shear()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix shear ( t_type dx,
t_type dy ) const
inlinenodiscardconstexpr

◆ subMatrix() [1/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<uint01 t_i0, uint01 t_i1, uint01 t_j0, uint01 t_j1>
Matrix< t_type, t_i1 - t_i0+1, t_j1 - t_j0+1 > subMatrix ( ) const
inlinenodiscardconstexpr

◆ subMatrix() [2/2]

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
template<uint01 t_j0, uint01 t_j1, uint01 t_i_size>
Matrix< t_type, t_i_size, t_j1 - t_j0+1 > subMatrix ( const Vector< t_i_size, uint01 > & r) const
inlinenodiscardconstexpr

◆ transpose()

template<class t_type , uint01 t_row_dims = 4, uint01 t_col_dims = 4>
Matrix< t_type, t_col_dims, t_row_dims > transpose ( ) const
inlinenodiscardconstexpr

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