Package aspect.util

Examples of aspect.util.Vector3.mag2()


        Vector3[] cedges = c.getEdges();

        for (int i = 0; i < numEdges; i++) {
            for (int j = 0; j < c.numEdges; j++) {
                Vector3 cross = Vector3.cross(edges[i], cedges[j]);
                if (cross.mag2() != 0.0f) {
                    axes[pos++] = cross.normalize();
                } else {
                    axes[pos++] = null;
                }
            }
View Full Code Here


    }

    public void impel(Vector3 impulse, Vector3 point) {
        Vector3 angularImpulse = Vector3.cross(point, impulse);
       
        if (ent == null || angularImpulse.mag2() == 0.0f) {
            return;
        }
       
        impel(impulse);
        impelAngular(angularImpulse);
View Full Code Here

            impel(impulseN, pos1);
            rb2.impel(impulseN.negate(), pos2);

            // Frictional impulse
            Vector3 tangent = Vector3.cross(Vector3.cross(vr, normal), normal).normalize();
            if (tangent.mag2() == 0.0f) {
                return;
            }

            num = -Vector3.dot(vr.times(coefficientOfFriction), tangent);
            Vector3 t2 = tangent.times(f);
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.