Mathematical structure for encoding three-dimensional rotation and orientation. More...
Public Member Functions | |
Quaternion (const MathF::Vector &) | |
Quaternion (float, float, float) | |
Quaternion (float) | |
Quaternion (float, float, float, float) | |
Quaternion (float, const MathF::Vector &) | |
Quaternion () | |
float | s () const |
float | x () const |
float | y () const |
float | z () const |
float | operator[] (int i) const |
float & | operator[] (int i) |
Quaternion | conjugate () const |
Quaternion | inverse () const |
float | norm () const |
Quaternion | operator+ (const Quaternion &) const |
Quaternion | operator* (const Quaternion &) const |
void | encodeR (float, const MathF::Vector &) |
MathF::Vector | rotateV (const MathF::Vector &) const |
Private Attributes | |
float | e [4] |
Friends | |
ostream & | operator<< (ostream &, const Quaternion &) |
Mathematical structure for encoding three-dimensional rotation and orientation.
Math::Quaternion::Quaternion | ( | const MathF::Vector & | v | ) | [inline] |
References e.
Math::Quaternion::Quaternion | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
Math::Quaternion::Quaternion | ( | float | s | ) | [inline] |
Math::Quaternion::Quaternion | ( | float | s, |
float | x, | ||
float | y, | ||
float | z | ||
) | [inline] |
Math::Quaternion::Quaternion | ( | float | s, |
const MathF::Vector & | v | ||
) | [inline] |
Math::Quaternion::Quaternion | ( | ) | [inline] |
References e.
Referenced by conjugate(), inverse(), and operator+().
Quaternion Math::Quaternion::conjugate | ( | ) | const [inline] |
References e, and Quaternion().
Referenced by inverse().
void Math::Quaternion::encodeR | ( | float | theta, |
const MathF::Vector & | axis | ||
) | [inline] |
References Math::Cos(), e, Math::Vector< T >::normal(), and Math::Sin().
Referenced by uiCore::Camera::reset(), and uiCore::Camera::rotateCam().
Quaternion Math::Quaternion::inverse | ( | ) | const [inline] |
References conjugate(), norm(), and Quaternion().
Referenced by uiCore::Camera::reset(), rotateV(), and uiCore::Camera::setLookMode().
float Math::Quaternion::norm | ( | ) | const [inline] |
Quaternion Math::Quaternion::operator* | ( | const Quaternion & | q | ) | const [inline] |
References Math::Cross(), Math::Dot(), and Math::Vector< T >::e.
Quaternion Math::Quaternion::operator+ | ( | const Quaternion & | q | ) | const [inline] |
References e, and Quaternion().
float Math::Quaternion::operator[] | ( | int | i | ) | const [inline] |
References e.
float& Math::Quaternion::operator[] | ( | int | i | ) | [inline] |
References e.
MathF::Vector Math::Quaternion::rotateV | ( | const MathF::Vector & | v | ) | const [inline] |
References inverse(), x(), y(), and z().
Referenced by uiCore::Camera::getEye(), uiCore::Camera::getLook(), uiCore::Camera::getRotPt(), uiCore::Camera::getUp(), uiCore::Camera::moveCam(), uiCore::Camera::reset(), uiCore::Camera::rotateCam(), and uiCore::Camera::setLookMode().
float Math::Quaternion::s | ( | ) | const [inline] |
References e.
Referenced by Quaternion().
float Math::Quaternion::x | ( | ) | const [inline] |
References e.
Referenced by Quaternion(), and rotateV().
float Math::Quaternion::y | ( | ) | const [inline] |
References e.
Referenced by Quaternion(), and rotateV().
float Math::Quaternion::z | ( | ) | const [inline] |
References e.
Referenced by Quaternion(), and rotateV().
ostream& operator<< | ( | ostream & | out, |
const Quaternion & | q | ||
) | [friend] |
float Math::Quaternion::e[4] [private] |
Referenced by conjugate(), encodeR(), norm(), operator+(), Math::operator<<(), operator[](), Quaternion(), s(), x(), y(), and z().