Nexus Engine  v0.0.1
Loading...
Searching...
No Matches
Nexus::Mat< T, RowCount, ColCount, Layout > Class Template Referenceexport

Public Types

using value_type = T
using size_type = usize
using layout_type = Layout
using extents_type = std::extents<size_type, RowCount, ColCount>
using mapping_type = Layout::template mapping<extents_type>
using mdspan_type = std::mdspan<T, extents_type, Layout>
using const_mdspan_type = std::mdspan<const T, extents_type, Layout>

Public Member Functions

constexpr Mat ()=default
template<typename... Args>
requires (sizeof...(Args) == RowCount * ColCount) && (std::convertible_to<Args, T> && ...)
constexpr Mat (Args &&... args)
template<Numeric U, typename OtherLayout>
constexpr Mat (const Mat< U, RowCount, ColCount, OtherLayout > &other)
constexpr T & operator[] (size_type row, size_type col)
constexpr const T & operator[] (size_type row, size_type col) const
constexpr T & operator() (size_type row, size_type col)
constexpr const T & operator() (size_type row, size_type col) const
constexpr T * Data ()
constexpr const T * Data () const
constexpr auto MDSpan ()
constexpr auto MDSpan () const
template<Numeric U>
constexpr bool operator== (const Mat< U, RowCount, ColCount, Layout > &other) const
template<Numeric U, typename OtherLayout>
constexpr bool operator== (const Mat< U, RowCount, ColCount, OtherLayout > &other) const
template<Numeric U, typename OtherLayout>
constexpr Matoperator+= (const Mat< U, RowCount, ColCount, OtherLayout > &other)
template<Numeric U, typename OtherLayout>
constexpr Matoperator-= (const Mat< U, RowCount, ColCount, OtherLayout > &other)
template<Numeric U>
constexpr Matoperator*= (U scalar)
template<Numeric U>
constexpr Matoperator/= (U scalar)
constexpr Mat operator+ () const
constexpr Mat operator- () const
constexpr Mat< T, ColCount, RowCount, Layout > Transpose () const
template<usize N = RowCount>
requires (RowCount == ColCount && N == RowCount)
constexpr auto Determinant () const
template<usize N = RowCount>
requires (RowCount == ColCount && N == RowCount)
constexpr Mat Inverse () const
template<Numeric U, typename OtherLayout>
constexpr Mat< T, RowCount, ColCount, Layout > & operator+= (const Mat< U, RowCount, ColCount, OtherLayout > &other)
template<Numeric U, typename OtherLayout>
constexpr Mat< T, RowCount, ColCount, Layout > & operator-= (const Mat< U, RowCount, ColCount, OtherLayout > &other)
template<Numeric U>
constexpr Mat< T, RowCount, ColCount, Layout > & operator*= (U scalar)
template<Numeric U>
constexpr Mat< T, RowCount, ColCount, Layout > & operator/= (U scalar)
template<usize N>
requires (RowCount == ColCount && N == RowCount)
constexpr Mat< T, RowCount, ColCount, Layout > Identity ()
template<usize N>
requires (RowCount == ColCount && N == RowCount)
constexpr Mat< T, RowCount, ColCount, Layout > Inverse () const

Static Public Member Functions

static constexpr size_type Rows ()
static constexpr size_type Cols ()
static constexpr size_type Size ()
template<usize N = RowCount>
requires (RowCount == ColCount && N == RowCount)
static constexpr Mat Identity ()

Member Typedef Documentation

◆ const_mdspan_type

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
using Nexus::Mat< T, RowCount, ColCount, Layout >::const_mdspan_type = std::mdspan<const T, extents_type, Layout>

◆ extents_type

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
using Nexus::Mat< T, RowCount, ColCount, Layout >::extents_type = std::extents<size_type, RowCount, ColCount>

◆ layout_type

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
using Nexus::Mat< T, RowCount, ColCount, Layout >::layout_type = Layout

◆ mapping_type

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
using Nexus::Mat< T, RowCount, ColCount, Layout >::mapping_type = Layout::template mapping<extents_type>

◆ mdspan_type

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
using Nexus::Mat< T, RowCount, ColCount, Layout >::mdspan_type = std::mdspan<T, extents_type, Layout>

◆ size_type

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
using Nexus::Mat< T, RowCount, ColCount, Layout >::size_type = usize

◆ value_type

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
using Nexus::Mat< T, RowCount, ColCount, Layout >::value_type = T

Constructor & Destructor Documentation

◆ Mat() [1/3]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
Nexus::Mat< T, RowCount, ColCount, Layout >::Mat ( )
constexprdefault

◆ Mat() [2/3]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
requires (sizeof...(Args) == RowCount * ColCount) && (std::convertible_to<Args, T> && ...)
template<typename... Args>
requires (sizeof...(Args) == RowCount * ColCount) && (std::convertible_to<Args, T> && ...)
Nexus::Mat< T, RowCount, ColCount, Layout >::Mat ( Args &&... args)
constexpr

◆ Mat() [3/3]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
template<Numeric U, typename OtherLayout>
Nexus::Mat< T, RowCount, ColCount, Layout >::Mat ( const Mat< U, RowCount, ColCount, OtherLayout > & other)
constexpr

Member Function Documentation

◆ Cols()

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
usize Nexus::Mat< T, RowCount, ColCount, Layout >::Cols ( )
staticconstexpr

◆ Data() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
T * Nexus::Mat< T, RowCount, ColCount, Layout >::Data ( )
constexpr

