wren
Vulkan-based game engine
Loading...
Searching...
No Matches
wren::math::Mat< T, Rows, Cols > Class Template Reference

#include <matrix.hpp>

Public Types

using mat_t = Mat<T, Rows, Cols>
 
using data_t = std::array<T, Rows * Cols>
 

Public Member Functions

 Mat ()=default
 
 Mat (const data_t &data)
 
 Mat (const std::array< std::array< T, Cols >, Rows > &rows)
 
auto operator== (const mat_t &rhs) const
 
auto operator!= (const mat_t &rhs) const
 
auto operator* (const mat_t &rhs)
 
auto operator* (const Vec< T, Rows > &rhs)
 
auto at (std::size_t col, std::size_t row) -> T &
 
auto at (std::size_t col, std::size_t row) const -> const T &
 
auto data () const
 

Static Public Member Functions

static constexpr auto identity ()
 

Static Private Member Functions

static constexpr auto get_index (std::size_t col, std::size_t row)
 

Private Attributes

std::array< T, Rows *Cols > data_ {}
 

Member Typedef Documentation

◆ data_t

template<typename T , std::size_t Rows, std::size_t Cols>
using wren::math::Mat< T, Rows, Cols >::data_t = std::array<T, Rows * Cols>

◆ mat_t

template<typename T , std::size_t Rows, std::size_t Cols>
using wren::math::Mat< T, Rows, Cols >::mat_t = Mat<T, Rows, Cols>

Constructor & Destructor Documentation

◆ Mat() [1/3]

template<typename T , std::size_t Rows, std::size_t Cols>
wren::math::Mat< T, Rows, Cols >::Mat ( )
default

◆ Mat() [2/3]

template<typename T , std::size_t Rows, std::size_t Cols>
wren::math::Mat< T, Rows, Cols >::Mat ( const data_t & data)
inline

◆ Mat() [3/3]

template<typename T , std::size_t Rows, std::size_t Cols>
wren::math::Mat< T, Rows, Cols >::Mat ( const std::array< std::array< T, Cols >, Rows > & rows)
inline
Here is the call graph for this function:

Member Function Documentation

◆ at() [1/2]

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::Mat< T, Rows, Cols >::at ( std::size_t col,
std::size_t row ) -> T&
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ at() [2/2]

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::Mat< T, Rows, Cols >::at ( std::size_t col,
std::size_t row ) const -> const T&
inline
Here is the call graph for this function:

◆ data()

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::Mat< T, Rows, Cols >::data ( ) const
inline

◆ get_index()

template<typename T , std::size_t Rows, std::size_t Cols>
static constexpr auto wren::math::Mat< T, Rows, Cols >::get_index ( std::size_t col,
std::size_t row )
inlinestaticconstexprprivate
Here is the caller graph for this function:

◆ identity()

template<typename T , std::size_t Rows, std::size_t Cols>
static constexpr auto wren::math::Mat< T, Rows, Cols >::identity ( )
inlinestaticconstexpr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::Mat< T, Rows, Cols >::operator!= ( const mat_t & rhs) const
inline

◆ operator*() [1/2]

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::Mat< T, Rows, Cols >::operator* ( const mat_t & rhs)
inline
Here is the call graph for this function:

◆ operator*() [2/2]

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::Mat< T, Rows, Cols >::operator* ( const Vec< T, Rows > & rhs)
inline
Here is the call graph for this function:

◆ operator==()

template<typename T , std::size_t Rows, std::size_t Cols>
auto wren::math::Mat< T, Rows, Cols >::operator== ( const mat_t & rhs) const
inline

Member Data Documentation

◆ data_

template<typename T , std::size_t Rows, std::size_t Cols>
std::array<T, Rows * Cols> wren::math::Mat< T, Rows, Cols >::data_ {}
private

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