LuaSTG-x Core API
|
Public Member Functions | |
function | __eq (local other) |
function | __mul (local other) |
function | __tostring () |
function | clone () |
function | conjugate () |
function | createFromAxisAngle (local axis, local angle) |
function | createFromRotationMatrix (local mat) |
function | fuzzyEquals (local other, local var) |
function | getConjugated () |
function | getInversed () |
function | getNormalized () |
static function | identity () |
function | inverse () |
function | isIdentity () |
function | isZero () |
function | lerp (local other, local t) |
function | multiply (local other) |
function | normalize () |
function | set (local ...) |
function | setIdentity () |
function | slerp (local other, local t) |
static function | squad (local q1, local q2, local s1, local s2, local t) |
function | toAxisAngle () |
static function | zero () |
Public Attributes | |
number | w |
number | x |
number | y |
number | z |
function __tostring | ( | ) |
function clone | ( | ) |
function conjugate | ( | ) |
function getConjugated | ( | ) |
function getInversed | ( | ) |
function getNormalized | ( | ) |
static function identity | ( | ) |
function inverse | ( | ) |
function isIdentity | ( | ) |
function isZero | ( | ) |
Interpolates between two quaternions using linear interpolation.
The interpolation curve for linear interpolation between
quaternions gives a straight line in quaternion space.
function normalize | ( | ) |
function setIdentity | ( | ) |
Interpolates between two quaternions using spherical linear interpolation.
Spherical linear interpolation provides smooth transitions between different
orientations and is often useful for animating models or cameras in 3D.
Note: For accurate interpolation, the input quaternions must be at (or close to) unit length.
This method does not automatically normalize the input quaternions, so it is up to the
caller to ensure they call normalize beforehand, if necessary.
Interpolates over a series of quaternions using spherical spline interpolation.
Spherical spline interpolation provides smooth transitions between different
orientations and is often useful for animating models or cameras in 3D.
Note: For accurate interpolation, the input quaternions must be unit.
This method does not automatically normalize the input quaternions,
so it is up to the caller to ensure they call normalize beforehand, if necessary.
function toAxisAngle | ( | ) |
Converts this Quaternion4f to axis-angle notation. The axis is normalized.
static function zero | ( | ) |
number w |
number x |
number y |
number z |