Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Math::Tuple3< DerivedT, T > Class Template Reference

#include <VectorMath.h>

Inheritance diagram for Harlinn::Math::Tuple3< DerivedT, T >:
[legend]
Collaboration diagram for Harlinn::Math::Tuple3< DerivedT, T >:
[legend]

Public Types

using DerivedType = DerivedT
 
using value_type = T
 
using size_type = size_t
 
using ValueType = value_type
 
using SizeType = size_type
 
using Traits = SIMD::Traits<value_type, Size>
 
using SIMDType = typename Traits::SIMDType
 
using ArrayType = typename Traits::ArrayType
 
using reference = typename ArrayType::reference
 
using const_reference = typename ArrayType::const_reference
 
using pointer = typename ArrayType::pointer
 
using const_pointer = typename ArrayType::const_pointer
 
using iterator = typename ArrayType::iterator
 
using const_iterator = typename ArrayType::const_iterator
 
using reverse_iterator = typename ArrayType::reverse_iterator
 
using const_reverse_iterator = typename ArrayType::const_reverse_iterator
 
using Simd = TupleSimd<DerivedType>
 The mathematical operations are performed using this type which holds a SIMD vector.

 

Public Member Functions

 Tuple3 () noexcept
 
 Tuple3 (value_type v) noexcept
 
 Tuple3 (value_type xv, value_type yv, value_type zv) noexcept
 
 Tuple3 (const ArrayType a) noexcept
 
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
 Tuple3 (const U &other) noexcept
 
template<TupleType U>
requires std::is_same_v<Traits, typename U::Traits>
 Tuple3 (const U &other) noexcept
 
template<TupleType U>
requires ( std::is_same_v<Traits, typename U::Traits> == false )
 Tuple3 (const U &other) noexcept
 
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
DerivedTypeoperator= (const U &other) noexcept
 
Simd ToSimd () const noexcept
 
 operator Simd () const noexcept
 
template<TupleType U>
requires ( U::Size == Size )
constexpr bool operator== (const U &other) const noexcept
 
template<TupleType U>
requires ( U::Size == Size )
constexpr bool operator!= (const U &other) const noexcept
 
constexpr bool operator== (value_type value) const noexcept
 
constexpr bool operator!= (value_type value) const noexcept
 
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
bool operator== (const U &other) const noexcept
 
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
bool operator!= (const U &other) const noexcept
 
Simd operator- () const noexcept
 
DerivedTypeoperator+= (const Simd &other) noexcept
 
template<TupleType U>
requires ( U::Size == Size )
DerivedTypeoperator+= (const U &other) noexcept
 
DerivedTypeoperator+= (const value_type value) noexcept
 
DerivedTypeoperator-= (const Simd &other) noexcept
 
template<TupleType U>
requires ( U::Size == Size )
DerivedTypeoperator-= (const U &other) noexcept
 
DerivedTypeoperator-= (const value_type value) noexcept
 
DerivedTypeoperator*= (const Simd &other) noexcept
 
template<TupleType U>
requires ( U::Size == Size )
DerivedTypeoperator*= (const U &other) noexcept
 
DerivedTypeoperator*= (const value_type value) noexcept
 
DerivedTypeoperator/= (const Simd &other) noexcept
 
template<TupleType U>
requires ( U::Size == Size )
DerivedTypeoperator/= (const U &other) noexcept
 
DerivedTypeoperator/= (const value_type value) noexcept
 
const_reference operator[] (size_t index) const noexcept
 
reference operator[] (size_t index) noexcept
 
const_pointer data () const noexcept
 
pointer data () noexcept
 
constexpr size_t size () const noexcept
 
const_reference front () const noexcept
 
reference front () noexcept
 
const_reference back () const noexcept
 
reference back () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
iterator begin () noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
iterator end () noexcept
 
const_reverse_iterator rbegin () const noexcept
 
reverse_iterator rbegin () noexcept
 
const_reverse_iterator rend () const noexcept
 
reverse_iterator rend () noexcept
 
void Assign (value_type xv, value_type yv, value_type zv) noexcept
 
void Assign (const ArrayType &src) noexcept
 
void Assign (SIMDType src) noexcept
 
bool HasNaN () const noexcept
 
bool IsFinite () const noexcept
 
bool IsInfinite () const noexcept
 
std::string ToString () const
 

Static Public Member Functions

static DerivedType Zero () noexcept
 
static DerivedType One () noexcept
 
static DerivedType UnitX () noexcept
 
static DerivedType UnitY () noexcept
 
