quaternion4
Creates a quaternion4 from four vectors that hold the components of the four quaternions.
Read time 2 minutesLast updated 4 hours ago
Definition
- Type: Constructor
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
quaternion4(float4, float4, float4, float4)
Creates a quaternion4 from four vectors that hold the components of the four quaternions.
public quaternion4(float4 x, float4 y, float4 z, float4 w)
Parameters
Remarks
Lane 0 of each parameter holds a component of the first quaternion, lane 1 holds a component of the second quaternion, and so on. The constructor doesn't normalize the values. To build a quaternion4 from four separate quaternions, use the constructor that takes four values.
quaternionquaternion4(quaternion, quaternion, quaternion, quaternion)
Creates a quaternion4 from four quaternions.
public quaternion4(quaternion q0, quaternion q1, quaternion q2, quaternion q3)
Parameters
The quaternion to store in lane 0 of the new quaternion4.
The quaternion to store in lane 1 of the new quaternion4.
The quaternion to store in lane 2 of the new quaternion4.
The quaternion to store in lane 3 of the new quaternion4.
Remarks
The constructor stores each quaternion in its own lane: the components of go to lane 0 of x, y, z, and w, the components of go to lane 1, and so on. The constructor doesn't normalize the quaternions.
q0q1quaternion4(float4x4)
Creates a quaternion4 from the four columns of a matrix.
public quaternion4(float4x4 m)
Parameters
The matrix whose columns hold the x, y, z, and w components of the four quaternions.
Remarks
The columns of the matrix become the fields quaternion4.x, quaternion4.y, quaternion4.z, and quaternion4.w. This constructor doesn't convert a rotation matrix into quaternions.