SITransformation.Rotation

導入

v 5.1

詳細

この変換のSIRotation部分を設定したり、戻したりします(回転は自動的に作成されます)。

JScript の例

/*
        This example demonstrates how to use the Rotation property to return the rotation portion 
        of the transformation as an SIRotation (without having to explicitly create it first) as
        well as how to set a new value for the rotation.
*/
var t1 = XSIMath.CreateTransform();
// The Rotation property takes care of creating oRot as an SIRotation
var oRot = t1.Rotation;
var l_dx = XSIMath.DegreesToRadians(20);
var l_dy = XSIMath.DegreesToRadians(45);
var l_dz = XSIMath.DegreesToRadians(90);
oRot.SetFromXYZAnglesValues(l_dx, l_dy, l_dz);
t1.Rotation = oRot;
Application.LogMessage(" The x,y,z rotation of this transformation are: " 
                + t1.RotX + " " + t1.RotY + " " + t1.RotZ );
// Expected results:
//INFO :  The x,y,z rotation of this transformation are: 20 45 90

関連項目

SITransformation.GetRotation SITransformation.SetRotation