Package com.jme.math

Examples of com.jme.math.Quaternion.mult()


            // to the Cell. This will make sure that the direction of rotation
            // comes out properly.
            Quaternion rotation = rootNode.getLocalRotation();
            float angles[] = new float[3];
            rotation.toAngles(angles);
            normal = rotation.mult(normal);
           
            // Compute the signed angle between v1 and v2. We do this with the
            // following formula: angle = atan2(normal dot (v1 cross v2), v1 dot v2)
            float dotProduct = v1.dot(v2);
            Vector3f crossProduct = v1.cross(v2);
View Full Code Here


        // any look in the y-axis.
        Quaternion viewRotation = viewTransform.getRotation(null);

        Vector3f v1 = new Vector3f(0, 0, 1);
        Vector3f normal = new Vector3f(0, 1, 0);
        Vector3f v2 = viewRotation.mult(v1);
        v2.normalizeLocal();

        // Compute the signed angle between v1 and v2. We do this with the
        // following formula: angle = atan2(normal dot (v1 cross v2), v1 dot v2)
        float dotProduct = v1.dot(v2);
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.