Rasterfarm-SDK
Loading...
Searching...
No Matches
Quaternion< T > Class Template Reference

#include <quaternion.h>

Inheritance diagram for Quaternion< T >:
Vector< T, 4 >

Public Member Functions

 Quaternion ()
 
 Quaternion (T a, T b, T c, T d)
 
 Quaternion (const Vector< T, 4 > &other)
 
 Quaternion (T array[])
 
template<typename U >
 Quaternion (const Initializer< U > &list)
 
Quaternion operator* (const Quaternion &other) const
 
void conjugate ()
 
void invert ()
 
- Public Member Functions inherited from Vector< T, 4 >
 Vector (const Vector< T, LENGTH > &other)
 
 Vector (const Vector< U, LENGTH > &other)
 
 Vector (const Vector< T, LENGTH+1 > &other)
 
 Vector (const Vector< T, LENGTH+2 > &other)
 
 Vector (const Vector< T, LENGTH - 1 > &other, T last=T(0))
 
 Vector (const Vector< T, LENGTH - 2 > &other, T lastA=T(0), T lastB=T(0))
 
 Vector (const T array[])
 
 Vector (const Initializer< U > &list)
 
 Vector (const Initializer< T > &list)
 
 Vector ()
 
 operator Vector< U, LENGTH > ()
 
 operator T* ()
 
void operator= (T array[])
 
void operator= (const Vector< OTHER_T, LENGTH > &other)
 
void operator= (const T &scalar)
 
Toperator[] (const size_t index)
 
const Toperator[] (const size_t index) const
 
bool operator== (const Vector< T, LENGTH > &other) const
 
bool operator!= (const Vector< T, LENGTH > &other) const
 
void operator+= (const Vector< T, LENGTH > &other)
 
void operator-= (const Vector< T, LENGTH > &other)
 
Vector< T, LENGTH > operator* (const T &scalar) const
 
void operator*= (T scalar)
 
void operator/= (T scalar)
 
T operator| (const Vector< T, LENGTH > &rhs) const
 
Vector< T, LENGTH > operator% (const Vector< T, LENGTH > &rhs) const
 
const Vector< T, LENGTH > operator- () const
 
void set (ARGS...argList)
 
void set (const Vector< T, LENGTH > &vec)
 
const Vector< T, LENGTH > normal () const
 
const T squaredLength () const
 
const T magnitude () const
 
const T length () const
 
Vector< T, LENGTH > getScale ()
 
void scale (const Vector< T, LENGTH > &vec)
 
void translate (const Vector< T, LENGTH > &vec)
 
void rotate (T angle, const Vector< T, 3 > &vec)
 
Vector< T, LENGTH > & normalize ()
 
void print () const
 

Static Public Attributes

static const Quaternion< Tidentity = { ( T )0, ( T )0, ( T )0, ( T )1 }
 

Additional Inherited Members

- Static Public Member Functions inherited from Vector< T, 4 >
static size_t size ()
 
- Public Attributes inherited from Vector< T, 4 >
T m [LENGTH]
 

Constructor & Destructor Documentation

◆ Quaternion() [1/5]

template<typename T >
Quaternion< T >::Quaternion ( )
inline

◆ Quaternion() [2/5]

template<typename T >
Quaternion< T >::Quaternion ( T a,
T b,
T c,
T d )
inline

◆ Quaternion() [3/5]

template<typename T >
Quaternion< T >::Quaternion ( const Vector< T, 4 > & other)
inline

◆ Quaternion() [4/5]

template<typename T >
Quaternion< T >::Quaternion ( T array[])
inline

◆ Quaternion() [5/5]

template<typename T >
template<typename U >
Quaternion< T >::Quaternion ( const Initializer< U > & list)
inline

Member Function Documentation

◆ conjugate()

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

◆ invert()

template<typename T >
void Quaternion< T >::invert ( )
inline

◆ operator*()

template<typename T >
Quaternion Quaternion< T >::operator* ( const Quaternion< T > & other) const
inline

Member Data Documentation

◆ identity

template<typename T >
const Quaternion< T > Quaternion< T >::identity = { ( T )0, ( T )0, ( T )0, ( T )1 }
static

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