CreateQuaternion (XSIMath)
Description
Returns a SIQuaternion object, the W, X, Y and Z values of this quaternion can be set at creation time from an array or by 4 values.
Scripting Syntax
XSIMath.CreateQuaternion( [W], [X], [Y], [Z] )
C# Syntax
SIQuaternion XSIMath.CreateQuaternion( Object in_dW, Object in_dX, Object in_dY, Object in_dZ );Parameters
|
Parameter |
Type |
Description |
|
W |
W value to set in this quaternion or an array containing the W, X, Y and Z values. |
|
|
X |
X value to set in this quaternion. |
|
|
Y |
Y value to set in this quaternion. |
|
|
Z |
Z value to set in this quaternion. |
Return Value
Examples
1. VBScript Example
set quaternion = XSIMath.CreateQuaternion
Application.LogMessage TypeName(quaternion)2. JScript Example
/* Set and display the values of a quaternion */ var oQuat = XSIMath.CreateQuaternion(0.615, -0.764, -0.122, 0.152); var vbArr = new VBArray( oQuat.Get2() ); var array = vbArr.toArray(); Application.LogMessage( "W, X, Y and Z quaterion's values: " + array[0] +"," + array[1] +","+ array[2] +","+ array[3] ); //Expected output: //INFO : W, X, Y and Z quaterion's values: 0.615,-0.764,-0.122,0.152
Autodesk Softimage v7.5