GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::TensorQuantity< N, UnitT > Struct Template Reference

#include <GREM/physics/quantities.hpp>

Public Types

using Component = Quantity<N, UnitT>
using Unit = UnitT
using DimensionType = typename Unit::DimensionType
using MagnitudeType = typename Unit::MagnitudeType

Public Member Functions

constexpr TensorQuantity () noexcept=default
constexpr TensorQuantity (const mat< N, N, float > &value) noexcept
constexpr TensorQuantity (const mat< N, N, double > &value) noexcept
constexpr TensorQuantity (Quantity< 1, UnitT > value) noexcept
constexpr TensorQuantity (Component x, Component y) noexcept
constexpr TensorQuantity (Component x, Component y, Component z) noexcept
GREM_ALWAYS_INLINE constexpr operator mat< N, N, float > () const
GREM_ALWAYS_INLINE constexpr operator mat< N, N, double > () const
GREM_ALWAYS_INLINE Quantity< N, Relative< UnitT > > getScale () const noexcept
GREM_ALWAYS_INLINE Quantity< N, Square< Relative< UnitT > > > getScale2 () const noexcept
GREM_ALWAYS_INLINE constexpr bool operator== (const TensorQuantity &other) const noexcept
template<typename OtherUnitT>
requires (UnitT{} == OtherUnitT{})
GREM_ALWAYS_INLINE constexpr bool operator== (const TensorQuantity< N, OtherUnitT > &other) const noexcept
GREM_ALWAYS_INLINE constexpr bool operator== (Zero) const noexcept
template<size_t Index>
GREM_ALWAYS_INLINE Component operator[] (ComponentSwizzle< Index >) noexcept
template<size_t Index>
GREM_ALWAYS_INLINE Component operator[] (ComponentSwizzle< Index >) const noexcept
template<size_t Index>
GREM_ALWAYS_INLINE Component operator[] (meta::Constant< Index >) noexcept
template<size_t Index>
GREM_ALWAYS_INLINE Component operator[] (meta::Constant< Index >) const noexcept
GREM_ALWAYS_INLINE constexpr size_t size () const noexcept

Static Public Member Functions

template<typename OtherUnitT>
static GREM_ALWAYS_INLINE constexpr TensorQuantity reinterpret (const TensorQuantity< N, OtherUnitT > &other)
static GREM_ALWAYS_INLINE constexpr TensorQuantity reinterpret (const mat< N, N, float > &value)
static GREM_ALWAYS_INLINE constexpr TensorQuantity reinterpret (const mat< N, N, double > &value)

Static Public Attributes

static constexpr size_t RANK = N
static constexpr Unit UNIT {}
static constexpr DimensionType DIMENSION {}
static constexpr MagnitudeType MAGNITUDE {}

Member Typedef Documentation

◆ Component

template<size_t N, typename UnitT>
using grem::physics::TensorQuantity< N, UnitT >::Component = Quantity<N, UnitT>

◆ Unit

template<size_t N, typename UnitT>
using grem::physics::TensorQuantity< N, UnitT >::Unit = UnitT

◆ DimensionType

template<size_t N, typename UnitT>
using grem::physics::TensorQuantity< N, UnitT >::DimensionType = typename Unit::DimensionType

◆ MagnitudeType

template<size_t N, typename UnitT>
using grem::physics::TensorQuantity< N, UnitT >::MagnitudeType = typename Unit::MagnitudeType

Constructor & Destructor Documentation

◆ TensorQuantity() [1/6]

template<size_t N, typename UnitT>
grem::physics::TensorQuantity< N, UnitT >::TensorQuantity ( )
constexprdefaultnoexcept

◆ TensorQuantity() [2/6]

template<size_t N, typename UnitT>
grem::physics::TensorQuantity< N, UnitT >::TensorQuantity ( const mat< N, N, float > & value)
inlineconstexprnoexcept

◆ TensorQuantity() [3/6]

template<size_t N, typename UnitT>
grem::physics::TensorQuantity< N, UnitT >::TensorQuantity ( const mat< N, N, double > & value)
inlineconstexprnoexcept

◆ TensorQuantity() [4/6]

template<size_t N, typename UnitT>
grem::physics::TensorQuantity< N, UnitT >::TensorQuantity ( Quantity< 1, UnitT > value)
inlineconstexprnoexcept

◆ TensorQuantity() [5/6]

template<size_t N, typename UnitT>
grem::physics::TensorQuantity< N, UnitT >::TensorQuantity ( Component x,
Component y )
inlineconstexprnoexcept

◆ TensorQuantity() [6/6]

