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 ObjectC# public abstract sealed class Quaternion : Object C++ public ref class Quaternion abstract sealed : Object JScript public final abstract class Quaternion extends Object
Members Table
The following table lists the members exposed by the object.
Methods
Method Description 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.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.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.Exp Calculates the exponential. Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.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.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.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.Ln Calculates the natural logarithm. Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.Multiply Multiplies two quaternions. Note: For programming in Visual Basic .NET or JScript .NET, use the equivalent method in the Microsoft.DirectX structures.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.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.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.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.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.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.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
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