Creates a new identity quat
X component
Y component
Z component
W component
类名
W component
W component
X component
X component
Y component
Y component
Z component
Z component
Calculates the W component of a quat from the X, Y, and Z components. Assumes that quaternion is 1 unit in length. Any existing W component will be ignored.
this
Creates a new quat initialized with values from an existing quaternion
a new quaternion
Calculates the conjugate of a quat If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
this
Calculates the dot product of two quat's
dot product of two quat's
Returns whether or not the quaternions have approximately the same elements in the same position.
Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)
从数组赋值
数组
数组偏移值
this
Creates a quaternion from the given euler.
OptionalnotCallUpdate: boolean
是否需要调用onUpdate
this
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.
rotation matrix
this
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.
rotation matrix
this
Gets the rotation axis and angle for a given quaternion. If a quaternion is created with setAxisAngle, this method will return the same values as providied in the original parameter list OR functionally equivalent values. Example: The quaternion formed by axis [0, 0, 1] and angle -90 is the same as the quaternion formed by [0, 0, 1] and 270. This method favors the latter.
Vector receiving the axis of rotation
Angle, in radians, of the rotation
Set this to the identity quaternion
this
Calculates the inverse of a quat
this
Calculates the length of a quat
length of this
Performs a linear interpolation between two quat's
interpolation amount between the two inputs
this
Normalize this
this
更新的回调
Rotates a quaternion by the given angle about the X axis
angle (in radians) to rotate
this
Rotates a quaternion by the given angle about the Y axis
angle (in radians) to rotate
this
Rotates a quaternion by the given angle about the Z axis
angle (in radians) to rotate
this
Scales a quat by a scalar number
the vector to scale
this
Set the components of a quat to the given values
X component
Y component
Z component
W component
this
Sets the specified quaternion with values corresponding to the given axes. Each axis is a vec3 and is expected to be unit length and perpendicular to all other specified axes.
this
Sets a quat from the given angle and rotation axis, then returns it.
the axis around which to rotate
the angle in radians
this
Performs a spherical linear interpolation between two quat
interpolation amount between the two inputs
this
Performs a spherical linear interpolation with two control points
interpolation amount
this
Calculates the squared length of a quat
squared length of this
转换到数组
数组
数组偏移值
四元数,具有 onUpdate 回调