Nexus Engine  v0.0.1
Loading...
Searching...
No Matches
Nexus::Quaternion< T > Class Template Referenceexport

Public Types

using value_type = T
using size_type = usize

Public Member Functions

constexpr Quaternion ()=default
constexpr Quaternion (T x, T y, T z, T w)
template<std::floating_point U>
constexpr Quaternion (const Vec3< U > &axis, U angleRadians)
constexpr T & X ()
constexpr const T & X () const
constexpr T & Y ()
constexpr const T & Y () const
constexpr T & Z ()
constexpr const T & Z () const
constexpr T & W ()
constexpr const T & W () const
constexpr T * Data ()
constexpr const T * Data () const
template<std::floating_point U>
constexpr bool operator== (const Quaternion< U > &other) const
template<std::floating_point U>
constexpr Quaternionoperator+= (const Quaternion< U > &other)
template<std::floating_point U>
constexpr Quaternionoperator-= (const Quaternion< U > &other)
template<std::floating_point U>
constexpr Quaternionoperator*= (const Quaternion< U > &other)
template<std::floating_point U>
constexpr Quaternionoperator*= (U scalar)
template<std::floating_point U>
constexpr Quaternionoperator/= (U scalar)
constexpr Quaternion operator+ () const
constexpr Quaternion operator- () const
constexpr T LengthSquared () const
constexpr T Length () const
constexpr Quaternion Normalized () const
constexpr void Normalize ()
constexpr Quaternion Conjugate () const
constexpr Quaternion Inverse () const
constexpr Vec3< T > RotateVector (const Vec3< T > &v) const
constexpr Vec3< T > ToEuler () const
constexpr T Pitch () const
constexpr T Yaw () const
constexpr T Roll () const
template<std::floating_point U>
constexpr Quaternion< T > FromEuler (U pitch, U yaw, U roll)
template<std::floating_point U>
constexpr Quaternion< T > FromAxisAngle (const Vec3< U > &axis, U angleRadians)
template<std::floating_point U>
constexpr Quaternion< T > & operator+= (const Quaternion< U > &other)
template<std::floating_point U>
constexpr Quaternion< T > & operator-= (const Quaternion< U > &other)
template<std::floating_point U>
constexpr Quaternion< T > & operator*= (const Quaternion< U > &other)
template<std::floating_point U>
constexpr Quaternion< T > & operator*= (U scalar)
template<std::floating_point U>
constexpr Quaternion< T > & operator/= (U scalar)

Static Public Member Functions

static constexpr Quaternion Identity ()
template<std::floating_point U>
static constexpr Quaternion FromEuler (U pitch, U yaw, U roll)
template<std::floating_point U>
static constexpr Quaternion FromAxisAngle (const Vec3< U > &axis, U angleRadians)
static constexpr size_type Size ()

Member Typedef Documentation

◆ size_type

template<std::floating_point T>
using Nexus::Quaternion< T >::size_type = usize

◆ value_type

template<std::floating_point T>
using Nexus::Quaternion< T >::value_type = T

Constructor & Destructor Documentation

◆ Quaternion() [1/3]

template<std::floating_point T>
Nexus::Quaternion< T >::Quaternion ( )
constexprdefault

◆ Quaternion() [2/3]

template<std::floating_point T>
Nexus::Quaternion< T >::Quaternion ( T x,
T y,
T z,
T w )
constexpr

◆ Quaternion() [3/3]

template<std::floating_point T>
template<std::floating_point U>
Nexus::Quaternion< T >::Quaternion ( const Vec3< U > & axis,
U angleRadians )
constexpr

Member Function Documentation

◆ Conjugate()

template<std::floating_point T>
Quaternion< T > Nexus::Quaternion< T >::Conjugate ( ) const
constexpr

◆ Data() [1/2]

template<std::floating_point T>
T * Nexus::Quaternion< T >::Data ( )
constexpr

◆ Data() [2/2]

template<std::floating_point T>
const T * Nexus::Quaternion< T >::Data ( ) const
constexpr

◆ FromAxisAngle() [1/2]

template<std::floating_point T>
template<std::floating_point U>
constexpr Quaternion Nexus::Quaternion< T >::FromAxisAngle ( const Vec3< U > & axis,
U angleRadians )
staticconstexpr

