#include <Quaternion.h>
Collaboration diagram for OpenCAL::Utils::Quaternion:

Public Member Functions | |
| Quaternion (float scalar, const Vector3 &vector) | |
| float | getScalar () const |
| const Vector3 & | getVector () const |
| void | setScalar (float scalar) |
| void | setVector (const Vector3 &vector) |
| Quaternion | operator+ (const Quaternion &q) const |
| Quaternion addition. | |
| Quaternion | operator- (const Quaternion &q) const |
| Quaternion substraction. | |
| Quaternion | operator * (const Quaternion &q) const |
| Quaternion multiplication. | |
| Quaternion | operator * (const Vector3 &v) const |
| Vector multiplication. | |
| Quaternion | operator * (float factor) const |
| Scalar product. | |
| Quaternion | operator/ (float factor) const |
| Scalar division. | |
| void | operator+= (const Quaternion &q) |
| void | operator-= (const Quaternion &q) |
| void | operator *= (const Quaternion &q) |
| void | operator *= (const Vector3 &v) |
| void | operator *= (float factor) |
| void | operator/= (float factor) |
| Quaternion | operator- () const |
| Negation. | |
| bool | operator== (const Quaternion &q) const |
| Equality. | |
| bool | operator!= (const Quaternion &q) const |
| Inequality. | |
| operator Matrix33 () const | |
| float | magnitude () const |
| float | magnitudeSquared () const |
| void | inverse () |
| Quaternion | inversed () const |
| void | inversed (Quaternion *q) const |
| void | normalize () |
| Quaternion | normalized () const |
| void | normalized (Quaternion *q) const |
| float | dotProduct (const Quaternion &q) const |
| void | slerp (float u, const Quaternion &dest) |
| void | slerp (float u, const Quaternion &source, const Quaternion &dest) |
| Quaternion | slerped (float u, const Quaternion &dest) const |
| Quaternion | slerped (float u, const Quaternion &source, const Quaternion &dest) const |
| Quaternion | blended (float u, const Quaternion &dest) const |
| void | fromAxisAngle (const Vector3 &axis, float degrees) |
| void | toAxisAngle (Vector3 *axis, float *degrees) const |
| void | fromEulerAngle (float rotX, float rotY, float rotZ) |
| void | fromEulerAngle (const Vector3 &rot) |
| Vector3 | toEulerAngle () const |
| void | toEulerAngle (float *rotX, float *rotY, float *rotZ) const |
| void | toEulerAngle (Vector3 *rot) const |
| void | fromMatrix33 (const Matrix33 &matrix) |
| Matrix33 | toMatrix33 () const |
| void | toMatrix33 (Matrix33 *matrix) const |
| void | print () const |
Static Public Member Functions | |
| Quaternion | createFromAxisAngle (const Vector3 &axis, float degrees) |
Static Public Attributes | |
| const Quaternion | identity |
Protected Attributes | |
| float | m_scalar |
| Vector3 | m_vector |
Friends | |
| Quaternion | operator * (const Vector3 &v, const Quaternion &q) |
| Quaternion | operator * (float factor, const Quaternion &q) |
| Quaternion | operator/ (float factor, const Quaternion &q) |
| std::ostream & | operator<< (std::ostream &stream, const Quaternion &q) |
Definition at line 27 of file Quaternion.h.
|
||||||||||||
|
A quaternion q, composed from rotating
Definition at line 349 of file Quaternion.cpp. |
|
|
The inverse of a quaternion,
Definition at line 225 of file Quaternion.cpp. |
|
|
References setScalar(), and setVector(). Here is the call graph for this function: ![]() |
|
|
|
|
|
The magnitude of a quaternion: References OpenCAL::Utils::Vector3::getX(), OpenCAL::Utils::Vector3::getY(), and OpenCAL::Utils::Vector3::getZ(). Referenced by normalize(). Here is the call graph for this function: ![]() |
|
|
Normalizing a quaternion makes it a unit quaternion (length = 1) Normalizing is done by dividing each part by the magnitude: References magnitude(). Here is the call graph for this function: ![]() |
|
|
Quaternion multiplication. Quaternion multiplication:
Quaternion multiplication is associative: References OpenCAL::Utils::Vector3::crossProduct(), OpenCAL::Utils::Vector3::dotProduct(), m_scalar, and m_vector. Referenced by operator *(). Here is the call graph for this function: ![]() |
|
|
Quaternion addition.
Quaternion addition: |
|
||||||||||||||||
|
Slerping produces linear interpolation between unit quaternions.
References dotProduct(). Here is the call graph for this function: ![]() |
|
|
Definition at line 433 of file Quaternion.cpp. |
|
||||||||||||||||
|
Definition at line 427 of file Quaternion.cpp. |
|
|
Definition at line 421 of file Quaternion.cpp. |
|
|
I've got this from the Baraff and Witkin's siggraph course about physically based modelling, page G23 Definition at line 469 of file Quaternion.cpp. References OpenCAL::Utils::Vector3::getX(), OpenCAL::Utils::Vector3::getY(), OpenCAL::Utils::Vector3::getZ(), OpenCAL::Utils::Matrix33::identity(), and OpenCAL::Utils::Matrix33::set(). Here is the call graph for this function: ![]() |
1.3.8