template<size_t N, typename UnitT>
grem::physics::TensorQuantity< N, UnitT >::TensorQuantity ( Component x,
Component y,
Component z )
inlineconstexprnoexcept

Member Function Documentation

◆ reinterpret() [1/3]

template<size_t N, typename UnitT>
template<typename OtherUnitT>
GREM_ALWAYS_INLINE constexpr TensorQuantity grem::physics::TensorQuantity< N, UnitT >::reinterpret ( const TensorQuantity< N, OtherUnitT > & other)
inlinestaticnodiscardconstexpr

◆ reinterpret() [2/3]

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE constexpr TensorQuantity grem::physics::TensorQuantity< N, UnitT >::reinterpret ( const mat< N, N, float > & value)
inlinestaticnodiscardconstexpr

◆ reinterpret() [3/3]

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE constexpr TensorQuantity grem::physics::TensorQuantity< N, UnitT >::reinterpret ( const mat< N, N, double > & value)
inlinestaticnodiscardconstexpr

◆ operator mat< N, N, float >()

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE constexpr grem::physics::TensorQuantity< N, UnitT >::operator mat< N, N, float > ( ) const
inlinenodiscardconstexpr

◆ operator mat< N, N, double >()

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE constexpr grem::physics::TensorQuantity< N, UnitT >::operator mat< N, N, double > ( ) const
inlinenodiscardconstexpr

◆ getScale()

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE Quantity< N, Relative< UnitT > > grem::physics::TensorQuantity< N, UnitT >::getScale ( ) const
inlinenodiscardnoexcept

◆ getScale2()

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE Quantity< N, Square< Relative< UnitT > > > grem::physics::TensorQuantity< N, UnitT >::getScale2 ( ) const
inlinenodiscardnoexcept

◆ operator==() [1/3]

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE constexpr bool grem::physics::TensorQuantity< N, UnitT >::operator== ( const TensorQuantity< N, UnitT > & other) const
inlinenodiscardconstexprnoexcept

◆ operator==() [2/3]

template<size_t N, typename UnitT>
template<typename OtherUnitT>
requires (UnitT{} == OtherUnitT{})
GREM_ALWAYS_INLINE constexpr bool grem::physics::TensorQuantity< N, UnitT >::operator== ( const TensorQuantity< N, OtherUnitT > & other) const
inlinenodiscardconstexprnoexcept

◆ operator==() [3/3]

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE constexpr bool grem::physics::TensorQuantity< N, UnitT >::operator== ( Zero ) const
inlinenodiscardconstexprnoexcept

◆ operator[]() [1/4]

template<size_t N, typename UnitT>
template<size_t Index>
GREM_ALWAYS_INLINE Component grem::physics::TensorQuantity< N, UnitT >::operator[] ( ComponentSwizzle< Index > )
inlinenodiscardnoexcept

◆ operator[]() [2/4]

template<size_t N, typename UnitT>
template<size_t Index>
GREM_ALWAYS_INLINE Component grem::physics::TensorQuantity< N, UnitT >::operator[] ( ComponentSwizzle< Index > ) const
inlinenodiscardnoexcept

◆ operator[]() [3/4]

template<size_t N, typename UnitT>
template<size_t Index>
GREM_ALWAYS_INLINE Component grem::physics::TensorQuantity< N, UnitT >::operator[] ( meta::Constant< Index > )
inlinenodiscardnoexcept

◆ operator[]() [4/4]

template<size_t N, typename UnitT>
template<size_t Index>
GREM_ALWAYS_INLINE Component grem::physics::TensorQuantity< N, UnitT >::operator[] ( meta::Constant< Index > ) const
inlinenodiscardnoexcept

◆ size()

template<size_t N, typename UnitT>
GREM_ALWAYS_INLINE constexpr size_t grem::physics::TensorQuantity< N, UnitT >::size ( ) const
inlinenodiscardconstexprnoexcept

Member Data Documentation

◆ RANK

template<size_t N, typename UnitT>
size_t grem::physics::TensorQuantity< N, UnitT >::RANK = N
staticconstexpr

◆ UNIT

template<size_t N, typename UnitT>
Unit grem::physics::TensorQuantity< N, UnitT >::UNIT {}
staticconstexpr

◆ DIMENSION

template<size_t N, typename UnitT>
DimensionType grem::physics::TensorQuantity< N, UnitT >::DIMENSION {}
staticconstexpr

◆ MAGNITUDE

template<size_t N, typename UnitT>
MagnitudeType grem::physics::TensorQuantity< N, UnitT >::MAGNITUDE {}
staticconstexpr

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