Package jinngine.math

Examples of jinngine.math.Matrix3


  /**
   * Get the calculated inertia tensor. This tensor will be scaled in the total mass of the object.
   * @return
   */
  public Matrix3 getInertiaMatrix() {
    return new Matrix3(inertia);
  }
View Full Code Here


        assertMatrixEquals(ref, val, 0.);
    }

    @Test
    public void testCtorZero() {
        final Matrix3 m = new Matrix3();
        assertMatrixEquals(new double[]{
                    0., 0., 0.,
                    0., 0., 0.,
                    0., 0., 0.}, m);
    }
View Full Code Here

                    0., 0., 0.}, m);
    }

    @Test
    public void testAssignZero() {
        final Matrix3 m = new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        final Matrix3 r = m.assignZero();
        assertSame(r, m);//assert it return this
        //assert every value is 0.
        assertMatrixEquals(new double[]{
                    0., 0., 0.,
                    0., 0., 0.,
View Full Code Here

                    0., 0., 0.}, m);
    }

    @Test
    public void testCtor() {
        final Matrix3 m = new Matrix3(1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        assertMatrixEquals(new double[]{
                    1., 2., 3.,
                    4., 5., 6.,
View Full Code Here

                    7., 8., 9.}, m);
    }

    @Test
    public void testAssign() {
        final Matrix3 m = new Matrix3();
        final Matrix3 r = m.assign(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.);
        assertSame(r, m);//assert it return this
        //assert every value is 0.
View Full Code Here

                    7., 8., 9.}, m);
    }

    @Test
    public void testCtor02() {
        final Matrix3 m = new Matrix3(
                new Vector3(1, 4, 7),
                new Vector3(2, 5, 8),
                new Vector3(3, 6, 9));

        assertMatrixEquals(new double[]{
View Full Code Here

                    7., 8., 9.}, m);
    }

    @Test(expected = NullPointerException.class)
    public void testCtor03() {
        final Matrix3 m = new Matrix3(null,
                new Vector3(),
                new Vector3());
    }
View Full Code Here

                new Vector3());
    }

    @Test(expected = NullPointerException.class)
    public void testCtor04() {
        final Matrix3 m = new Matrix3(
                new Vector3(),
                null,
                new Vector3());
    }
View Full Code Here

                new Vector3());
    }

    @Test(expected = NullPointerException.class)
    public void testCtor05() {
        final Matrix3 m = new Matrix3(
                new Vector3(),
                new Vector3(),
                null);
    }
View Full Code Here

                null);
    }

    @Test
    public void testCtorMatrix() {
        final Matrix3 m = new Matrix3(new Matrix3(
                1., 2., 3.,
                4., 5., 6.,
                7., 8., 9.));

        assertMatrixEquals(new double[]{
View Full Code Here

TOP

Related Classes of jinngine.math.Matrix3

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.