gl-matrix.js ライブラリgl matrix mat4で 2 つの行列を乗算したい
乗算はこれで機能します:
var testMat = mat4.create();
mat4.multiply(testMat, this._transformations[0].transformation, this._transformation.transformation);
は行列this._transformation[x].transformation
です。
しかし、これを行うとうまくいきません:
mat4.multiply(this._transformations[0].transformation, this._transformations[0].transformation, this._transformation.transformation);
これは、格納されている行列this._transformations[0]
が乗算後も同じであることを意味します。
誰かがこれについて説明していますか、それとも私が間違っていることを教えてもらえますか?
編集:console.log(mat4.equals(mat4.create(),this._transformations[0].transformation))
戻りますtrue