UnsafeNativeMethods.Quaternion.Multiply Method |
Language: |
Multiplies two quaternions.
Visual Basic Public Shared Function Multiply( _
ByVal pOut As Quaternion, _
ByVal pQuat1 As Quaternion, _
ByVal pQuat2 As Quaternion _
) As QuaternionC# public static Quaternion Multiply(
Quaternion pOut,
Quaternion pQuat1,
Quaternion pQuat2
);C++ public:
static Quaternion Multiply(
Quaternion pOut,
Quaternion pQuat1,
Quaternion pQuat2
);JScript public static function Multiply(
pOut : Quaternion,
pQuat1 : Quaternion,
pQuat2 : Quaternion
) : Quaternion;
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.
Microsoft.DirectX.Quaternion
A Quaternion structure that is the product of two quaternions.
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#]The multiplication of quaternions is not commutative; that is, the order in which they are multiplied is important.
m = Matrix.Multiply(mX, mY); q = Quaternion.Multiply(qX, qY);The return value for this method is the same value returned in the pOut parameter. This allows you to use the Multiply method as a parameter for another method.
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center