iaux::iaQuaternion< T > Class Template Reference

#include <iaQuaternion.h>

Public Member Functions

 iaQuaternion ()
 
 iaQuaternion (const iaVector3< T > &axis, T angle)
 
 iaQuaternion (T x, T y, T z, T w)
 
 iaQuaternion (T x, T y, T z)
 
 iaQuaternion (const iaVector3< T > &vec)
 
void setAxisAngle (const iaVector3< T > &axis, T angle)
 
void getAxisAngle (iaVector3< T > &axis, T &angle) const
 
void set (T x, T y, T z, T w)
 
void identity ()
 
void negate ()
 
void setEuler (T x, T y, T z)
 
void setEuler (const iaVector3< T > &vec)
 
void getEuler (T &x, T &y, T &z) const
 
void getEuler (iaVector3< T > &vec) const
 
bool operator== (const iaQuaternion< T > &rhs) const
 
bool operator!= (const iaQuaternion< T > &rhs) const
 
iaQuaternion< T > operator+ (const iaQuaternion< T > &rhs)
 
void operator+= (const iaQuaternion< T > &rhs)
 
iaQuaternion< T > operator- (const iaQuaternion< T > &rhs)
 
void operator-= (const iaQuaternion< T > &rhs)
 
iaQuaternion< T > operator* (const iaQuaternion< T > &rhs)
 
void operator*= (const iaQuaternion< T > &rhs)
 
iaQuaternion< T > operator* (T rhs)
 
void operator*= (T rhs)
 
void normalize ()
 
const T * getData () const
 
T * getData ()
 

Public Attributes

_x = 0.0
 
_y = 0.0
 
_z = 0.0
 
_w = 1.0
 

Detailed Description

template<class T>
class iaux::iaQuaternion< T >

quaternion class

Constructor & Destructor Documentation

◆ iaQuaternion() [1/5]

template<class T >
iaQuaternion::iaQuaternion ( )

◆ iaQuaternion() [2/5]

template<class T >
iaQuaternion::iaQuaternion ( const iaVector3< T > &  axis,
angle 
)

ctor by axis angle

Parameters
axisthe axis to rotate around
anglethe angle to rotate

◆ iaQuaternion() [3/5]

template<class T >
iaQuaternion::iaQuaternion ( x,
y,
z,
w 
)

ctor by direct values

Parameters
xthe x component
ythe y component
zthe z component
wthe w component

◆ iaQuaternion() [4/5]

template<class T >
iaQuaternion::iaQuaternion ( x,
y,
z 
)

ctor by euler angles

Parameters
xrotation around x axis in rad
yrotation around y axis in rad
zrotation around z axis in rad

◆ iaQuaternion() [5/5]

template<class T >
iaQuaternion::iaQuaternion ( const iaVector3< T > &  vec)

ctor by euler angles

Parameters
vecvector that contains euler angles

Member Function Documentation

◆ getAxisAngle()

template<class T >
void iaQuaternion::getAxisAngle ( iaVector3< T > &  axis,
T &  angle 
) const

returns axis angle from quaternion

Parameters
axis[out]the rotation axis \parma angle[out] the rotation angle

◆ getData() [1/2]

template<class T >
IGOR_INLINE T * iaQuaternion::getData ( )
Returns
pointer to the data

◆ getData() [2/2]

template<class T >
IGOR_INLINE const T * iaQuaternion::getData ( ) const
Returns
pointer to the data

◆ getEuler() [1/2]

template<class T >
void iaQuaternion::getEuler ( iaVector3< T > &  vec) const

returns euler angles

Parameters
vec[out]euler angles in a vector

◆ getEuler() [2/2]

template<class T >
void iaQuaternion::getEuler ( T &  x,
T &  y,
T &  z 
) const

returns euler angles

Parameters
x[out]the rotation arround the x axis
y[out]the rotation arround the y axis
z[out]the rotation arround the z axis

◆ identity()

template<class T >
void iaQuaternion::identity ( )

reset quaternion to identity

◆ negate()

template<class T >
void iaQuaternion::negate ( )

negate quaternion

◆ normalize()

template<class T >
IGOR_INLINE void iaQuaternion::normalize ( )

normalize the quaternion to unit length

◆ operator!=()

template<class T >
bool iaQuaternion::operator!= ( const iaQuaternion< T > &  rhs) const
Returns
true if both quaternions are not equal
Parameters
rhsthe right hand side quaternion

◆ operator*() [1/2]

template<class T >
iaQuaternion< T > iaQuaternion::operator* ( const iaQuaternion< T > &  rhs)

multiply one quaternion to this quaternion

Parameters
rhsthe right hand side quaternion
Returns
the resulting quaternion

◆ operator*() [2/2]

template<class T >
iaQuaternion< T > iaQuaternion::operator* ( rhs)

multiply quaternion with scalar

Parameters
rhsright hand side the scalar value
Returns
resulting quaternion

◆ operator*=() [1/2]

template<class T >
void iaQuaternion::operator*= ( const iaQuaternion< T > &  rhs)

multiply one quaternion with an other one

Parameters
rhsthe right hand side quaternion

◆ operator*=() [2/2]

template<class T >
void iaQuaternion::operator*= ( rhs)

multiplies quaternion with scalar

Parameters
rhsright hand side scalar value

◆ operator+()

template<class T >
iaQuaternion< T > iaQuaternion::operator+ ( const iaQuaternion< T > &  rhs)

add one quaternion to an other

Returns
the resulting quaternion
Parameters
rhsthe right hand side quaternion

◆ operator+=()

template<class T >
void iaQuaternion::operator+= ( const iaQuaternion< T > &  rhs)

add one quaternion to this quaternion

Parameters
rhsthe right hand side quaternion

◆ operator-()

template<class T >
iaQuaternion< T > iaQuaternion::operator- ( const iaQuaternion< T > &  rhs)

subtracts one quaternion from an other

Returns
the resulting quaternion
Parameters
rhsthe right hand side quaternion

◆ operator-=()

template<class T >
void iaQuaternion::operator-= ( const iaQuaternion< T > &  rhs)

subtracts one quaternion from the other

Parameters
rhsthe right hand side quaternion

◆ operator==()

template<class T >
bool iaQuaternion::operator== ( const iaQuaternion< T > &  rhs) const
Returns
true if both quaternions are equal
Parameters
rhsthe right hand side quaternion

◆ set()

template<class T >
void iaQuaternion::set ( x,
y,
z,
w 
)

set by direct value

Parameters
xthe x component
ythe y component
zthe z component
wthe w component

◆ setAxisAngle()

template<class T >
void iaQuaternion::setAxisAngle ( const iaVector3< T > &  axis,
angle 
)

set by axis angle

Parameters
axisthe axis to rotate arround
anglethe angle to rotate

◆ setEuler() [1/2]

template<class T >
void iaQuaternion::setEuler ( const iaVector3< T > &  vec)

set by euler angles

Parameters
vecvector that contains euler angles

◆ setEuler() [2/2]

template<class T >
void iaQuaternion::setEuler ( x,
y,
z 
)

set by euler angles

Parameters
xrotation arround x axis in rad
yrotation arround y axis in rad
zrotation arround z axis in rad

Member Data Documentation

◆ _w

template<class T >
T iaux::iaQuaternion< T >::_w = 1.0

w component

◆ _x

template<class T >
T iaux::iaQuaternion< T >::_x = 0.0

x component

◆ _y

template<class T >
T iaux::iaQuaternion< T >::_y = 0.0

y component

◆ _z

template<class T >
T iaux::iaQuaternion< T >::_z = 0.0

z component


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