This is the documentation for Enlighten.

module Quaternions

Functions

Name Description
MConstructQuaternion(Quat)

Construct a matrix from a quaternion.

QApplyToVec(Quat, v128)

Assumes q is unit.

QBuildFromEulerAngles(float, float, float)

Converts quaternion into euler angles in XYZ order, stored in those components.

QBuildMatrix(MatrixParam)

Construct a matrix from a quaternion.

QClosestSlerp(Quat, Quat, v128)

Flips inputs to be on the same hyper-hemisphere. Use QFullSlerp if desired.

QConjugate(Quat)

q* = -xyz, +w

QFullSlerp(Quat, Quat, v128)

Does not flip inputs to be on the same hyper-hemisphere. Use QClosestSlerp if desired.

QIdentity()

q* = -xyz, +w

QLerp(Quat, Quat, v128)

Assumes a and b are unit.

QMul(Quat, Quat)

quat multiply.

QSqrt(Quat)

Assumes q is unit.

VEulerAnglesFromQuaternion(Quat)

Converts quaternion into euler angles in XYZ order, stored in those components.

Typedefs

Name Description
v128 Quat

Quaternion definition.


Matrix Geo::MConstructQuaternion


public: Matrix MConstructQuaternion
(
    Quat q
)


Construct a matrix from a quaternion.


v128 Geo::QApplyToVec


public: v128 QApplyToVec
(
    Quat q,
    v128 v
)


Assumes q is unit.


Quat Geo::QBuildFromEulerAngles


public: Quat QBuildFromEulerAngles
(
    float x,
    float y,
    float z
)


Converts quaternion into euler angles in XYZ order, stored in those components.


Quat Geo::QBuildMatrix


public: Quat QBuildMatrix
(
    MatrixParam m
)


Construct a matrix from a quaternion.


Quat Geo::QClosestSlerp


public: Quat QClosestSlerp
(
    Quat a,
    Quat b,
    v128 s
)


Flips inputs to be on the same hyper-hemisphere. Use QFullSlerp if desired.


Quat Geo::QConjugate


public: Quat QConjugate
(
    Quat q
)


q* = -xyz, +w


Quat Geo::QFullSlerp


public: Quat QFullSlerp
(
    Quat a,
    Quat b,
    v128 s
)


Does not flip inputs to be on the same hyper-hemisphere. Use QClosestSlerp if desired.


Quat Geo::QIdentity


public: Quat QIdentity()


q* = -xyz, +w


Quat Geo::QLerp


public: Quat QLerp
(
    Quat a,
    Quat b,
    v128 s
)


Assumes a and b are unit.


Quat Geo::QMul


public: Quat QMul
(
    Quat a,
    Quat b
)


quat multiply.


Quat Geo::QSqrt


public: Quat QSqrt
(
    Quat q
)


Assumes q is unit.


v128 Geo::VEulerAnglesFromQuaternion


public: v128 VEulerAnglesFromQuaternion
(
    Quat q
)


Converts quaternion into euler angles in XYZ order, stored in those components.