static DerivedType UnitZ () noexcept
 
static DerivedType Up () noexcept
 
static DerivedType Down () noexcept
 
static DerivedType Right () noexcept
 
static DerivedType Left () noexcept
 
static DerivedType Forward () noexcept
 
static DerivedType Backward () noexcept
 

Public Attributes

union { 
 
   ArrayType   values 
 
   struct { 
 
      value_type   x 
 
      value_type   y 
 
      value_type   z 
 
   }  
 
};  
 

Static Public Attributes

static constexpr size_type Size = 3
 

Member Typedef Documentation

◆ ArrayType

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::ArrayType = typename Traits::ArrayType

◆ const_iterator

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::const_iterator = typename ArrayType::const_iterator

◆ const_pointer

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::const_pointer = typename ArrayType::const_pointer

◆ const_reference

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::const_reference = typename ArrayType::const_reference

◆ const_reverse_iterator

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::const_reverse_iterator = typename ArrayType::const_reverse_iterator

◆ DerivedType

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::DerivedType = DerivedT

◆ iterator

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::iterator = typename ArrayType::iterator

◆ pointer

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::pointer = typename ArrayType::pointer

◆ reference

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::reference = typename ArrayType::reference

◆ reverse_iterator

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::reverse_iterator = typename ArrayType::reverse_iterator

◆ Simd

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::Simd = TupleSimd<DerivedType>

The mathematical operations are performed using this type which holds a SIMD vector.

◆ SIMDType

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::SIMDType = typename Traits::SIMDType

◆ size_type

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::size_type = size_t

◆ SizeType

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::SizeType = size_type

◆ Traits

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::Traits = SIMD::Traits<value_type, Size>

◆ value_type

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::value_type = T

◆ ValueType

template<typename DerivedT , ArithmeticType T>
using Harlinn::Math::Tuple3< DerivedT, T >::ValueType = value_type

Constructor & Destructor Documentation

◆ Tuple3() [1/7]

template<typename DerivedT , ArithmeticType T>
Harlinn::Math::Tuple3< DerivedT, T >::Tuple3 ( )
inlinenoexcept

◆ Tuple3() [2/7]

template<typename DerivedT , ArithmeticType T>
Harlinn::Math::Tuple3< DerivedT, T >::Tuple3 ( value_type v)
inlineexplicitnoexcept

◆ Tuple3() [3/7]

template<typename DerivedT , ArithmeticType T>
Harlinn::Math::Tuple3< DerivedT, T >::Tuple3 ( value_type xv,
value_type yv,
value_type zv )
inlinenoexcept

◆ Tuple3() [4/7]

template<typename DerivedT , ArithmeticType T>
Harlinn::Math::Tuple3< DerivedT, T >::Tuple3 ( const ArrayType a)
inlinenoexcept

◆ Tuple3() [5/7]

template<typename DerivedT , ArithmeticType T>
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
Harlinn::Math::Tuple3< DerivedT, T >::Tuple3 ( const U & other)
inlinenoexcept

◆ Tuple3() [6/7]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires std::is_same_v<Traits, typename U::Traits>
Harlinn::Math::Tuple3< DerivedT, T >::Tuple3 ( const U & other)
inlinenoexcept

◆ Tuple3() [7/7]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires ( std::is_same_v<Traits, typename U::Traits> == false )
Harlinn::Math::Tuple3< DerivedT, T >::Tuple3 ( const U & other)
inlineexplicitnoexcept

Member Function Documentation

◆ Assign() [1/3]

template<typename DerivedT , ArithmeticType T>
void Harlinn::Math::Tuple3< DerivedT, T >::Assign ( const ArrayType & src)
inlinenoexcept

◆ Assign() [2/3]

template<typename DerivedT , ArithmeticType T>
void Harlinn::Math::Tuple3< DerivedT, T >::Assign ( SIMDType src)
inlinenoexcept

◆ Assign() [3/3]

template<typename DerivedT , ArithmeticType T>
void Harlinn::Math::Tuple3< DerivedT, T >::Assign ( value_type xv,
value_type yv,
value_type zv )
inlinenoexcept

◆ back() [1/2]

template<typename DerivedT , ArithmeticType T>
const_reference Harlinn::Math::Tuple3< DerivedT, T >::back ( ) const
inlinenoexcept

◆ back() [2/2]

template<typename DerivedT , ArithmeticType T>
reference Harlinn::Math::Tuple3< DerivedT, T >::back ( )
inlinenoexcept

◆ Backward()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::Backward ( )
inlinestaticnoexcept

