Package mikera.transformz

Examples of mikera.transformz.MatrixTransform


  public void testCompoundTransform() {
    AVector v = Vector.of(1, 2, 3);

    AMatrix m1 = Matrixx.createScaleMatrix(3, 2.0);
    AMatrix m2 = Matrixx.createScaleMatrix(3, 1.5);
    ATransform ct = new MatrixTransform(m2)
        .compose(new MatrixTransform(m1));

    assertTrue(Vector3.of(3, 6, 9).epsilonEquals(ct.transform(v)));
  }
View Full Code Here


    AVector mimv=mi.transform(mv);
   
    assertTrue(mimv.epsilonEquals(v));   
   
    // composition of matrix and its inverse should be an identity transform
    MatrixTransform mt=new MatrixTransform(m);
    ATransform id=mt.compose(new MatrixTransform(mi));
    AVector idv=id.transform(v);
    assertTrue(idv.epsilonEquals(v));   
  }
View Full Code Here

      } catch (IndexOutOfBoundsException a) {/* OK */}
    }
  }

  private void doRowColumnTests(AMatrix m) {
    assertEquals(m.rowCount(),new MatrixTransform(m).outputDimensions());
    assertEquals(m.columnCount(),new MatrixTransform(m).inputDimensions());
   
    m=m.clone();
    int rc=m.rowCount();
    int cc=m.columnCount();
    if ((rc==0)||(cc==0)) return;
View Full Code Here

    doMaybeSquareTests(m);
    doRandomTests(m);
    doBigComposeTest(m);
    doSubMatrixTest(m);
   
    TestTransformz.doITransformTests(new MatrixTransform(m));
   
    new TestArrays().testArray(m);
  }
View Full Code Here

TOP

Related Classes of mikera.transformz.MatrixTransform

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.