Examples of MatrixTransform


Examples of de.ailis.jollada.model.MatrixTransform

     */

    @Test
    public void testConstructor()
    {
        final MatrixTransform transform = new MatrixTransform();
        assertNull(transform.getSid());
        assertNotNull(transform.getMatrix());
    }
View Full Code Here

Examples of de.ailis.jollada.model.MatrixTransform

     */

    @Test
    public void testSid()
    {
        final MatrixTransform transform = new MatrixTransform();
        assertNull(transform.getSid());
        transform.setSid("foo");
        assertEquals("foo", transform.getSid());
        transform.setSid(null);
        assertNull(transform.getSid());
    }
View Full Code Here

Examples of de.ailis.jollada.model.MatrixTransform

     */

    @Test
    public void testMatrix()
    {
        final MatrixTransform transform = new MatrixTransform();
        assertTrue(transform.getMatrix().isIdentity());
        final ImmutableMatrix4d translation = new ImmutableMatrix4d(0, 1, 2, 3,
            4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
        transform.setMatrix(translation);
        assertEquals(translation, new ImmutableMatrix4d(transform.getMatrix()));
    }
View Full Code Here

Examples of de.ailis.jollada.model.MatrixTransform

     */

    @Test(expected = IllegalArgumentException.class)
    public void testMatrixWithNull()
    {
        new MatrixTransform().setMatrix(null);
    }
View Full Code Here

Examples of de.ailis.jollada.model.MatrixTransform

     *            The element attributes.
     */

    private void enterMatrix(final Attributes attributes)
    {
        final MatrixTransform transform = new MatrixTransform();
        transform.setSid(attributes.getValue("sid"));

        final MutableMatrix4d matrix = transform.getMatrix();
        this.chunkFloatReader = new ChunkFloatReader()
        {
            private int index = 0;

            @Override
View Full Code Here

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

Examples of mikera.transformz.MatrixTransform

    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

Examples of mikera.transformz.MatrixTransform

      } 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

Examples of mikera.transformz.MatrixTransform

    doMaybeSquareTests(m);
    doRandomTests(m);
    doBigComposeTest(m);
    doSubMatrixTest(m);
   
    TestTransformz.doITransformTests(new MatrixTransform(m));
   
    new TestArrays().testArray(m);
  }
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.