◆ begin() [1/2]

template<typename DerivedT , ArithmeticType T>
const_iterator Harlinn::Math::Tuple3< DerivedT, T >::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

template<typename DerivedT , ArithmeticType T>
iterator Harlinn::Math::Tuple3< DerivedT, T >::begin ( )
inlinenoexcept

◆ cbegin()

template<typename DerivedT , ArithmeticType T>
const_iterator Harlinn::Math::Tuple3< DerivedT, T >::cbegin ( ) const
inlinenoexcept

◆ cend()

template<typename DerivedT , ArithmeticType T>
const_iterator Harlinn::Math::Tuple3< DerivedT, T >::cend ( ) const
inlinenoexcept

◆ data() [1/2]

template<typename DerivedT , ArithmeticType T>
const_pointer Harlinn::Math::Tuple3< DerivedT, T >::data ( ) const
inlinenoexcept

◆ data() [2/2]

template<typename DerivedT , ArithmeticType T>
pointer Harlinn::Math::Tuple3< DerivedT, T >::data ( )
inlinenoexcept

◆ Down()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::Down ( )
inlinestaticnoexcept

◆ end() [1/2]

template<typename DerivedT , ArithmeticType T>
const_iterator Harlinn::Math::Tuple3< DerivedT, T >::end ( ) const
inlinenoexcept

◆ end() [2/2]

template<typename DerivedT , ArithmeticType T>
iterator Harlinn::Math::Tuple3< DerivedT, T >::end ( )
inlinenoexcept

◆ Forward()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::Forward ( )
inlinestaticnoexcept

◆ front() [1/2]

template<typename DerivedT , ArithmeticType T>
const_reference Harlinn::Math::Tuple3< DerivedT, T >::front ( ) const
inlinenoexcept

◆ front() [2/2]

template<typename DerivedT , ArithmeticType T>
reference Harlinn::Math::Tuple3< DerivedT, T >::front ( )
inlinenoexcept

◆ HasNaN()

template<typename DerivedT , ArithmeticType T>
bool Harlinn::Math::Tuple3< DerivedT, T >::HasNaN ( ) const
inlinenoexcept

◆ IsFinite()

template<typename DerivedT , ArithmeticType T>
bool Harlinn::Math::Tuple3< DerivedT, T >::IsFinite ( ) const
inlinenoexcept

◆ IsInfinite()

template<typename DerivedT , ArithmeticType T>
bool Harlinn::Math::Tuple3< DerivedT, T >::IsInfinite ( ) const
inlinenoexcept

◆ Left()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::Left ( )
inlinestaticnoexcept

◆ One()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::One ( )
inlinestaticnoexcept

◆ operator Simd()

template<typename DerivedT , ArithmeticType T>
Harlinn::Math::Tuple3< DerivedT, T >::operator Simd ( ) const
inlinenoexcept

◆ operator!=() [1/3]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires ( U::Size == Size )
bool Harlinn::Math::Tuple3< DerivedT, T >::operator!= ( const U & other) const
inlineconstexprnoexcept

◆ operator!=() [2/3]

template<typename DerivedT , ArithmeticType T>
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
bool Harlinn::Math::Tuple3< DerivedT, T >::operator!= ( const U & other) const
inlinenoexcept

◆ operator!=() [3/3]

template<typename DerivedT , ArithmeticType T>
bool Harlinn::Math::Tuple3< DerivedT, T >::operator!= ( value_type value) const
inlineconstexprnoexcept

