SIQuaternion.SetIdentity

説明

このクォータニオンを恒等クォータニオンにリセットします。

スクリプト 構文

SIQuaternion.SetIdentity();

1. JScript の例

var oQuaternion = XSIMath.CreateQuaternion() ;
Application.LogMessage( "Uninitialized Quaternion  " 
                                + oQuaternion.W + "," 
                                + oQuaternion.X + "," 
                                + oQuaternion.Y + "," 
                                + oQuaternion.Z ) ;
oQuaternion.SetIdentity() ;
Application.LogMessage( "Identity Quaternion  " 
                                + oQuaternion.W + "," 
                                + oQuaternion.X + "," 
                                + oQuaternion.Y + "," 
                                + oQuaternion.Z ) ;
//INFO : Uninitialized Quaternion  1,0,0,0
//INFO : Identity Quaternion  1,0,0,0

2. VBScript の例

dim q1
' Create Quaternion.
set q1 = XSIMath.CreateQuaternion
q1.SetIdentity

関連項目

SIQuaternion.Set SIVector3 SIMatrix3 SIMatrix4 SIRotation SITransformation SIQuaternion