Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <quat.hpp>
Public Member Functions | |
| quat () | |
| quat (const vec4 &v) | |
| quat (Real x, Real y, Real z, Real w) | |
| quat (Real degrees, const vec3 &axis) | |
| bool | operator== (const quat &q) const |
| bool | operator!= (const quat &q) const |
| bool | operator< (const vec4 &v) const |
| lexicographic ordering | |
| quat & | setZero () |
| quat & | setNoRotation () |
| quat & | fromVectors (const vec4 &from, const vec4 &to) |
| quat & | fromVectors (const vec3 &from, const vec3 &to) |
| quat & | fromMatrix (const mat4 &m) |
| Creates a quaternion representing the given rotation matrix. | |
| quat & | fromEulerXYZ (Real degX, Real degY, Real degZ) |
| quat & | fromEulerZYX (Real degZ, Real degY, Real degX) |
| quat & | fromAxisAngle (Real degrees, const vec3 &axis) |
| void | toAxisAngle (vec4 &axis, Real &angle) const |
| Expects a unit length quaternion. | |
| mat4 | toMatrix () const |
| Expects a unit length quaternion. | |
| const vec4 & | xyzw () const |
| vec4 & | xyzw () |
| Real & | x () |
| Real & | y () |
| Real & | z () |
| Real & | w () |
| const Real & | x () const |
| const Real & | y () const |
| const Real & | z () const |
| const Real & | w () const |
| quat | operator* (Real real) const |
| quat & | operator*= (Real real) |
| quat | operator/ (Real real) const |
| quat & | operator/= (Real real) |
| quat | operator+ (const quat &q) const |
| quat & | operator+= (const quat &q) |
| quat | operator- (const quat &q) const |
| quat & | operator-= (const quat &q) |
| quat | operator- () const |
| Real | dot (const quat &q) const |
| Real | length () const |
| const quat & | normalize () |
| quat | getNormalized () const |
| Real | lengthSquared () const |
| quat | conjugate () const |
| quat | inverse () const |
| quat | slerp (Real t, const quat &a, const quat &b) const |
| Spherical linear interpolation of two quaternions. | |
| quat | squad (Real t, const quat &a, const quat &p, const quat &q, const quat &b) const |
| Spherical cubic interpolation of two quaternions. | |
| quat | nlerp (Real t, const quat &a, const quat &b) const |
| Normalized spherical interpolation of two quaternions. | |
Protected Attributes | |
| vec4 | mXYZW |
| vl::quat::quat | ( | ) | [inline] |
| vl::quat::quat | ( | const vec4 & | v | ) | [inline, explicit] |
| bool vl::quat::operator== | ( | const quat & | q | ) | const [inline] |
| bool vl::quat::operator!= | ( | const quat & | q | ) | const [inline] |
| bool vl::quat::operator< | ( | const vec4 & | v | ) | const [inline] |
lexicographic ordering
| quat& vl::quat::setZero | ( | ) | [inline] |
| quat& vl::quat::setNoRotation | ( | ) | [inline] |
Creates a quaternion representing the given rotation matrix.
see also http://www.gamasutra.com/features/19980703/quaternions_01.htm
| mat4 quat::toMatrix | ( | ) | const |
Expects a unit length quaternion.
| const vec4& vl::quat::xyzw | ( | ) | const [inline] |
| vec4& vl::quat::xyzw | ( | ) | [inline] |
| Real& vl::quat::x | ( | ) | [inline] |
| Real& vl::quat::y | ( | ) | [inline] |
| Real& vl::quat::z | ( | ) | [inline] |
| Real& vl::quat::w | ( | ) | [inline] |
| const Real& vl::quat::x | ( | ) | const [inline] |
| const Real& vl::quat::y | ( | ) | const [inline] |
| const Real& vl::quat::z | ( | ) | const [inline] |
| const Real& vl::quat::w | ( | ) | const [inline] |
| quat vl::quat::operator- | ( | ) | const [inline] |
| Real vl::quat::length | ( | ) | const [inline] |
| const quat& vl::quat::normalize | ( | ) | [inline] |
| quat vl::quat::getNormalized | ( | ) | const [inline] |
| Real vl::quat::lengthSquared | ( | ) | const [inline] |
| quat vl::quat::conjugate | ( | ) | const [inline] |
| quat vl::quat::inverse | ( | ) | const [inline] |
Spherical linear interpolation of two quaternions.
See also http://www.gamasutra.com/features/19980703/quaternions_01.htm
Properties: NO commutative, YES torque-minimal, YES constant velocity.
| quat vl::quat::squad | ( | Real | t, | |
| const quat & | a, | |||
| const quat & | p, | |||
| const quat & | q, | |||
| const quat & | b | |||
| ) | const [inline] |
Spherical cubic interpolation of two quaternions.
Normalized spherical interpolation of two quaternions.
See also http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/
Properties: YES commutative, YES torque-minimal, NO constant velocity.
vec4 vl::quat::mXYZW [protected] |