Package com.ardor3d.math

Examples of com.ardor3d.math.Quaternion.normalizeLocal()


        // Orient bone to point along axis formed by start and end points.
        final Matrix3 orient = Matrix3.fetchTempInstance();
        orient.lookAt(endPnt.subtractLocal(stPnt).normalizeLocal(), Vector3.UNIT_Y);
        final Quaternion q = new Quaternion().fromRotationMatrix(orient);
        q.normalizeLocal();
        SkeletalDebugger.bone.setWorldRotation(q);

        // Offset with skin transform
        SkeletalDebugger.bone.setWorldTransform(scene.getWorldTransform().multiply(
                SkeletalDebugger.bone.getWorldTransform(), null));
View Full Code Here


        if (kQ0.dot(kQ1) < 0.0) {
            kQ1.multiplyLocal(-1.0);
        }

        final Quaternion kQ = kQ0.addLocal(kQ1);
        kQ.normalizeLocal();

        final Matrix3 kBoxaxis = kQ.toRotationMatrix(Matrix3.fetchTempInstance());
        final Vector3 newXaxis = kBoxaxis.getColumn(0, Vector3.fetchTempInstance());
        final Vector3 newYaxis = kBoxaxis.getColumn(1, Vector3.fetchTempInstance());
        final Vector3 newZaxis = kBoxaxis.getColumn(2, Vector3.fetchTempInstance());
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.