XSIMath.CreateRotation
 
 
 

XSIMath.CreateRotation

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.

C# Syntax

SIRotation XSIMath.CreateRotation( Object in_dX, Object in_dY, Object in_dZ );

Scripting Syntax

oReturn = XSIMath.CreateRotation( [X], [Y], [Z] );

Return Value

SIRotation

Parameters

Parameter Type Description
X Double or Array X Euler angle value (in radians) or an array containing the X, Y and Z values.
Y Double Y Euler angle value (in radians).
Z Double Z Euler angle value (in radians).

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)