CreateRotation (XSIMath)
Description
Returns a SIRotation object, the X, Y and Z values of this rotation can be set at creation time from an array or by 3 values.
Scripting Syntax
XSIMath.CreateRotation( [X], [Y], [Z] )
C# Syntax
SIRotation XSIMath.CreateRotation( Object in_dX, Object in_dY, Object in_dZ );
Parameters
|
Parameter |
Type |
Description |
|
X |
X Euler angle value (in radians) or an array containing the X, Y and Z values. |
|
|
Y |
Y Euler angle value (in radians). |
|
|
Z |
Z Euler angle value (in radians). |
Return Value
Examples
1. JScript Example
/* Set and display the X, Y and Z values of a rotation */ var oRot = XSIMath.CreateRotation ( XSIMath.DegreesToRadians( 70 ), XSIMath.DegreesToRadians( 40 ), XSIMath.DegreesToRadians( 45 )); Application.LogMessage( "X, Y and Z rotation angles values in degrees: " + oRot.RotX + "," + oRot.RotY +","+ oRot.RotZ ); //Expected output: //INFO : X, Y and Z rotation angles values in degrees: 70,40,45//
2. VBScript Example
set oRotation = XSIMath.CreateRotation Application.LogMessage TypeName(oRotation)
SOFTIMAGE|XSI v6.01