Microsoft DirectX 9.0 SDK Update (October 2004)

UnsafeNativeMethods.Quaternion.Multiply Method

Language:

Note: This documentation is preliminary and is subject to change.

Multiplies two quaternions.

Note: For programming in Microsoft® Visual Basic® .NET or Microsoft® JScript® .NET, use the equivalent method in the Microsoft.DirectX structures.

Definition

Visual Basic .NET Public Shared Function Multiply( _
    ByVal pOut As Quaternion, _
    ByVal pQuat1 As Quaternion, _
    ByVal pQuat2 As Quaternion _
) As Quaternion
C# public static Quaternion Multiply(
    Quaternion pOut,
    Quaternion pQuat1,
    Quaternion pQuat2
);
Managed C++ public: static Quaternion Multiply(
    Quaternion pOut,
    Quaternion pQuat1,
    Quaternion pQuat2
);
JScript .NET public static function Multiply(
    pOut : Quaternion,
    pQuat1 : Quaternion,
    pQuat2 : Quaternion
) : Quaternion;

Parameters

pOut Microsoft.DirectX.Quaternion. A Quaternion structure that is the product of two quaternions.
pQuat1 Microsoft.DirectX.Quaternion. Source Quaternion structure.
pQuat2 Microsoft.DirectX.Quaternion. Source Quaternion structure.

Return Value

Microsoft.DirectX.Quaternion . A Quaternion structure that is the product of two quaternions.

Remarks

Transformations are concatenated in the same order for the Quaternion.Multiply and Matrix.Multiply methods. In the following C# code example, assuming that mX and mY represent the same rotations as qX and qY, both m and q represent the same rotations.

[C#]
m = Matrix.Multiply(mX, mY); q = Quaternion.Multiply(qX, qY);
The multiplication of quaternions is not commutative; that is, the order in which they are multiplied is important.

The return value for this method is the same value returned in the pOut parameter. Resultantly, the Multiply method can be used as a parameter for another method.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center