◆ FromAxisAngle() [2/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion< T > Nexus::Quaternion< T >::FromAxisAngle ( const Vec3< U > & axis,
U angleRadians )
constexpr

◆ FromEuler() [1/2]

template<std::floating_point T>
template<std::floating_point U>
constexpr Quaternion Nexus::Quaternion< T >::FromEuler ( U pitch,
U yaw,
U roll )
staticconstexpr

◆ FromEuler() [2/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion< T > Nexus::Quaternion< T >::FromEuler ( U pitch,
U yaw,
U roll )
constexpr

◆ Identity()

template<std::floating_point T>
Quaternion< T > Nexus::Quaternion< T >::Identity ( )
staticconstexpr

◆ Inverse()

template<std::floating_point T>
Quaternion< T > Nexus::Quaternion< T >::Inverse ( ) const
constexpr

◆ Length()

template<std::floating_point T>
T Nexus::Quaternion< T >::Length ( ) const
constexpr

◆ LengthSquared()

template<std::floating_point T>
T Nexus::Quaternion< T >::LengthSquared ( ) const
constexpr

◆ Normalize()

template<std::floating_point T>
void Nexus::Quaternion< T >::Normalize ( )
constexpr

◆ Normalized()

template<std::floating_point T>
Quaternion< T > Nexus::Quaternion< T >::Normalized ( ) const
constexpr

◆ operator*=() [1/4]

template<std::floating_point T>
template<std::floating_point U>
Quaternion & Nexus::Quaternion< T >::operator*= ( const Quaternion< U > & other)
constexpr

◆ operator*=() [2/4]

template<std::floating_point T>
template<std::floating_point U>
Quaternion< T > & Nexus::Quaternion< T >::operator*= ( const Quaternion< U > & other)
constexpr

◆ operator*=() [3/4]

template<std::floating_point T>
template<std::floating_point U>
Quaternion & Nexus::Quaternion< T >::operator*= ( U scalar)
constexpr

◆ operator*=() [4/4]

template<std::floating_point T>
template<std::floating_point U>
Quaternion< T > & Nexus::Quaternion< T >::operator*= ( U scalar)
constexpr

◆ operator+()

template<std::floating_point T>
Quaternion< T > Nexus::Quaternion< T >::operator+ ( ) const
constexpr

◆ operator+=() [1/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion & Nexus::Quaternion< T >::operator+= ( const Quaternion< U > & other)
constexpr

◆ operator+=() [2/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion< T > & Nexus::Quaternion< T >::operator+= ( const Quaternion< U > & other)
constexpr

◆ operator-()

template<std::floating_point T>
Quaternion< T > Nexus::Quaternion< T >::operator- ( ) const
constexpr

◆ operator-=() [1/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion & Nexus::Quaternion< T >::operator-= ( const Quaternion< U > & other)
constexpr

◆ operator-=() [2/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion< T > & Nexus::Quaternion< T >::operator-= ( const Quaternion< U > & other)
constexpr

◆ operator/=() [1/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion & Nexus::Quaternion< T >::operator/= ( U scalar)
constexpr

◆ operator/=() [2/2]

template<std::floating_point T>
template<std::floating_point U>
Quaternion< T > & Nexus::Quaternion< T >::operator/= ( U scalar)
constexpr

◆ operator==()

template<std::floating_point T>
template<std::floating_point U>
bool Nexus::Quaternion< T >::operator== ( const Quaternion< U > & other) const
constexpr

◆ Pitch()

template<std::floating_point T>
T Nexus::Quaternion< T >::Pitch ( ) const
constexpr

◆ Roll()

template<std::floating_point T>
T Nexus::Quaternion< T >::Roll ( ) const
constexpr

◆ RotateVector()

template<std::floating_point T>
Vec3< T > Nexus::Quaternion< T >::RotateVector ( const Vec3< T > & v) const
constexpr

◆ Size()

template<std::floating_point T>
usize Nexus::Quaternion< T >::Size ( )
staticconstexpr

◆ ToEuler()

template<std::floating_point T>
Vec3< T > Nexus::Quaternion< T >::ToEuler ( ) const
constexpr

◆ W() [1/2]

template<std::floating_point T>
T & Nexus::Quaternion< T >::W ( )
constexpr

◆ W() [2/2]

template<std::floating_point T>
const T & Nexus::Quaternion< T >::W ( ) const
constexpr

◆ X() [1/2]

template<std::floating_point T>
T & Nexus::Quaternion< T >::X ( )
constexpr

◆ X() [2/2]

template<std::floating_point T>
const T & Nexus::Quaternion< T >::X ( ) const
constexpr

◆ Y() [1/2]

template<std::floating_point T>
T & Nexus::Quaternion< T >::Y ( )
constexpr

◆ Y() [2/2]

template<std::floating_point T>
const T & Nexus::Quaternion< T >::Y ( ) const
constexpr

◆ Yaw()

template<std::floating_point T>
T Nexus::Quaternion< T >::Yaw ( ) const
constexpr

◆ Z() [1/2]

template<std::floating_point T>
T & Nexus::Quaternion< T >::Z ( )
constexpr

◆ Z() [2/2]

template<std::floating_point T>
const T & Nexus::Quaternion< T >::Z ( ) const
constexpr

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