SCL
1.0
Standard Control Library : Control, dynamics, physics, and simulation
|
Quaternion classThis is a C++ wrapper class of deQuaternionf. More...
#include <TaoDeQuaternion.h>
Public Member Functions | |
deQuaternion () | |
deQuaternion (deFloat qx, deFloat qy, deFloat qz, deFloat qw) | |
deQuaternion (deQuaternion const &orig) | |
operator deFloat * () | |
cast operator More... | |
operator const deFloat * () const | |
cast operator More... | |
deFloat & | operator[] (const deInt i) |
const deFloat & | operator[] (const deInt i) const |
DE_MATH_API void | operator= (const deQuaternion &q) |
this = q More... | |
DE_MATH_API deInt | operator== (const deQuaternion &q) |
DE_MATH_API void | operator+= (const deQuaternion &q) |
this[i] += q[i] More... | |
DE_MATH_API void | operator-= (const deQuaternion &q) |
this[i] -= q[i] More... | |
DE_MATH_API void | operator*= (const deFloat s) |
this[i] *= s More... | |
DE_MATH_API void | identity () |
this = (0, 0, 0, 1) More... | |
DE_MATH_API void | zero () |
this = (0, 0, 0, 0) More... | |
DE_MATH_API deFloat | dot (const deQuaternion &q) |
return this^T * q More... | |
DE_MATH_API void | normalize () |
this[i] *= (1 / sqrt(this^T * this)) More... | |
DE_MATH_API void | get (deVector3 &axis, deFloat &angle) const |
convert to axis-angle notation More... | |
DE_MATH_API void | set (const deMatrix3 &m) |
this = m More... | |
DE_MATH_API void | set (const deInt axis, const deFloat angle) |
this = (axis, angle) More... | |
DE_MATH_API void | set (const deVector3 &axis, const deFloat angle) |
this = (axis, angle) More... | |
DE_MATH_API void | set (const deFloat x, const deFloat y, const deFloat z, const deFloat w) |
this = (x, y, z, q) More... | |
DE_MATH_API void | set (const deFloat *q) |
this = [x y z q] More... | |
DE_MATH_API void | eulerZYX (const deVector3 &v) |
this = [x, y, z] = ZYX Euler angles More... | |
DE_MATH_API void | negate (const deQuaternion &q) |
this = -q More... | |
DE_MATH_API void | inverse (const deQuaternion &q) |
this = q^-1 More... | |
DE_MATH_API void | add (const deQuaternion &q1, const deQuaternion &q2) |
this = q1 + q2 More... | |
DE_MATH_API void | subtract (const deQuaternion &q1, const deQuaternion &q2) |
this = q1 - q2 More... | |
DE_MATH_API void | multiply (const deQuaternion &q1, const deQuaternion &q2) |
this = q1 * q2 More... | |
DE_MATH_API void | inversedMultiply (const deQuaternion &q1, const deQuaternion &q2) |
this = q1^-1 * q2 More... | |
DE_MATH_API void | multiplyInversed (const deQuaternion &q1, const deQuaternion &q2) |
this = q1 * q2^-1 More... | |
DE_MATH_API void | velocity (const deQuaternion &q, const deVector3 &omega) |
this = dq More... | |
DE_MATH_API void | consistentSign (const deQuaternion &q, const deQuaternion &qg) |
this = converted qg sign consitent to q More... | |
DE_MATH_API void | slerp (const deQuaternion &q, const deQuaternion &qg, const deFloat t, const deFloat addedSpins) |
this = SLERP (spherical linear interpolation with extra spins) More... | |
DE_MATH_API void | lerp (const deQuaternion &q, const deQuaternion &qg, const deFloat t) |
this = q + t * (qg - q) More... | |
Private Attributes | |
deFloat | _data [DE_QUATERNION_SIZE] |
Quaternion class
This is a C++ wrapper class of deQuaternionf.
|
inline |
Default ctor calls identity() on itself.
|
inline |
Initialization from the four quaternion values.
DE_MATH_API void deQuaternion::add | ( | const deQuaternion & | q1, |
const deQuaternion & | q2 | ||
) |
this = q1 + q2
DE_MATH_API void deQuaternion::consistentSign | ( | const deQuaternion & | q, |
const deQuaternion & | qg | ||
) |
this = converted qg sign consitent to q
DE_MATH_API deFloat deQuaternion::dot | ( | const deQuaternion & | q | ) |
return this^T * q
DE_MATH_API void deQuaternion::eulerZYX | ( | const deVector3 & | v | ) |
this = [x, y, z] = ZYX Euler angles
DE_MATH_API void deQuaternion::get | ( | deVector3 & | axis, |
deFloat & | angle | ||
) | const |
convert to axis-angle notation
DE_MATH_API void deQuaternion::identity | ( | ) |
this = (0, 0, 0, 1)
DE_MATH_API void deQuaternion::inverse | ( | const deQuaternion & | q | ) |
this = q^-1
DE_MATH_API void deQuaternion::inversedMultiply | ( | const deQuaternion & | q1, |
const deQuaternion & | q2 | ||
) |
this = q1^-1 * q2
DE_MATH_API void deQuaternion::lerp | ( | const deQuaternion & | q, |
const deQuaternion & | qg, | ||
const deFloat | t | ||
) |
this = q + t * (qg - q)
DE_MATH_API void deQuaternion::multiply | ( | const deQuaternion & | q1, |
const deQuaternion & | q2 | ||
) |
this = q1 * q2
DE_MATH_API void deQuaternion::multiplyInversed | ( | const deQuaternion & | q1, |
const deQuaternion & | q2 | ||
) |
this = q1 * q2^-1
DE_MATH_API void deQuaternion::negate | ( | const deQuaternion & | q | ) |
this = -q
DE_MATH_API void deQuaternion::normalize | ( | ) |
this[i] *= (1 / sqrt(this^T * this))
|
inline |
cast operator
|
inline |
cast operator
DE_MATH_API void deQuaternion::operator*= | ( | const deFloat | s | ) |
this[i] *= s
DE_MATH_API void deQuaternion::operator+= | ( | const deQuaternion & | q | ) |
this[i] += q[i]
DE_MATH_API void deQuaternion::operator-= | ( | const deQuaternion & | q | ) |
this[i] -= q[i]
DE_MATH_API void deQuaternion::operator= | ( | const deQuaternion & | q | ) |
this = q
DE_MATH_API deInt deQuaternion::operator== | ( | const deQuaternion & | q | ) |
|
inline |
|
inline |
DE_MATH_API void deQuaternion::set | ( | const deMatrix3 & | m | ) |
this = m
DE_MATH_API void deQuaternion::set | ( | const deInt | axis, |
const deFloat | angle | ||
) |
this = (axis, angle)
DE_MATH_API void deQuaternion::set | ( | const deVector3 & | axis, |
const deFloat | angle | ||
) |
this = (axis, angle)
DE_MATH_API void deQuaternion::set | ( | const deFloat | x, |
const deFloat | y, | ||
const deFloat | z, | ||
const deFloat | w | ||
) |
this = (x, y, z, q)
DE_MATH_API void deQuaternion::set | ( | const deFloat * | q | ) |
this = [x y z q]
DE_MATH_API void deQuaternion::slerp | ( | const deQuaternion & | q, |
const deQuaternion & | qg, | ||
const deFloat | t, | ||
const deFloat | addedSpins | ||
) |
this = SLERP (spherical linear interpolation with extra spins)
DE_MATH_API void deQuaternion::subtract | ( | const deQuaternion & | q1, |
const deQuaternion & | q2 | ||
) |
this = q1 - q2
DE_MATH_API void deQuaternion::velocity | ( | const deQuaternion & | q, |
const deVector3 & | omega | ||
) |
this = dq
DE_MATH_API void deQuaternion::zero | ( | ) |
this = (0, 0, 0, 0)