Quaternion

Quaternion implementation. Holds a rotation + angle in a proper but wild space.

Constructors

this
this(U x)

Construct a Quaternion from a value.

Members

Functions

inverse
void inverse()

Inverse a quaternion.

inversed
Quaternion inversed()
normalize
void normalize()

Normalizes a quaternion.

normalized
Quaternion normalized()
opAssign
Quaternion opAssign(U u)

Assign from another Quaternion.

opAssign
Quaternion opAssign(U u)

Assign from a vector of 4 elements.

opBinary
Quaternion opBinary(U operand)
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
U opCast()

Convert to a 3x3 rotation matrix. TODO: check out why we can't do is(Unqual!U == mat3!T)

opCast
U opCast()

Converts a to a 4x4 rotation matrix.

opEquals
bool opEquals(U other)

Compare two Quaternions.

opEquals
bool opEquals(U other)

Compare Quaternion and other types.

opOpAssign
Quaternion opOpAssign(U q)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
Quaternion opOpAssign(U operand)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()

Converts to a pretty string.

Static functions

IDENTITY
Quaternion IDENTITY()
Undocumented in source. Be warned that the author may not have intended to support it.
fromAxis
Quaternion fromAxis(Vector!(T, 3u) axis, T angle)

Constructs a Quaternion from axis + angle.

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta