-
Notifications
You must be signed in to change notification settings - Fork 0
class_quat
reduz edited this page Feb 23, 2014
·
10 revisions
####Category: Built-In Types
Quaternion.
-
Quat
cubic_slerp( Quat b, Quat pre_a, Quat post_b, real t ) -
real
dot( Quat b ) -
Quat
inverse( ) -
real
length( ) -
real
length_squared( ) -
Quat
normalized( ) -
Quat
slerp( Quat b, real t ) -
Quat
slerpni( Quat b, real t ) - void
Quat( real x, real y, real z, real w ) - void
Quat( Matrix3 from )
Quaternion is a 4 dimensional vector that is used to represet a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between to rotations obtained by a Matrix3 cheaply. Adding quaternions also cheaply adds the rotations, however quaternions need to be often normalized, or else they suffer from precision issues.
Returns the dot product between two quaternions.
-
Quat
inverse( )
Returns the inverse of the quaternion (applies to the inverse rotatio too).
-
real
length( )
Returns the length of the quaternion.
-
real
length_squared( )
Returns the length of the quaternion, minus the square root.
-
Quat
normalized( )
Returns a copy of the quaternion, normalized to unit length.
Perform a spherical-linear interpolation with another quaternion.