Quaternion Class
Methods
-
a
-
b
Calculates the dot product of two quat's
Parameters:
-
a
Quatthe first operand
-
b
Quatthe second operand
Returns:
dot product of a and b
-
a
Creates a new quat initialized with values from an existing quaternion
Parameters:
-
a
Quatquaternion to clone
Returns:
a new quaternion
-
out
-
a
Copy the values from one quat to another
Parameters:
-
out
Quatthe receiving quaternion
-
a
Quatthe source quaternion
Returns:
out
-
out
-
x
-
y
-
z
-
w
Set the components of a quat to the given values
Parameters:
Returns:
out
-
out
-
a
-
b
Adds two quat's
Parameters:
-
out
Quatthe receiving quaternion
-
a
Quatthe first operand
-
b
Quatthe second operand
Returns:
out
Alias for {@link quat.multiply}
-
out
-
a
-
b
Scales a quat by a scalar number
Parameters:
-
out
Quatthe receiving vector
-
a
Quatthe vector to scale
-
b
Numberamount to scale the vector by
Returns:
out
-
x
-
y
-
z
-
w
Creates a new quat initialized with the given values
Returns:
a new quaternion
-
out
-
a
-
b
-
t
Performs a linear interpolation between two quat's
Parameters:
-
out
Quatthe receiving quaternion
-
a
Quatthe first operand
-
b
Quatthe second operand
-
t
Numberinterpolation amount between the two inputs
Returns:
out
-
a
Calculates the length of a quat
Parameters:
-
a
Quatvector to calculate length of
Returns:
length of a
Alias for {@link quat.length}
-
a
Calculates the squared length of a quat
Parameters:
-
a
Quatvector to calculate squared length of
Returns:
squared length of a
Alias for {@link quat.squaredLength}
-
out
-
a
Normalize a quat
Parameters:
-
out
Quatthe receiving quaternion
-
a
Quatquaternion to normalize
Returns:
out
-
out
-
m
Creates a quaternion from the given 3x3 rotation matrix.
NOTE: The resultant quaternion is not normalized, so you should be sure to renormalize the quaternion yourself where necessary.
Parameters:
-
out
Quatthe receiving quaternion
-
m
Mat3rotation matrix
Returns:
out