v5.1
この変換の SIRotation 部分を設定したり、戻したりします(回転は自動的に作成されます)。
// get accessor SIRotation rtn = ISITransformation.Rotation; // set accessor ISITransformation.Rotation = SIRotation; |
/* 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 |