Examples of toMatrix4x4()


Examples of toxi.geom.Quaternion.toMatrix4x4()

    public void testMatrixRoundtrip() {
        for (int i = 0; i < 1000; i++) {
            Quaternion q = Quaternion.createFromAxisAngle(Vec3D.randomVector(),
                    MathUtils.random(MathUtils.TWO_PI)).normalize();
            Matrix4x4 m = q.toMatrix4x4();
            Quaternion q2 = Quaternion.createFromMatrix(m);
            Vec3D p = Vec3D.randomVector();
            Vec3D p2 = p.copy();
            q.applyTo(p);
            q2.applyTo(p2);
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.