golib  0.5
goQuaternion< T > Class Template Reference

Quaternion class. More...

#include <goquaternion.h>

Public Member Functions

 goQuaternion ()
 Constructor.
 
 ~goQuaternion ()
 Destructor.
 
void operator= (const goQuaternion< T > &other)
 Deep copy. More...
 
void setRotation (T angle, const goMath::Vector< T > &axis)
 
void setRotation (T angle, const go3Vector< T > &axis)
 
getRotationAngle () const
 
void getRotationMatrix (T *matrix44) const
 Column-wise. More...
 
goQuaternion< T > operator* (const goQuaternion< T > &other) const
 Quaternion multiplication. More...
 
goQuaternion< T > operator+ (const goQuaternion< T > &other) const
 Quaternion addition. More...
 
void conjugate ()
 Conjugate this quaternion.
 

Public Attributes

go3Vector< T > v
 
scalar
 

Detailed Description

template<class T>
class goQuaternion< T >

Quaternion class.

Member Function Documentation

◆ getRotationMatrix()

template<class T>
void goQuaternion< T >::getRotationMatrix ( T *  matrix44) const

Column-wise.

Parameters
matrix44
See also
http://www.cprogramming.com/tutorial/3d/quaternions.html

◆ operator*()

template<class T>
goQuaternion< T > goQuaternion< T >::operator* ( const goQuaternion< T > &  other) const

Quaternion multiplication.

Calculates this * other.

Parameters
otherRight-hand operand
Returns
this * other

◆ operator+()

template<class T>
goQuaternion< T > goQuaternion< T >::operator+ ( const goQuaternion< T > &  other) const

Quaternion addition.

Parameters
otherRight-hand operator
Returns
this + other

◆ operator=()

template<class T>
void goQuaternion< T >::operator= ( const goQuaternion< T > &  other)

Deep copy.

Parameters
otherObject to be copied.

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