Share via


Quaternion Class (Microsoft.DirectX)

Describes and manipulates a quaternion.

Note: For programming in Microsoft Visual Basic .NET or Microsoft JScript .NET, use the methods of the Microsoft.DirectX.Quaternion structure.

Definition

Visual Basic NotInheritable MustInherit Public Class Quaternion
    Inherits ObjectLeave Site
C# public abstract sealed class Quaternion : ObjectLeave Site
C++ public ref class Quaternion abstract sealed : ObjectLeave Site
JScript public final abstract class Quaternion extends ObjectLeave Site

Members Table

The following table lists the members exposed by the object.

Methods

Method Description
static (Shared in Visual Basic) BaryCentric Returns a quaternion in barycentric coordinates.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Conjugate Returns the conjugate of a quaternion.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Dot Returns the dot product of two quaternions.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Exp Calculates the exponential.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Invert Conjugates and re-normalizes a quaternion.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Length Returns the length of a quaternion.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) LengthSq Returns the square of a quaternion's length.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Ln Calculates the natural logarithm.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Multiply Multiplies two quaternions.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Normalize Returns the normal of a quaternion.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) RotationAxis Builds a quaternion that is rotated around an arbitrary axis.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) RotationMatrix Builds a quaternion from a rotation matrix.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Slerp Interpolates between two quaternions, using spherical linear interpolation.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) Squad Interpolates between quaternions, using spherical quadrangle interpolation.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) SquadSetup Sets up control points for spherical quadrangle interpolation.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.
static (Shared in Visual Basic) ToAxisAngle Computes a quaternion's axis and angle of rotation.
Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.

Inheritance Hierarchy

ObjectLeave Site

UnsafeNativeMethods.Quaternion

Remarks

Quaternions add a fourth element to the [ x, y, z] values that define a vector, resulting in arbitrary 4-D vectors. However, the following example illustrates 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)

Class Information

Namespace Microsoft.DirectX
Assembly Microsoft.DirectX (microsoft.directx.dll)
Strong Name Microsoft.DirectX,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492

See Also