◆ Data() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
const T * Nexus::Mat< T, RowCount, ColCount, Layout >::Data ( ) const
constexpr

◆ Determinant()

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
requires (RowCount == ColCount && N == RowCount)
template<usize N>
requires (RowCount == ColCount && N == RowCount)
auto Nexus::Mat< T, RowCount, ColCount, Layout >::Determinant ( ) const
constexpr

◆ Identity() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<usize N = RowCount>
requires (RowCount == ColCount && N == RowCount)
constexpr Mat Nexus::Mat< T, RowCount, ColCount, Layout >::Identity ( )
staticconstexpr

◆ Identity() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<usize N>
requires (RowCount == ColCount && N == RowCount)
Mat< T, RowCount, ColCount, Layout > Nexus::Mat< T, RowCount, ColCount, Layout >::Identity ( )
constexpr

◆ Inverse() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<usize N = RowCount>
requires (RowCount == ColCount && N == RowCount)
Mat Nexus::Mat< T, RowCount, ColCount, Layout >::Inverse ( ) const
constexpr

◆ Inverse() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<usize N>
requires (RowCount == ColCount && N == RowCount)
Mat< T, RowCount, ColCount, Layout > Nexus::Mat< T, RowCount, ColCount, Layout >::Inverse ( ) const
constexpr

◆ MDSpan() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
auto Nexus::Mat< T, RowCount, ColCount, Layout >::MDSpan ( )
constexpr

◆ MDSpan() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
auto Nexus::Mat< T, RowCount, ColCount, Layout >::MDSpan ( ) const
constexpr

◆ operator()() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
T & Nexus::Mat< T, RowCount, ColCount, Layout >::operator() ( size_type row,
size_type col )
constexpr

◆ operator()() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
const T & Nexus::Mat< T, RowCount, ColCount, Layout >::operator() ( size_type row,
size_type col ) const
constexpr

◆ operator*=() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U>
Mat & Nexus::Mat< T, RowCount, ColCount, Layout >::operator*= ( U scalar)
constexpr

◆ operator*=() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U>
Mat< T, RowCount, ColCount, Layout > & Nexus::Mat< T, RowCount, ColCount, Layout >::operator*= ( U scalar)
constexpr

◆ operator+()

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
Mat< T, RowCount, ColCount, Layout > Nexus::Mat< T, RowCount, ColCount, Layout >::operator+ ( ) const
constexpr

◆ operator+=() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U, typename OtherLayout>
Mat & Nexus::Mat< T, RowCount, ColCount, Layout >::operator+= ( const Mat< U, RowCount, ColCount, OtherLayout > & other)
constexpr

◆ operator+=() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U, typename OtherLayout>
Mat< T, RowCount, ColCount, Layout > & Nexus::Mat< T, RowCount, ColCount, Layout >::operator+= ( const Mat< U, RowCount, ColCount, OtherLayout > & other)
constexpr

◆ operator-()

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
Mat< T, RowCount, ColCount, Layout > Nexus::Mat< T, RowCount, ColCount, Layout >::operator- ( ) const
constexpr

◆ operator-=() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U, typename OtherLayout>
Mat & Nexus::Mat< T, RowCount, ColCount, Layout >::operator-= ( const Mat< U, RowCount, ColCount, OtherLayout > & other)
constexpr

◆ operator-=() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U, typename OtherLayout>
Mat< T, RowCount, ColCount, Layout > & Nexus::Mat< T, RowCount, ColCount, Layout >::operator-= ( const Mat< U, RowCount, ColCount, OtherLayout > & other)
constexpr

◆ operator/=() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U>
Mat & Nexus::Mat< T, RowCount, ColCount, Layout >::operator/= ( U scalar)
constexpr

◆ operator/=() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout = RowMajor>
template<Numeric U>
Mat< T, RowCount, ColCount, Layout > & Nexus::Mat< T, RowCount, ColCount, Layout >::operator/= ( U scalar)
constexpr

◆ operator==() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
template<Numeric U>
bool Nexus::Mat< T, RowCount, ColCount, Layout >::operator== ( const Mat< U, RowCount, ColCount, Layout > & other) const
constexpr

◆ operator==() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
template<Numeric U, typename OtherLayout>
bool Nexus::Mat< T, RowCount, ColCount, Layout >::operator== ( const Mat< U, RowCount, ColCount, OtherLayout > & other) const
constexpr

◆ operator[]() [1/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
T & Nexus::Mat< T, RowCount, ColCount, Layout >::operator[] ( size_type row,
size_type col )
constexpr

◆ operator[]() [2/2]

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
const T & Nexus::Mat< T, RowCount, ColCount, Layout >::operator[] ( size_type row,
size_type col ) const
constexpr

◆ Rows()

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
usize Nexus::Mat< T, RowCount, ColCount, Layout >::Rows ( )
staticconstexpr

◆ Size()

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
usize Nexus::Mat< T, RowCount, ColCount, Layout >::Size ( )
staticconstexpr

◆ Transpose()

template<Numeric T, usize RowCount, usize ColCount, typename Layout>
Mat< T, ColCount, RowCount, Layout > Nexus::Mat< T, RowCount, ColCount, Layout >::Transpose ( ) const
constexpr

The documentation for this class was generated from the following files:
  • Source/Engine/Core/Math/Public/Mat/Mat.cppm
  • Source/Engine/Core/Math/Public/Mat/Mat.inl