Package com.jme.math

Examples of com.jme.math.Vector3f.normalizeLocal()


        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);
        Vector3f crossProduct = v1.cross(v2);
View Full Code Here


     
            //Speed limiter
            float newVelocity = jump.length() / deltaTime;

            if (newVelocity > MAX_SPEED) {
                jump.normalizeLocal();
                jump.multLocal(MAX_SPEED * deltaTime);
            }
    
            jump.multLocal(1.0f/deltaTime);
            oldVelocity = jump;
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.