dlib.math.quaternion

Quaternions

Members

Aliases

Quaterniond
alias Quaterniond = Quaternion!(double)

Alias for double precision Quaternion

Quaternionf
alias Quaternionf = Quaternion!(float)

Alias for single precision Quaternion

Functions

exp
Quaternion!(T) exp(Quaternion!(T) q)

Quaternion exponential

intermediate
Quaternion!(T) intermediate(Quaternion!(T) qprev, Quaternion!(T) qcurr, Quaternion!(T) qnext, Quaternion!(T) qa, Quaternion!(T) qb)

Compute intermediate quaternions for building spline segments

log
Quaternion!(T) log(Quaternion!(T) q)

Quaternion logarithm

pow
Quaternion!(T) pow(Quaternion!(T) q, T exponent)

Quaternion exponentiation

rotationBetween
Quaternion!(T) rotationBetween(Vector!(T, 3) a, Vector!(T, 3) b)

Setup a quaternion to represent rotation between two unit-length vectors

rotationQuaternion
Quaternion!(T) rotationQuaternion(uint rotaxis, T theta)

Setup a quaternion to rotate about world axis. Theta must be in radians

rotationQuaternion
Quaternion!(T) rotationQuaternion(Vector!(T, 3) rotaxis, T theta)

Setup a quaternion to rotate about specified axis. Theta must be in radians

slerp
Quaternion!(T) slerp(Quaternion!(T) q0, Quaternion!(T) q1, T t)

Spherical linear interpolation

squad
Quaternion!(T) squad(Quaternion!(T) q0, Quaternion!(T) qa, Quaternion!(T) qb, Quaternion!(T) q1, T t)

Spherical cubic interpolation

Structs

Quaternion
struct Quaternion(T)

Quaternion representation

Meta

Authors

Timur Gafarov