private static void test1(float maxDiff) { float[] v1 = new float[] { 1, 2, 0 }; float[] v2 = new float[] { 1, 1, 0 }; float[] v3 = new float[] { 3, 2, 0 }; float[] u1 = new float[] { 0, 2, 0 }; float[] u2 = new float[] { -1, 2, 0 }; float[] u3 = new float[] { 0, 2, 2 }; float[] transformationMatrix = getTransformationMatrix(v1, v2, v3, u1, u2, u3, maxDiff); test(v1, u1, transformationMatrix, maxDiff); test(v2, u2, transformationMatrix, maxDiff); test(v3, u3, transformationMatrix, maxDiff); }
private static void test2(float maxDiff) { float[] v1 = new float[] { 3, 0, 0 }; float[] v2 = new float[] { 4, 0, 0 }; float[] v3 = new float[] { 4, 1, 0 }; float[] u1 = new float[] { 1, 3, 0 }; float[] u2 = new float[] { 0, 3, 0 }; float[] u3 = new float[] { 0, 2, 0 }; float[] transformationMatrix = getTransformationMatrix(v1, v2, v3, u1, u2, u3, maxDiff); test(v1, u1, transformationMatrix, maxDiff); test(v2, u2, transformationMatrix, maxDiff); test(v3, u3, transformationMatrix, maxDiff); } }
Matrix.multiplyMV(r3, 0, matrix, 0, v3, 0); float[] calculatedMatrix = getTransformationMatrix(v1, v2, v3, r1, r2, r3, maxDiff);