Object Hierarchy | 関連する C++クラス:CQuaternion
倍精度浮動小数点のw、x、y、z座標で示される4エレメントユニットクォータニオンです。クォータニオンは、3D空間での向きと回転を表すコンパクトで便利な方法です。
var oRotation = XSIMath.CreateRotation( XSIMath.DegreesToRadians( 90 ), 0, 0 ) ;
var oQuaternion = XSIMath.CreateQuaternion() ;
oRotation.GetQuaternion( oQuaternion ) ;
Application.LogMessage( "Quaternion for 90 degree x rotation is "
+ oQuaternion.W + ","
+ oQuaternion.X + ","
+ oQuaternion.Y + ","
+ oQuaternion.Z ) ;
//Output:
//INFO : Quaternion for 90 degree x rotation is 0.7071067811865476,0.7071067811865475,0,0
|