CreateVector3 (XSIMath)
Description
Returns an SIVector3 object, the X, Y and Z values of this vector can be set at creation time from an array or by 3 values.
Scripting Syntax
XSIMath.CreateVector3( [X], [Y], [Z] )
C# Syntax
SIVector3 XSIMath.CreateVector3( Object in_dX, Object in_dY, Object in_dZ );Parameters
|
Parameter |
Type |
Description |
|
X |
X value to set in the vector or an array containing the X, Y and Z values. |
|
|
Y |
Y value to set in the vector. |
|
|
Z |
Z value to set in the vector. |
Return Value
Examples
1. JScript Example
/* Set and display the X, Y and Z values of a vector3 */ //CreateVector3 with array var arrayInit = new Array (3) arrayInit[0] = 1.1; arrayInit[1] = 2.3; arrayInit[2] = 3.7; var oVec = XSIMath.CreateVector3( arrayInit ); var vbArr = new VBArray( oVec.Get2() ); var array = vbArr.toArray(); Application.LogMessage( "X, Y and Z vector's values: " + array[0] +" , "+ array[1] +" , "+ array[2] ); //Expected output: //INFO : X, Y and Z vector's values: 1.1 , 2.3 , 3.7
2. VBScript Example
set oVector3 = XSIMath.CreateVector3
Application.LogMessage TypeName(oVector3)Autodesk Softimage v7.5