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

Reference to a specific component of a physical vector quantity. More...

#include <GREM/physics/quantities.hpp>

Inheritance diagram for grem::physics::ComponentProxy< N, UnitT, Index >:

Public Member Functions

GREM_ALWAYS_INLINE constexpr ComponentProxy (Quantity< N, UnitT > &quantity) noexcept
GREM_ALWAYS_INLINE ComponentProxy operator= (Quantity< 1, UnitT > value) const noexcept
GREM_ALWAYS_INLINE ComponentProxy operator= (Zero) const noexcept
template<unit OtherUnitT>
GREM_ALWAYS_INLINE ComponentProxy operator+= (Quantity< 1, OtherUnitT > value) const noexcept
template<unit OtherUnitT>
GREM_ALWAYS_INLINE ComponentProxy operator-= (Quantity< 1, OtherUnitT > value) const noexcept
GREM_ALWAYS_INLINE ComponentProxy operator*= (Scalar value) const noexcept
GREM_ALWAYS_INLINE ComponentProxy operator/= (Scalar value) const noexcept
Public Member Functions inherited from grem::physics::ConstComponentProxy< N, UnitT, Index >
GREM_ALWAYS_INLINE constexpr ConstComponentProxy (const Quantity< N, UnitT > &quantity) noexcept
GREM_ALWAYS_INLINE constexpr operator Quantity< 1, UnitT > () const noexcept
GREM_ALWAYS_INLINE constexpr operator float () const
GREM_ALWAYS_INLINE constexpr operator double () const
GREM_ALWAYS_INLINE constexpr operator DurationBase< float, Ratio< 1, 1 > > () const
GREM_ALWAYS_INLINE constexpr operator DurationBase< double, Ratio< 1, 1 > > () const
GREM_ALWAYS_INLINE constexpr operator Duration () const
template<size_t OtherN, typename OtherUnitT, size_t OtherIndex>
requires (UnitT{} == OtherUnitT{})
GREM_ALWAYS_INLINE constexpr bool operator== (const ConstComponentProxy< OtherN, OtherUnitT, OtherIndex > &other) const noexcept
template<size_t OtherN, typename OtherUnitT, size_t OtherIndex>
requires (UnitT{} == OtherUnitT{})
GREM_ALWAYS_INLINE constexpr auto operator<=> (const ConstComponentProxy< OtherN, OtherUnitT, OtherIndex > &other) const noexcept
template<typename OtherUnitT>
requires (UnitT{} == OtherUnitT{})
GREM_ALWAYS_INLINE constexpr bool operator== (const Quantity< 1, OtherUnitT > &other) const noexcept
template<typename OtherUnitT>
requires (UnitT{} == OtherUnitT{})
GREM_ALWAYS_INLINE constexpr auto operator<=> (const Quantity< 1, OtherUnitT > &other) const noexcept
template<arithmetic Arithmetic>
requires (UnitT::DIMENSION == DIMENSIONLESS && UnitT::MagnitudeType::VALUE == 1.0l)
GREM_ALWAYS_INLINE constexpr bool operator== (Arithmetic other) const noexcept
template<arithmetic Arithmetic>
requires (UnitT::DIMENSION == DIMENSIONLESS && UnitT::MagnitudeType::VALUE == 1.0l)
GREM_ALWAYS_INLINE constexpr auto operator<=> (Arithmetic other) const noexcept
GREM_ALWAYS_INLINE constexpr bool operator== (Zero) const noexcept
GREM_ALWAYS_INLINE constexpr auto operator<=> (Zero) const noexcept
template<typename Rep, typename Period>
requires (UnitT::DIMENSION == TIME && !UnitT::MagnitudeType::IS_ABSOLUTE)
GREM_ALWAYS_INLINE constexpr bool operator== (const DurationBase< Rep, Period > &other) const noexcept
template<typename Rep, typename Period>
requires (UnitT::DIMENSION == TIME && !UnitT::MagnitudeType::IS_ABSOLUTE)
GREM_ALWAYS_INLINE constexpr auto operator<=> (const DurationBase< Rep, Period > &other) const noexcept
template<unit OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION)
GREM_ALWAYS_INLINE constexpr Quantity< 1, Unitless > in (OtherUnitT unit) const
template<unit OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION && (OtherUnitT::MagnitudeType::IS_ABSOLUTE == MagnitudeType::IS_ABSOLUTE || OtherUnitT::MagnitudeType::IS_ABSOLUTE))
GREM_ALWAYS_INLINE constexpr Quantity< 1, OtherUnitT > as (OtherUnitT unit) const
GREM_ALWAYS_INLINE constexpr size_t size () const noexcept
GREM_ALWAYS_INLINE size_t getMinIndex () const
GREM_ALWAYS_INLINE size_t getMaxIndex () const

