public void MatrixMultiply(Matrix4f m1, Matrix4f m2) { float[] MulMat = new float[16]; float elMat = 0.0f; int k = 0; for (int i = 0; i <= 3; i++) { for (int j = 0; j <= 3; j++) { for (int l = 0; l <= 3; l++) { elMat += m1.M[i, l] * m2.M[l, j]; } MulMat[k] = elMat; elMat = 0.0f; k++; } } k = 0; for (int i = 0; i <= 3; i++) { for (int j = 0; j <= 3; j++) { m1.M[i, j] = MulMat[k]; k++; } } }
private void ResetPositionToolStripMenuItem_Click(object sender, EventArgs e) { ///fignya = false; height = 0; width = 0; // Rotation/Zoom/Pan matrixLock = new System.Object(); arcBall = new arcball(740.0f, 480.0f); matrix = new float[16]; LastTransformation = new Matrix4f(); ThisTransformation = new Matrix4f(); // mouse //private Point mouseStartDrag; isLeftDrag = false; //isRightDrag = false; // isMiddleDrag = false; PlotGL(); }
public void set_Renamed(Matrix4f m1) { this.M = m1.M; }