Maipa's Standard Library Extension 1.5.6
mstd
Loading...
Searching...
No Matches
mstd::quat< T > Class Template Reference

#include <quat.hpp>

Inheritance diagram for mstd::quat< T >:
[legend]
Collaboration diagram for mstd::quat< T >:
[legend]

Public Types

using value_type = T
using vec_type = vec<3, T>

Public Member Functions

_MSTD_CONSTEXPR20 quat ()
_MSTD_CONSTEXPR20 quat (const T &scalar, const vec_type &vector)
_MSTD_CONSTEXPR20 quat (const T &scalar, const T &x, const T &y, const T &z)
template<arithmetic OT>
_MSTD_CONSTEXPR20 quat (const quat< OT > &other)
_MSTD_CONSTEXPR20 ~quat ()=default
template<arithmetic OT>
_MSTD_CONSTEXPR20 quat< T > & operator= (const quat< OT > &other)
_MSTD_CONSTEXPR20 T magnitude () const
_MSTD_CONSTEXPR20 quat< T > & normalize ()
_MSTD_CONSTEXPR20 quat< T > normalized () const
_MSTD_CONSTEXPR20 quat< T > & conjugate ()
_MSTD_CONSTEXPR20 quat< T > conjugated () const
_MSTD_CONSTEXPR20 quat< T > & invert ()
_MSTD_CONSTEXPR20 quat< T > inverted () const
_MSTD_CONSTEXPR20 vec_type to_radians () const
_MSTD_CONSTEXPR20 vec_type to_euler_angles () const
_MSTD_CONSTEXPR20 T scalar (const quat< T > &other)
_MSTD_CONSTEXPR20 quat< T > & operator+= (const quat< T > &other)
_MSTD_CONSTEXPR20 quat< T > & operator-= (const quat< T > &other)
_MSTD_CONSTEXPR20 quat< T > & operator*= (const quat< T > &other)
_MSTD_CONSTEXPR20 quat< T > & operator*= (const vec_type &other)
_MSTD_CONSTEXPR20 quat< T > & operator*= (const T &other)
_MSTD_CONSTEXPR20 quat< T > & operator/= (const quat< T > &other)
_MSTD_CONSTEXPR20 quat< T > & operator/= (const T &other)
_MSTD_CONSTEXPR20 quat< T > operator+ (const quat< T > &other) const
_MSTD_CONSTEXPR20 quat< T > operator- (const quat< T > &other) const
_MSTD_CONSTEXPR20 quat< T > operator* (const quat< T > &other) const
_MSTD_CONSTEXPR20 quat< T > operator* (const vec_type &other) const
_MSTD_CONSTEXPR20 quat< T > operator* (const T &other) const
_MSTD_CONSTEXPR20 quat< T > operator/ (const quat< T > &other) const
_MSTD_CONSTEXPR20 quat< T > operator/ (const T &other) const
_MSTD_CONSTEXPR20 quat< T > operator- () const
_MSTD_CONSTEXPR20 quat< T > operator+ () const
_MSTD_CONSTEXPR20 quat< T > & operator-- ()
_MSTD_CONSTEXPR20 quat< T > operator-- (int)
_MSTD_CONSTEXPR20 quat< T > & operator++ ()
_MSTD_CONSTEXPR20 quat< T > operator++ (int)
_MSTD_CONSTEXPR20 bool operator== (const quat< T > &other) const
_MSTD_CONSTEXPR20 bool operator!= (const quat< T > &other) const

Static Public Member Functions

static _MSTD_CONSTEXPR20 quat< T > rotation (const vec_type &axis, const T &radians)
static _MSTD_CONSTEXPR20 quat< T > from_euler_angels (const vec_type &eulerAngels)
static _MSTD_CONSTEXPR20 quat< T > from_radians (const vec_type &radians)

Public Attributes

s
vec_type v

Friends

_MSTD_CONSTEXPR20 quat< T > operator* (const vec_type &other, const quat< T > &quaternion)
_MSTD_CONSTEXPR20 quat< T > operator* (const T &other, const quat< T > &quaternion)
std::ostream & operator<< (std::ostream &str, const quat< T > &quaternion)

Member Typedef Documentation

◆ value_type

template<arithmetic T>
using mstd::quat< T >::value_type = T

◆ vec_type

template<arithmetic T>
using mstd::quat< T >::vec_type = vec<3, T>

Constructor & Destructor Documentation

◆ quat() [1/4]

template<arithmetic T>
_MSTD_CONSTEXPR20 mstd::quat< T >::quat ( )
inline

