0.45.0
![]() |
#include <iaQuaternion.h>
Public Member Functions | |
iaQuaternion () | |
iaQuaternion (T w, T x, T y, T z) | |
iaQuaternion (T x, T y, T z) | |
iaQuaternion (const iaQuaternion< T > &other) | |
void | toAxisAngle (iaVector3< T > &axis, T &angle) const |
void | set (T w, T x, T y, T z) |
void | identity () |
void | negate () |
const iaVector3< T > | toEuler () const |
const iaMatrix< T > | toMatrix () const |
iaQuaternion< T > & | operator= (const iaQuaternion< T > &other) |
bool | operator== (const iaQuaternion< T > &other) const |
bool | operator!= (const iaQuaternion< T > &other) const |
const iaQuaternion< T > | operator+ (const iaQuaternion< T > &other) |
iaQuaternion< T > & | operator+= (const iaQuaternion< T > &other) |
const iaQuaternion< T > | operator- (const iaQuaternion< T > &other) |
iaQuaternion< T > & | operator-= (const iaQuaternion< T > &other) |
const iaQuaternion< T > | operator* (const iaQuaternion< T > &other) const |
iaQuaternion< T > & | operator*= (const iaQuaternion< T > &other) |
const iaQuaternion< T > | operator* (T scalar) |
iaQuaternion< T > & | operator*= (T scalar) |
const iaQuaternion< T > | inverse () const |
const iaVector3< T > | rotate (const iaVector3< T > &vec) const |
const iaQuaternion< T > | normalize () const |
T | dot (const iaQuaternion< T > &other) const |
T | norm () const |
T | normSquared () const |
const iaQuaternion< T > | conjugate () const |
T | magnitude2 () const |
const T * | getData () const |
T * | getData () |
Static Public Member Functions | |
static const iaQuaternion< T > | fromAxisAngle (const iaVector3< T > &axis, T angle) |
static const iaQuaternion< T > | fromEuler (T pitch, T yaw, T roll) |
static const iaQuaternion< T > | fromEuler (const iaVector3< T > &vec) |
Public Attributes | |
T | _w = 1.0 |
T | _x = 0.0 |
T | _y = 0.0 |
T | _z = 0.0 |
quaternion class
x-axis -> pitch y-axis -> yaw z-axis -> roll
iaQuaternion::iaQuaternion | ( | ) |
iaQuaternion::iaQuaternion | ( | T | w, |
T | x, | ||
T | y, | ||
T | z | ||
) |
ctor by direct values
w | the w component |
x | the x component |
y | the y component |
z | the z component |
iaQuaternion::iaQuaternion | ( | T | x, |
T | y, | ||
T | z | ||
) |
ctor by direct values
x | the x component |
y | the y component |
z | the z component |
iaQuaternion::iaQuaternion | ( | const iaQuaternion< T > & | other | ) |
init with other quaternion
other | the other quaternion |
const iaQuaternion< T > iaQuaternion::conjugate | ( | ) | const |
T iaQuaternion::dot | ( | const iaQuaternion< T > & | other | ) | const |
dot product
|
static |
set by axis angle
axis | the axis to rotate around |
angle | the angle to rotate |
|
static |
set by euler angles
vector will be interpreted as pitch, yaw, roll
using order XYZ or pitch,yaw,roll
vec | vector that contains euler angles |
|
static |
set by euler angles
using order XYZ or pitch,yaw,roll
pitch | rotation around x axis in rad |
yaw | rotation around y axis in rad |
roll | rotation around z axis in rad |
IGOR_INLINE T * iaQuaternion::getData | ( | ) |
IGOR_INLINE const T * iaQuaternion::getData | ( | ) | const |
void iaQuaternion::identity | ( | ) |
reset quaternion to identity
const iaQuaternion< T > iaQuaternion::inverse | ( | ) | const |
T iaQuaternion::magnitude2 | ( | ) | const |
void iaQuaternion::negate | ( | ) |
negate quaternion
IGOR_INLINE T iaQuaternion::norm | ( | ) | const |
IGOR_INLINE const iaQuaternion< T > iaQuaternion::normalize | ( | ) | const |
T iaQuaternion::normSquared | ( | ) | const |
bool iaQuaternion::operator!= | ( | const iaQuaternion< T > & | other | ) | const |
other | the right hand side quaternion |
const iaQuaternion< T > iaQuaternion::operator* | ( | const iaQuaternion< T > & | other | ) | const |
multiply one quaternion to this quaternion
other | the right hand side quaternion |
const iaQuaternion< T > iaQuaternion::operator* | ( | T | scalar | ) |
multiply quaternion with scalar
scalar | right hand side the scalar value |
iaQuaternion< T > & iaQuaternion::operator*= | ( | const iaQuaternion< T > & | other | ) |
multiply one quaternion with an other one
other | the right hand side quaternion |
iaQuaternion< T > & iaQuaternion::operator*= | ( | T | scalar | ) |
multiplies quaternion with scalar
scalar | right hand side scalar value |
const iaQuaternion< T > iaQuaternion::operator+ | ( | const iaQuaternion< T > & | other | ) |
add one quaternion to an other
other | the right hand side quaternion |
iaQuaternion< T > & iaQuaternion::operator+= | ( | const iaQuaternion< T > & | other | ) |
add one quaternion to this quaternion
other | the right hand side quaternion |
const iaQuaternion< T > iaQuaternion::operator- | ( | const iaQuaternion< T > & | other | ) |
subtracts one quaternion from an other
other | the right hand side quaternion |
iaQuaternion< T > & iaQuaternion::operator-= | ( | const iaQuaternion< T > & | other | ) |
subtracts one quaternion from the other
other | the right hand side quaternion |
iaQuaternion< T > & iaQuaternion::operator= | ( | const iaQuaternion< T > & | other | ) |
other | the right hand side quaternion |
bool iaQuaternion::operator== | ( | const iaQuaternion< T > & | other | ) | const |
other | the right hand side quaternion |
rotates a given vector
vec | the given vector |
void iaQuaternion::set | ( | T | w, |
T | x, | ||
T | y, | ||
T | z | ||
) |
set by direct value
x | the x component |
y | the y component |
z | the z component |
w | the w component |
void iaQuaternion::toAxisAngle | ( | iaVector3< T > & | axis, |
T & | angle | ||
) | const |
returns axis angle from quaternion
axis[out] | the rotation axis |
angle[out] | the rotation angle |
const iaVector3< T > iaQuaternion::toEuler | ( | ) | const |
!!! terrible percision don't use unless you have to !!!
const iaMatrix< T > iaQuaternion::toMatrix | ( | ) | const |
T iaux::iaQuaternion< T >::_w = 1.0 |
w component
T iaux::iaQuaternion< T >::_x = 0.0 |
x component
T iaux::iaQuaternion< T >::_y = 0.0 |
y component
T iaux::iaQuaternion< T >::_z = 0.0 |
z component