Quaternion 結構

定義

描述四元數,這是以複數為基礎的空間中方向的抽象標記法。

在 C++ 中, Quaternion 會投影為 四元數結構

public value class quaternion
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
struct quaternion
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public struct Quaternion
var quaternion = {
x : /* Your value */,
y : /* Your value */,
z : /* Your value */,
w : /* Your value */
}
Public Structure Quaternion
繼承
Quaternion
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

識別四元數是 (0、0、0、1) ,其中四元數值會以 xyzw) (的順序列出。

這些四元數值不會直接指出旋轉角度和軸。

如需四元數的詳細資訊,請參閱 四元數、四元數 和空間旋轉,以及四 元數簡介

欄位

W

四元數的 w 元件,這是四元數的實數部分。

X

四元數的 x 元件,這是四元數中 i 單位向量的係數。

Y

四元數的 y 元件,這是四元數中 j 單位向量的係數。

Z

四元數的 z 元件,這是四元數中 k 單位向量的係數。

適用於

另請參閱

  • <xref:Windows.Perception.Spatial.SpatialLocation.Orientation%0a%0a%5bquaternion+structure%5d(%2fwindows%2fwin32%2fnumerics_h%2fquaternion-structure)>