Examples of translateSelf()


Examples of toxi.geom.Matrix4x4.translateSelf()

public class MatrixTest extends TestCase {

    public void testInverse() {
        Matrix4x4 m = new Matrix4x4();
        m.translateSelf(100, 100, 0);
        m.rotateX(MathUtils.HALF_PI);
        m.scaleSelf(10, 10, 10);
        System.out.println(m);
        Vec3D v = new Vec3D(0, 1, 0);
        Vec3D w = m.applyTo(v);
View Full Code Here

Examples of toxi.geom.Matrix4x4.translateSelf()

        assertTrue(new Vec3D(0, 0, 1).equalsWithTolerance(v, 0.00001f));
    }

    public void testTranslate() {
        Matrix4x4 m = new Matrix4x4();
        m.translateSelf(100, 100, 100);
        assertEquals(new Vec3D(100, 100, 100), m.applyTo(new Vec3D()));
    }
}
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.