GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::physics::Orientation< 2 > Struct Reference

Absolute orientation in 2-dimensional space. More...

#include <GREM/physics/quantities.hpp>

Public Types

using Unit = Absolute<Radians>
using DimensionType = typename Unit::DimensionType
using MagnitudeType = typename Unit::MagnitudeType

Public Member Functions

GREM_ALWAYS_INLINE constexpr Orientation () noexcept=default
GREM_ALWAYS_INLINE constexpr Orientation (float angle) noexcept
GREM_ALWAYS_INLINE constexpr Orientation (double angle) noexcept
template<typename OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION)
GREM_ALWAYS_INLINE constexpr Orientation (Quantity< 1, OtherUnitT > angle) noexcept
GREM_ALWAYS_INLINE constexpr operator float () const
GREM_ALWAYS_INLINE constexpr operator double () const
template<typename OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION)
GREM_ALWAYS_INLINE constexpr operator Quantity< 1, OtherUnitT > () const
template<unit OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION)
GREM_ALWAYS_INLINE constexpr Quantity< 1, Unitless > in (OtherUnitT) const
GREM_ALWAYS_INLINE constexpr bool operator== (const Orientation &) const noexcept=default
template<typename UnitT>
GREM_ALWAYS_INLINE Quantity< 2, UnitT > GREM_VECTORCALL operator() (Quantity< 2, UnitT > b) const
GREM_ALWAYS_INLINE Direction2D GREM_VECTORCALL operator() (Direction2D b) const
template<typename UnitT>
GREM_ALWAYS_INLINE Quantity< 1, UnitT > GREM_VECTORCALL operator() (Quantity< 1, UnitT > b) const
GREM_ALWAYS_INLINE constexpr size_t size () const noexcept

Static Public Attributes

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

Detailed Description

Absolute orientation in 2-dimensional space.

Unit: Radians.

Member Typedef Documentation

◆ Unit

using grem::physics::Orientation< 2 >::Unit = Absolute<Radians>

◆ DimensionType

using grem::physics::Orientation< 2 >::DimensionType = typename Unit::DimensionType

◆ MagnitudeType

using grem::physics::Orientation< 2 >::MagnitudeType = typename Unit::MagnitudeType

Constructor & Destructor Documentation

◆ Orientation() [1/4]

GREM_ALWAYS_INLINE constexpr grem::physics::Orientation< 2 >::Orientation ( )
constexprdefaultnoexcept

◆ Orientation() [2/4]

GREM_ALWAYS_INLINE constexpr grem::physics::Orientation< 2 >::Orientation ( float angle)
inlineconstexprnoexcept

◆ Orientation() [3/4]

GREM_ALWAYS_INLINE constexpr grem::physics::Orientation< 2 >::Orientation ( double angle)
inlineconstexprnoexcept

◆ Orientation() [4/4]

template<typename OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION)
GREM_ALWAYS_INLINE constexpr grem::physics::Orientation< 2 >::Orientation ( Quantity< 1, OtherUnitT > angle)
inlineconstexprnoexcept

Member Function Documentation

◆ operator float()

GREM_ALWAYS_INLINE constexpr grem::physics::Orientation< 2 >::operator float ( ) const
inlinenodiscardconstexpr

◆ operator double()

GREM_ALWAYS_INLINE constexpr grem::physics::Orientation< 2 >::operator double ( ) const
inlinenodiscardconstexpr

◆ operator Quantity< 1, OtherUnitT >()

template<typename OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION)
GREM_ALWAYS_INLINE constexpr grem::physics::Orientation< 2 >::operator Quantity< 1, OtherUnitT > ( ) const
inlinenodiscardconstexpr

◆ in()

template<unit OtherUnitT>
requires (OtherUnitT::DIMENSION == DIMENSION)
GREM_ALWAYS_INLINE constexpr Quantity< 1, Unitless > grem::physics::Orientation< 2 >::in ( OtherUnitT ) const
inlinenodiscardconstexpr

◆ operator==()

GREM_ALWAYS_INLINE constexpr bool grem::physics::Orientation< 2 >::operator== ( const Orientation< 2 > & ) const
nodiscardconstexprdefaultnoexcept

◆ operator()() [1/3]

template<typename UnitT>
GREM_ALWAYS_INLINE Quantity< 2, UnitT > GREM_VECTORCALL grem::physics::Orientation< 2 >::operator() ( Quantity< 2, UnitT > b) const
inlinenodiscard

◆ operator()() [2/3]

◆ operator()() [3/3]

template<typename UnitT>
GREM_ALWAYS_INLINE Quantity< 1, UnitT > GREM_VECTORCALL grem::physics::Orientation< 2 >::operator() ( Quantity< 1, UnitT > b) const
inlinenodiscard

◆ size()

GREM_ALWAYS_INLINE constexpr size_t grem::physics::Orientation< 2 >::size ( ) const
inlinenodiscardconstexprnoexcept

Member Data Documentation

◆ RANK

size_t grem::physics::Orientation< 2 >::RANK = 1
staticconstexpr

◆ UNIT

Unit grem::physics::Orientation< 2 >::UNIT {}
staticconstexpr

◆ DIMENSION

DimensionType grem::physics::Orientation< 2 >::DIMENSION {}
staticconstexpr

◆ MAGNITUDE

MagnitudeType grem::physics::Orientation< 2 >::MAGNITUDE {}
staticconstexpr

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