Quaternion.CreateFromAxisAngle(Vector3, Single) Quaternion.CreateFromAxisAngle(Vector3, Single) Quaternion.CreateFromAxisAngle(Vector3, Single) Quaternion.CreateFromAxisAngle(Vector3, Single) Method

定義

從單位向量和對此向量旋轉的角度建立四元數。Creates a quaternion from a unit vector and an angle to rotate around the vector.

public:
 static System::Numerics::Quaternion CreateFromAxisAngle(System::Numerics::Vector3 axis, float angle);
public static System.Numerics.Quaternion CreateFromAxisAngle (System.Numerics.Vector3 axis, float angle);
static member CreateFromAxisAngle : System.Numerics.Vector3 * single -> System.Numerics.Quaternion
Public Shared Function CreateFromAxisAngle (axis As Vector3, angle As Single) As Quaternion

參數

axis
Vector3 Vector3 Vector3 Vector3

要繞著選轉的單位向量。The unit vector to rotate around.

angle
Single Single Single Single

繞著向量旋轉的角度,以弧度為單位。The angle, in radians, to rotate around the vector.

傳回

新建立的四元數。The newly created quaternion.

備註

axis 向量必須在呼叫這個方法之前正規化,否則產生的 Quaternion 將會不正確。axis vector must be normalized before calling this method or the resulting Quaternion will be incorrect.

適用於