Lugdunum  0.1.0
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
lug::Math::Quaternion< T > Class Template Reference

#include <Quaternion.hpp>

Collaboration diagram for lug::Math::Quaternion< T >:
[legend]

Public Member Functions

 Quaternion ()=default
 
 Quaternion (T w, T x, T y, T z)
 
 Quaternion (T data[4])
 
 Quaternion (T angle, const Vector< 3, T > &axis)
 
 Quaternion (const Quaternion< T > &)=default
 
 Quaternion (Quaternion< T > &&)=default
 
Quaternion< T > & operator= (const Quaternion< T > &)=default
 
Quaternion< T > & operator= (Quaternion< T > &&)=default
 
 ~Quaternion ()=default
 
T & operator[] (std::size_t idx)
 
const T & operator[] (std::size_t idx) const
 
void conjugate ()
 
void inverse ()
 
void normalize ()
 
constexpr T length () const
 
constexpr T squaredLength () const
 
getAngle () const
 
Vector< 3, T > getAxis () const
 
Mat4x4< T > transform () const
 

Static Public Member Functions

static Quaternion< T > identity ()
 
static Quaternion< T > fromAxes (const Vector< 3, T > &xAxis, const Vector< 3, T > &yAxis, const Vector< 3, T > &zAxis)
 
static Quaternion< T > fromRotationMatrix (const Matrix< 4, 4, T > &rotMatrix)
 

Private Attributes

_data [4]
 

Detailed Description

template<typename T = double>
class lug::Math::Quaternion< T >

Definition at line 12 of file Quaternion.hpp.

Constructor & Destructor Documentation

◆ Quaternion() [1/6]

template<typename T = double>
lug::Math::Quaternion< T >::Quaternion ( )
default

◆ Quaternion() [2/6]

template<typename T = double>
Quaternion::Quaternion ( w,
x,
y,
z 
)

Definition at line 2 of file Quaternion.inl.

◆ Quaternion() [3/6]

template<typename T = double>
Quaternion::Quaternion ( data[4])

Definition at line 5 of file Quaternion.inl.

◆ Quaternion() [4/6]

template<typename T = double>
Quaternion::Quaternion ( angle,
const Vector< 3, T > &  axis 
)

Definition at line 15 of file Quaternion.inl.

◆ Quaternion() [5/6]

template<typename T = double>
lug::Math::Quaternion< T >::Quaternion ( const Quaternion< T > &  )
default

◆ Quaternion() [6/6]

template<typename T = double>
lug::Math::Quaternion< T >::Quaternion ( Quaternion< T > &&  )
default

◆ ~Quaternion()

template<typename T = double>
lug::Math::Quaternion< T >::~Quaternion ( )
default

Member Function Documentation

◆ operator=() [1/2]

template<typename T = double>
Quaternion<T>& lug::Math::Quaternion< T >::operator= ( const Quaternion< T > &  )
default

◆ operator=() [2/2]

template<typename T = double>
Quaternion<T>& lug::Math::Quaternion< T >::operator= ( Quaternion< T > &&  )
default

◆ operator[]() [1/2]

template<typename T = double>
T & Quaternion::operator[] ( std::size_t  idx)
inline

Definition at line 28 of file Quaternion.inl.

◆ operator[]() [2/2]

template<typename T = double>
const T & Quaternion::operator[] ( std::size_t  idx) const
inline

Definition at line 33 of file Quaternion.inl.

◆ conjugate()

template<typename T = double>
void Quaternion::conjugate ( )
inline

Definition at line 38 of file Quaternion.inl.

◆ inverse()

template<typename T = double>
void Quaternion::inverse ( )
inline

Definition at line 43 of file Quaternion.inl.

◆ normalize()

template<typename T = double>
void Quaternion::normalize ( )
inline

Definition at line 48 of file Quaternion.inl.

◆ length()

template<typename T = double>
constexpr T Quaternion::length ( ) const
inline

Definition at line 53 of file Quaternion.inl.

◆ squaredLength()

template<typename T = double>
constexpr T Quaternion::squaredLength ( ) const
inline

Definition at line 58 of file Quaternion.inl.

◆ getAngle()

template<typename T = double>
T Quaternion::getAngle ( ) const
inline

Definition at line 63 of file Quaternion.inl.

◆ getAxis()

template<typename T = double>
Vector< 3, T > Quaternion::getAxis ( ) const
inline

Definition at line 68 of file Quaternion.inl.

◆ transform()

template<typename T = double>
Mat4x4< T > Quaternion::transform ( ) const
inline

Definition at line 78 of file Quaternion.inl.

◆ identity()

template<typename T = double>
Quaternion< T > Quaternion::identity ( )
inlinestatic

Definition at line 109 of file Quaternion.inl.

◆ fromAxes()

template<typename T = double>
Quaternion< T > Quaternion::fromAxes ( const Vector< 3, T > &  xAxis,
const Vector< 3, T > &  yAxis,
const Vector< 3, T > &  zAxis 
)
inlinestatic

Definition at line 114 of file Quaternion.inl.

◆ fromRotationMatrix()

template<typename T = double>
Quaternion< T > Quaternion::fromRotationMatrix ( const Matrix< 4, 4, T > &  rotMatrix)
inlinestatic

Definition at line 133 of file Quaternion.inl.

Member Data Documentation

◆ _data

template<typename T = double>
T lug::Math::Quaternion< T >::_data[4]
private

Definition at line 71 of file Quaternion.hpp.


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