Quat

A 4-dimensional vector representing a rotation.

The vector represents a 4 dimensional complex number where multiplication of the basis elements is not commutative (multiplying i with j gives a different result than multiplying j with i).

Multiplying quaternions reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues.

It can be used to perform SLERP (spherical-linear interpolation) between two rotations.

Constructors

this
this(real_t p_x, real_t p_y, real_t p_z, real_t p_w)
Undocumented in source.
this
this(Vector3 axis, real_t angle)
Undocumented in source.
this
this(Vector3 v0, Vector3 v1)
Undocumented in source.

Members

Functions

cubicSlerp
Quat cubicSlerp(Quat q, Quat prep, Quat postq, real_t t)
Undocumented in source. Be warned that the author may not have intended to support it.
dot
real_t dot(Quat q)
Undocumented in source. Be warned that the author may not have intended to support it.
getAxisAndAngle
void getAxisAndAngle(Vector3 r_axis, real_t r_angle)
Undocumented in source. Be warned that the author may not have intended to support it.
getEuler
Vector3 getEuler()
Undocumented in source. Be warned that the author may not have intended to support it.
inverse
Quat inverse()
Undocumented in source. Be warned that the author may not have intended to support it.
length
real_t length()
Undocumented in source. Be warned that the author may not have intended to support it.
lengthSquared
real_t lengthSquared()
Undocumented in source. Be warned that the author may not have intended to support it.
normalize
void normalize()
Undocumented in source. Be warned that the author may not have intended to support it.
normalized
Quat normalized()
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Quat opBinary(Vector3 v)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Quat opBinary(Quat q2)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Quat opBinary(Quat q2)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Quat opBinary(real_t s)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Quat opBinary(Quat q2)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Quat opBinary(real_t s)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Quat q)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Quat q)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(Quat q)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(real_t s)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
void opOpAssign(real_t s)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
Quat opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
set
void set(real_t p_x, real_t p_y, real_t p_z, real_t p_w)
Undocumented in source. Be warned that the author may not have intended to support it.
setEuler
void setEuler(Vector3 p_euler)
Undocumented in source. Be warned that the author may not have intended to support it.
slerp
Quat slerp(Quat q, real_t t)
Undocumented in source. Be warned that the author may not have intended to support it.
slerpni
Quat slerpni(Quat q, real_t t)
Undocumented in source. Be warned that the author may not have intended to support it.
xform
Vector3 xform(Vector3 v)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

w
real_t w;
Undocumented in source.
x
real_t x;
Undocumented in source.
y
real_t y;
Undocumented in source.
z
real_t z;
Undocumented in source.

Meta