Jaa


Quaternion Struct

Definition

Describes a quaternion, which is an abstract representation of an orientation in space that is based on complex numbers.

In C++, Quaternion is projected as the quaternion structure.

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
Inheritance
Quaternion
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The identity quaternion is (0, 0, 0, 1), where the quaternion values are listed in the order (x, y, z, w).

These quaternion values do not directly indicate an angle of rotation and an axis.

For more information about quaternions, see Quaternion, Quaternions and spatial rotation, and Introducing the Quaternions.

Fields

W

The w component of the quaternion, which is the real number part of the quaternion.

X

The x component of the quaternion, which is the coefficient of the i unit vector in the quaternion.

Y

The y component of the quaternion, which is the coefficient of the j unit vector in the quaternion.

Z

The z component of the quaternion, which is the coefficient of the k unit vector in the quaternion.

Applies to

See also

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