◆ quat() [2/4]

template<arithmetic T>
_MSTD_CONSTEXPR20 mstd::quat< T >::quat ( const T & scalar,
const vec_type & vector )
inline

◆ quat() [3/4]

template<arithmetic T>
_MSTD_CONSTEXPR20 mstd::quat< T >::quat ( const T & scalar,
const T & x,
const T & y,
const T & z )
inline

◆ quat() [4/4]

template<arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 mstd::quat< T >::quat ( const quat< OT > & other)
inline

◆ ~quat()

template<arithmetic T>
_MSTD_CONSTEXPR20 mstd::quat< T >::~quat ( )
default

Member Function Documentation

◆ conjugate()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::conjugate ( )
inline

◆ conjugated()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::conjugated ( ) const
inline

◆ from_euler_angels()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::from_euler_angels ( const vec_type & eulerAngels)
inlinestatic

◆ from_radians()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::from_radians ( const vec_type & radians)
inlinestatic

◆ invert()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::invert ( )
inline

◆ inverted()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::inverted ( ) const
inline

◆ magnitude()

template<arithmetic T>
_MSTD_CONSTEXPR20 T mstd::quat< T >::magnitude ( ) const
inline

◆ normalize()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::normalize ( )
inline

◆ normalized()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::normalized ( ) const
inline

◆ operator!=()

template<arithmetic T>
_MSTD_CONSTEXPR20 bool mstd::quat< T >::operator!= ( const quat< T > & other) const
inline

◆ operator*() [1/3]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator* ( const quat< T > & other) const
inline

◆ operator*() [2/3]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator* ( const T & other) const
inline

◆ operator*() [3/3]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator* ( const vec_type & other) const
inline

◆ operator*=() [1/3]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator*= ( const quat< T > & other)
inline

◆ operator*=() [2/3]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator*= ( const T & other)
inline

◆ operator*=() [3/3]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator*= ( const vec_type & other)
inline

◆ operator+() [1/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator+ ( ) const
inline

◆ operator+() [2/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator+ ( const quat< T > & other) const
inline

◆ operator++() [1/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator++ ( )
inline

◆ operator++() [2/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator++ ( int )
inline

◆ operator+=()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator+= ( const quat< T > & other)
inline

◆ operator-() [1/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator- ( ) const
inline

◆ operator-() [2/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator- ( const quat< T > & other) const
inline

◆ operator--() [1/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator-- ( )
inline

◆ operator--() [2/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator-- ( int )
inline

◆ operator-=()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator-= ( const quat< T > & other)
inline

◆ operator/() [1/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator/ ( const quat< T > & other) const
inline

◆ operator/() [2/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::operator/ ( const T & other) const
inline

◆ operator/=() [1/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator/= ( const quat< T > & other)
inline

◆ operator/=() [2/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator/= ( const T & other)
inline

◆ operator=()

template<arithmetic T>
template<arithmetic OT>
_MSTD_CONSTEXPR20 quat< T > & mstd::quat< T >::operator= ( const quat< OT > & other)
inline

◆ operator==()

template<arithmetic T>
_MSTD_CONSTEXPR20 bool mstd::quat< T >::operator== ( const quat< T > & other) const
inline

◆ rotation()

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > mstd::quat< T >::rotation ( const vec_type & axis,
const T & radians )
inlinestatic

◆ scalar()

template<arithmetic T>
_MSTD_CONSTEXPR20 T mstd::quat< T >::scalar ( const quat< T > & other)
inline

◆ to_euler_angles()

template<arithmetic T>
_MSTD_CONSTEXPR20 vec_type mstd::quat< T >::to_euler_angles ( ) const
inline

◆ to_radians()

template<arithmetic T>
_MSTD_CONSTEXPR20 vec_type mstd::quat< T >::to_radians ( ) const
inline

◆ operator* [1/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > operator* ( const T & other,
const quat< T > & quaternion )
friend

◆ operator* [2/2]

template<arithmetic T>
_MSTD_CONSTEXPR20 quat< T > operator* ( const vec_type & other,
const quat< T > & quaternion )
friend

◆ operator<<

template<arithmetic T>
std::ostream & operator<< ( std::ostream & str,
const quat< T > & quaternion )
friend

Member Data Documentation

◆ s

template<arithmetic T>
T mstd::quat< T >::s

◆ v

template<arithmetic T>
vec_type mstd::quat< T >::v