Package mikera.transformz

Examples of mikera.transformz.ATransform


  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


   
    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

TOP

Related Classes of mikera.transformz.ATransform

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.