DubiousEngine  0.2.0
Simple Game Engine
Dubious::Math::QuaternionT< T > Class Template Reference

Quaternion. More...

#include <Quaternion.h>

Public Member Functions

 QuaternionT ()=default
 Default Constructor. More...
 
 QuaternionT (float w, const VectorT< T > &v)
 Constructor. More...
 
float w () const
 real accessor More...
 
const VectorT< T > & v () const
 imaginary accessor More...
 

Detailed Description

template<int T>
class Dubious::Math::QuaternionT< T >

Quaternion.

Everyone's favorite 4 dimensional, completely mysterious mathmatical construct. While a Unit Quaternion is useful for handling rotations in 3D, the humble non-Unit version appears in the middle of equations that have Unit Quaternions on each end. Rather then have a Unit Quaternion that was sometimes not, I decided to make a specific instance of this. It's mostly the basic math as described all over the web (sometimes correctly).

Here are some resources I found useful in understanding Quaternions https://www.youtube.com/watch?v=mHVwd8gYLnI https://www.3dgep.com/understanding-quaternions/

Constructor & Destructor Documentation

template<int T>
Dubious::Math::QuaternionT< T >::QuaternionT ( )
default

Default Constructor.

template<int T>
Dubious::Math::QuaternionT< T >::QuaternionT ( float  w,
const VectorT< T > &  v 
)
inline

Constructor.

Made from constituent parts

Parameters
w- [in] the real component
v- [in] the imaginary component

Member Function Documentation

template<int T>
const VectorT<T>& Dubious::Math::QuaternionT< T >::v ( ) const
inline

imaginary accessor

template<int T>
float Dubious::Math::QuaternionT< T >::w ( ) const
inline

real accessor


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