SIQuaternion.Mul

説明

クォータニオン q1 にクォータニオン q2 を掛け、結果をこのクォータニオンに格納します(this = q1 . q2)

回転で使用される場合、この処理は 2 つの回転の追加に反映されます。

スクリプト 構文

SIQuaternion.Mul( q1, q2 );

パラメータ

パラメータ タイプ 詳細
q1 SIQuaternion クォータニオンオペランド
q2 SIQuaternion クォータニオンオペランド

VBScript の例

dim q1, q2, q3
' Create Quaternions.
set q1 = XSIMath.CreateQuaternion(1.0, 1.0, 2.0, 3.0)
set q2 = XSIMath.CreateQuaternion(1.0, 4.0, 5.0, 6.0)
set q3 = XSIMath.CreateQuaternion
'q3 = q1 . q2
q3.Mul q1, q2
Application.LogMessage "q3 : " & q3.W & "," & q3.X & "," & q3.Y & "," & q3.Z 
'Mul operation is non-commutative
q3.Mul q2, q1
Application.LogMessage "q3 : " & q3.W & "," & q3.X & "," & q3.Y & "," & q3.Z 
'Output
'INFO : q3 : -31,2,13,6
'INFO : q3 : -31,8,1,12

関連項目

SIQuaternion.MulInPlace SIVector3 SIMatrix3 SIMatrix4 SIRotation SITransformation SIQuaternion