SIMatrix4 オブジェクトを戻します。この Matrix4 の値は配列(1D または 2D)の作成時または 16 の値によって設定できます。
| m0 m1 m2 m3 |
| m4 m5 m6 m7 |
| m8 m9 m10 m11 |
| m12 m13 m14 m15 |
SIMatrix4 XSIMath.CreateMatrix4( Object in_d0, Object in_d1, Object in_d2, Object in_d3, Object in_d4, Object in_d5, Object in_d6, Object in_d7, Object in_d8, Object in_d9, Object in_d10, Object in_d11, Object in_d12, Object in_d13, Object in_d14, Object in_d15 ); |
oReturn = XSIMath.CreateMatrix4( [m0], [m1], [m2], [m3], [m4], [m5], [m6], [m7], [m8], [m9], [m10], [m11], [m12], [m13], [m14], [m15] ); |
パラメータ | タイプ | 説明 |
---|---|---|
m0 | DoubleまたはArray | m0値または 16 の値を含む配列(1Dまたは 2D) |
m1 | Double | m1 の値 |
m2 | Double | m2 の値 |
m3 | Double | m3 の値 |
m4 | Double | m4 の値 |
m5 | Double | m5 の値 |
m6 | Double | m6 の値 |
m7 | Double | m7 の値 |
m8 | Double | m8 の値 |
m9 | Double | m9 の値 |
m10 | Double | m10 の値 |
m11 | Double | m11 の値 |
m12 | Double | m12 の値 |
m13 | Double | m13 の値 |
m14 | Double | m14 の値 |
m15 | Double | m15 の値 |
/* Set and display the values of a matrix4 */ var arrayInit = new Array (16) arrayInit[0] = 1.1; arrayInit[1] = 2.31; arrayInit[2] = 3.7; arrayInit[3] = 4; arrayInit[4] = 1.2; arrayInit[5] = 2.28; arrayInit[6] = 5.3; arrayInit[7] = 2; arrayInit[8] = 1.2; arrayInit[9] = 2.88; arrayInit[10] = 3.4; arrayInit[11] = 9; arrayInit[12] = 1.9; arrayInit[13] = 2.89; arrayInit[14] = 3.5; arrayInit[15] = 5; var oMat4 = XSIMath.CreateMatrix4 (arrayInit); vbArr = new VBArray( oMat4.Get2() ); array = vbArr.toArray(); //Display Matrix var lineSize = 4; Application.LogMessage( "The 16 matrix values" ); var mgsString = ""; for (i =0; i < lineSize; i++ ) { for (j = 0; j < lineSize; j++ ) mgsString += "m" + i + "" + j + " " + array[ i*lineSize + j ] + " "; Application.LogMessage ( mgsString ); mgsString = ""; } //Expected output: //INFO : The 16 matrix values //INFO : m00 1.1 m01 2.31 m02 3.7 m03 4 //INFO : m10 1.2 m11 2.28 m12 5.3 m13 2 //INFO : m20 1.2 m21 2.88 m22 3.4 m23 9 //INFO : m30 1.9 m31 2.89 m32 3.5 m33 5 |
set oMatrix4 = XSIMath.CreateMatrix4 Application.LogMessage TypeName(oMatrix4) |