Package mikera.transformz

Examples of mikera.transformz.ATransform.transform()


    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)));
  }
 
  @Test
  public void testRotationMatrix() {
    AVector v=Vectorz.createUniformRandomVector(3)
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));   
  }
 
  @Test
  public void testInverse() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.