Quaternion Structure
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)
Quaternions extend the concept of rotation in three dimensions to rotation in four dimensions. You can use quaternions to rotate an object about the (x, y, z) vector by an angle theta, where w = cos(theta/2). Quaternion operations are computationally more efficient than 4 × 4 matrix multiplications used for transformations and rotations. A quaternion also represents the most efficient rotation to interpolate between two orientations of an object.
Quaternions add a fourth element to the [x, y, z] values that define a vector, resulting in arbitrary 4-D vectors. However, the following formulas illustrate how each element of a unit quaternion relates to an axis-angle rotation, where q represents a unit quaternion (x, y, z, w), axis is normalized, and theta is the desired counterclockwise (CCW) rotation around the axis.
q.x = sin(theta/2) * axis.x q.y = sin(theta/2) * axis.y q.z = sin(theta/2) * axis.z q.w = cos(theta/2)
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Reference
Quaternion MembersMicrosoft.WindowsMobile.DirectX Namespace