Package com.jme3.math

Examples of com.jme3.math.Vector3f.lengthSquared()


            float triangleHeight = 2 * field / h.length();// the base of the height is the h vector
            // now calculate the distance between v1 vertex and the point where
            // the above calculated height 'touches' the base line (it can be
            // settled outside the h vector)
            float x = Math.abs((float) Math.sqrt(FastMath.clamp(temp.lengthSquared() - triangleHeight * triangleHeight, 0, Float.MAX_VALUE))) * Math.signum(cosAlpha);
            // now get the height base point
            Vector3f xPoint = v1.add(h.normalize().multLocal(x));

            // get the minimum point of the envelope
            Vector3f min = x < 0 ? xPoint : v1;
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.