Package aspect.util

Examples of aspect.util.Vector3.negate()


            float denom2 = Vector3.dot(normal, cross);
            float denom = denom1 + denom2;
            float impulse = num / denom;
            Vector3 impulseN = normal.times(impulse);
            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;
View Full Code Here


            denom2 = Vector3.dot(tangent, cross);
            denom = denom1 + denom2;
            float friction = num / denom;
            Vector3 frictionT = tangent.times(friction);
            impel(frictionT, pos1);
            rb2.impel(frictionT.negate(), pos2);

            //Vector3 friction = Vector3.cross(Vector3.cross(impulse, normal), normal).times(coefficientOfFriction);
            //impel(friction, pos1);
        }
    }
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.