◆ operator*=() [1/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator*= ( const Simd & other)
inlinenoexcept

◆ operator*=() [2/3]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires ( U::Size == Size )
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator*= ( const U & other)
inlinenoexcept

◆ operator*=() [3/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator*= ( const value_type value)
inlinenoexcept

◆ operator+=() [1/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator+= ( const Simd & other)
inlinenoexcept

◆ operator+=() [2/3]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires ( U::Size == Size )
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator+= ( const U & other)
inlinenoexcept

◆ operator+=() [3/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator+= ( const value_type value)
inlinenoexcept

◆ operator-()

template<typename DerivedT , ArithmeticType T>
Simd Harlinn::Math::Tuple3< DerivedT, T >::operator- ( ) const
inlinenoexcept

◆ operator-=() [1/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator-= ( const Simd & other)
inlinenoexcept

◆ operator-=() [2/3]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires ( U::Size == Size )
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator-= ( const U & other)
inlinenoexcept

◆ operator-=() [3/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator-= ( const value_type value)
inlinenoexcept

◆ operator/=() [1/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator/= ( const Simd & other)
inlinenoexcept

◆ operator/=() [2/3]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires ( U::Size == Size )
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator/= ( const U & other)
inlinenoexcept

◆ operator/=() [3/3]

template<typename DerivedT , ArithmeticType T>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator/= ( const value_type value)
inlinenoexcept

◆ operator=()

template<typename DerivedT , ArithmeticType T>
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
DerivedType & Harlinn::Math::Tuple3< DerivedT, T >::operator= ( const U & other)
inlinenoexcept

◆ operator==() [1/3]

template<typename DerivedT , ArithmeticType T>
template<TupleType U>
requires ( U::Size == Size )
bool Harlinn::Math::Tuple3< DerivedT, T >::operator== ( const U & other) const
inlineconstexprnoexcept

◆ operator==() [2/3]

template<typename DerivedT , ArithmeticType T>
template<SimdType U>
requires std::is_same_v<Traits, typename U::Traits>
bool Harlinn::Math::Tuple3< DerivedT, T >::operator== ( const U & other) const
inlinenoexcept

◆ operator==() [3/3]

template<typename DerivedT , ArithmeticType T>
bool Harlinn::Math::Tuple3< DerivedT, T >::operator== ( value_type value) const
inlineconstexprnoexcept

◆ operator[]() [1/2]

template<typename DerivedT , ArithmeticType T>
const_reference Harlinn::Math::Tuple3< DerivedT, T >::operator[] ( size_t index) const
inlinenoexcept

◆ operator[]() [2/2]

template<typename DerivedT , ArithmeticType T>
reference Harlinn::Math::Tuple3< DerivedT, T >::operator[] ( size_t index)
inlinenoexcept

◆ rbegin() [1/2]

template<typename DerivedT , ArithmeticType T>
const_reverse_iterator Harlinn::Math::Tuple3< DerivedT, T >::rbegin ( ) const
inlinenoexcept

◆ rbegin() [2/2]

template<typename DerivedT , ArithmeticType T>
reverse_iterator Harlinn::Math::Tuple3< DerivedT, T >::rbegin ( )
inlinenoexcept

◆ rend() [1/2]

template<typename DerivedT , ArithmeticType T>
const_reverse_iterator Harlinn::Math::Tuple3< DerivedT, T >::rend ( ) const
inlinenoexcept

◆ rend() [2/2]

template<typename DerivedT , ArithmeticType T>
reverse_iterator Harlinn::Math::Tuple3< DerivedT, T >::rend ( )
inlinenoexcept

◆ Right()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::Right ( )
inlinestaticnoexcept

◆ size()

template<typename DerivedT , ArithmeticType T>
size_t Harlinn::Math::Tuple3< DerivedT, T >::size ( ) const
inlineconstexprnoexcept

◆ ToSimd()

template<typename DerivedT , ArithmeticType T>
Simd Harlinn::Math::Tuple3< DerivedT, T >::ToSimd ( ) const
inlinenoexcept

◆ ToString()

template<typename DerivedT , ArithmeticType T>
std::string Harlinn::Math::Tuple3< DerivedT, T >::ToString ( ) const
inline

◆ UnitX()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::UnitX ( )
inlinestaticnoexcept

◆ UnitY()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::UnitY ( )
inlinestaticnoexcept

◆ UnitZ()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::UnitZ ( )
inlinestaticnoexcept

◆ Up()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::Up ( )
inlinestaticnoexcept

◆ Zero()

template<typename DerivedT , ArithmeticType T>
static DerivedType Harlinn::Math::Tuple3< DerivedT, T >::Zero ( )
inlinestaticnoexcept

Member Data Documentation

◆ [union]

union { ... } Harlinn::Math::Tuple3< DerivedT, T >

◆ Size

template<typename DerivedT , ArithmeticType T>
size_type Harlinn::Math::Tuple3< DerivedT, T >::Size = 3
staticconstexpr

◆ values

template<typename DerivedT , ArithmeticType T>
ArrayType Harlinn::Math::Tuple3< DerivedT, T >::values

◆ x

template<typename DerivedT , ArithmeticType T>
value_type Harlinn::Math::Tuple3< DerivedT, T >::x

◆ y

template<typename DerivedT , ArithmeticType T>
value_type Harlinn::Math::Tuple3< DerivedT, T >::y

◆ z

template<typename DerivedT , ArithmeticType T>
value_type Harlinn::Math::Tuple3< DerivedT, T >::z

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