Additional Inherited Members

Public Types inherited from grem::physics::ConstComponentProxy< N, UnitT, Index >
using Unit = UnitT
using DimensionType = typename Unit::DimensionType
using MagnitudeType = typename Unit::MagnitudeType
Static Public Attributes inherited from grem::physics::ConstComponentProxy< N, UnitT, Index >
static constexpr size_t RANK = 1
static constexpr Unit UNIT {}
static constexpr DimensionType DIMENSION {}
static constexpr MagnitudeType MAGNITUDE {}
Protected Member Functions inherited from grem::physics::ConstComponentProxy< N, UnitT, Index >
GREM_ALWAYS_INLINE constexpr Quantity< 1, UnitT > getValue () const noexcept
Protected Attributes inherited from grem::physics::ConstComponentProxy< N, UnitT, Index >
const Quantity< N, UnitT > * quantity

Detailed Description

template<size_t N, typename UnitT, size_t Index>
class grem::physics::ComponentProxy< N, UnitT, Index >

Reference to a specific component of a physical vector quantity.

Template Parameters
Nnumber of dimensions of the world space, specifying the number of vector components of the quantity (must be 2 or 3).
UnitTunit type of the quantity.
Indexindex of the referenced component in the quantity vector.

Constructor & Destructor Documentation

◆ ComponentProxy()

template<size_t N, typename UnitT, size_t Index>
GREM_ALWAYS_INLINE constexpr grem::physics::ComponentProxy< N, UnitT, Index >::ComponentProxy ( Quantity< N, UnitT > & quantity)
inlineconstexprnoexcept

Member Function Documentation

◆ operator=() [1/2]

template<size_t N, typename UnitT, size_t Index>
GREM_ALWAYS_INLINE ComponentProxy grem::physics::ComponentProxy< N, UnitT, Index >::operator= ( Quantity< 1, UnitT > value) const
inlinenoexcept

◆ operator=() [2/2]

template<size_t N, typename UnitT, size_t Index>
GREM_ALWAYS_INLINE ComponentProxy grem::physics::ComponentProxy< N, UnitT, Index >::operator= ( Zero ) const
inlinenoexcept

◆ operator+=()

template<size_t N, typename UnitT, size_t Index>
template<unit OtherUnitT>
GREM_ALWAYS_INLINE ComponentProxy grem::physics::ComponentProxy< N, UnitT, Index >::operator+= ( Quantity< 1, OtherUnitT > value) const
inlinenoexcept

◆ operator-=()

template<size_t N, typename UnitT, size_t Index>
template<unit OtherUnitT>
GREM_ALWAYS_INLINE ComponentProxy grem::physics::ComponentProxy< N, UnitT, Index >::operator-= ( Quantity< 1, OtherUnitT > value) const
inlinenoexcept

◆ operator*=()

template<size_t N, typename UnitT, size_t Index>
GREM_ALWAYS_INLINE ComponentProxy grem::physics::ComponentProxy< N, UnitT, Index >::operator*= ( Scalar value) const
inlinenoexcept

◆ operator/=()

template<size_t N, typename UnitT, size_t Index>
GREM_ALWAYS_INLINE ComponentProxy grem::physics::ComponentProxy< N, UnitT, Index >::operator/= ( Scalar value) const
inlinenoexcept

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