Workspace 6.21.5
Public Member Functions | Public Attributes | List of all members
Quaternion Class Reference

Quaternion class for handling spherical interpolation.

#include <Rendering/SceneComponents/Interaction/sphericalmatrixflyto.h>

Public Member Functions

 Quaternion ()
 
 Quaternion (const Mesh::TransformMatrix &m)
 
 Quaternion (double qx, double qy, double qz, double qw)
 
Quaternion inverse () const
 
Quaternion negate () const
 
Quaternion operator* (const Quaternion &q) const
 
Mesh::TransformMatrix toMatrix () const
 

Public Attributes

double w
 
double x
 
double y
 
double z
 

Constructor & Destructor Documentation

◆ Quaternion() [1/3]

Constructs a zero (null) quaternion.

◆ Quaternion() [2/3]

Quaternion ( double  qx,
double  qy,
double  qz,
double  qw 
)

◆ Quaternion() [3/3]

Parameters
mTransform matrix to construct the quaternion from.

Constructs a quaternion from a transform matrix. Discards the translation component.

Member Function Documentation

◆ inverse()

Quaternion inverse ( ) const

Assumes a unit quaternion, so inverse == conjugate.

◆ negate()

Quaternion negate ( ) const

Negating all four components represents exactly the same orientation, but is useful for interpolation to help us take the 'short path' rather than the 'long path'

◆ operator*()

Quaternion operator* ( const Quaternion q) const

◆ toMatrix()

Mesh::TransformMatrix toMatrix ( ) const

Member Data Documentation

◆ w

double w

◆ x

double x

◆ y

double y

◆ z

double z