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.
SIVector3 XSIMath.CreateVector3( Object in_dX, Object in_dY, Object in_dZ ); |
oReturn = XSIMath.CreateVector3( [X], [Y], [Z] ); |
Parameter | Type | Description |
---|---|---|
X | Double or Array | X value to set in the vector or an array containing the X, Y and Z values. |
Y | Double | Y value to set in the vector. |
Z | Double | Z value to set in the vector. |
/* 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 |
set oVector3 = XSIMath.CreateVector3 Application.LogMessage TypeName(oVector3) |